황교빈의 아카이브 Cloud

SpringBoot + Junit 예제

SpringBoot + Junit 예제 import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class BootrestApplicationTests { @Autowired private TestRestTemplate restTemplate; @Test public void testSpringBootApp() throws JsonProcessingException, IOException{ String body = restTemplate.getForObject(“/”,...

[스프링] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘requestMappingHandlerMapping’ defined in class path resource []: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map ‘basicErrorController’ method

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘requestMappingHandlerMapping’ defined in class path resource []: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map ‘basicErrorController’ method requestMapping 별도로...