Catalin Lungu
Catalin Lungu

Reputation: 31

Multiple controllers on Spring Tools Suite

I have made my first CRUD app on Spring MVC following a sample of sivalabs. The problem is when I add another controller class the application does not start. If I remove the annotation @Controller the app works. Thanks in advance.

HTTP Status 404 - /SpringMVCHibernate/

type Status report message /SpringMVCHibernate/

description The requested resource is not available.

VMware vFabric tc Runtime 2.9.6.RELEASE/7.0.53.B.RELEASE

Upvotes: 0

Views: 75

Answers (1)

Jos
Jos

Reputation: 2013

I'm just guessing..

- Check if there is any conflict in the url pattern. Make sure your 'RequestMapping's are unique. ["When a URL matches multiple patterns, a sort is used to find the most specific match."]

- Also, check if you are trying to visit the correct url [when you start the server, it many not take you to valid URLs.]. Check the logs in the console to find out which all url mappings have been identified by the spring.

Please post the code to check further.

Upvotes: 1

Related Questions