Im writing small web application using Spring Boot. Everything was working pretty fine, then I added some hibernate and Spring Security features and now my @RequestMapping doesnt work. Now i only get some logs about mapping like this:
o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[text/html],custom=[]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/*] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-03-25 11:30:34.516 INFO 4644 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
My controllers look like:
@Controller
@RequestMapping("/")
public class HomeController {
@RequestMapping(method=RequestMethod.GET)
public String home(Model model){
String welcome = new String("test");
model.addAttribute("welcome", welcome);
return "home";
}
}
Application.java
@Configuration
@EnableAutoConfiguration
@EnableTransactionManagement
public class Application {
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
}
}
This is my project structure:
