I get this: exception when to try to reach my webfunction i Spring:
PageNotFound noHandlerFound WARNING: No mapping found for HTTP request with URI in DispatcherServlet with name
In cotroller I got:
@Controller
@RequestMapping("/user/**")
@Scope("request")
and in web function:
@RequestMapping(value = "test", method = RequestMethod.GET, produces = MediaType.TEXT_PLAIN_VALUE)
In web.xml i added:
<servlet-mapping>
<servlet-name>webApplication</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
And after trying to reach adress:
http://localhost:8087/webApp-project/rest/user/test
I get exception:
cze 21, 2016 10:12:00 AM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/webApp-project/rest/user/test] in DispatcherServlet with name 'webApp'
Problem was solved by adding:
<beans:bean class="com.capgemini.webApp.project.process.engine.authentication.UserRest" name="/rest/*"></beans:bean>
To config files. Please could anybody tell me why it's solved the problem? I got annotation driven configuration.
Now I want to secure page with Spring Security, and I got problems with it, maybe it's caused because of this bean definition?