JPA metamodel must not be empty!
@Configuration @EnableJpaAuditing public class JpaAuditingConfiguration { }
@MockBean(JpaMetamodelMappingContext.class)
Spring boot 테스트 중에 위 오류를 만났습니다.
무슨 의미냐면
boolean cannot be returned by tostring()
when(factory.produce()).thenReturn(car); -> doReturn(car).when(factory).produce();
변경해주면 된다.
java.lang.AssertionError: Status expected:<200> but was:<403>
다음은 오류입니다.
mockMvc.perform( .with(csrf()); // 추가해줌 )
Failed to load ApplicationContext
jwt필터 문제
@MockBean Private JwtService jwtService;
추가