Skip to main content

Posts

Showing posts with the label Spring

Spring: implements interface not working in @Controller

Guys,  I had a @Controller in which I was trying to implement an interface. But i was getting the following error message: PageNotFound WARN  No mapping found for HTTP request with URI [/test/form] in DispatcherServlet with name 'Spring MVC Dispatcher Servlet' where "/test" (at class level) and "/form" (at method level) where my @RequestMapping args.  The issue is described at following link: http://forum.springsource.org/showthread.php?92303-Spring-Servlet-MVC-RequestMapping-breaks-with-AOP-Advice Now you may not find anything wrong with your spring.xml but should check all the xml used by used in the project in out case metrics was causing the problem.  The aop config was overridden by metrics here: https://github.com/ryantenney/metrics-spring#xml-config  By default JDK proxy are created using interface and if controller implements an interface the RequestMapping annotation gets ignored as the targetClass is not being using. http://static.spr...

Spring Roo is amazing

Developer spend 75% of their time working on boiler-plate code. Spring Roo do amazing job of doing that for you and gets you started really-2 fast. After that you can follow the application curve if writing the business logic. Why Roo? Define the class and its relation it will generate the DB using hibernate  you can generate the controller's ( and UI) from the same classes with CURD operation supported test code is also gets generated  code generated is clean and easy to modify dependency resolution happens through maven once you are done projects are eclipse ready easy to get rid of metadata for production  Other tools: I came across Grails but i needed a framework which will generate the java so roo was the better choice for me Video helped me get started:  http://s3.springsource.com/MRKT/roo/2010-01-Five_Minutes_Roo.mov