In annotation-driven Spring MVC, is there a way to generate a table of URL patterns, verbs, and their mappings? Something like:
/foo/{fooId} | GET | FooController.get() | jsp/foo/home.jsp | /foo/{fooId}/bars/ | GET | FooController.getBars() | jsp/foo/bar/index.jsp |
The @RequestMapping annotation can be applied to class-level and/or method-level in a controller. The class-level annotation maps a specific request path or pattern onto a controller. You can then apply additional method-level annotations to make mappings more specific to handler methods.
The ViewResolver provides a mapping between view names and actual views. The View interface addresses the preparation of the request and hands the request over to one of the view technologies.
@PanadolChong accomodate Spring MVC is still used in some legacy applications, and Spring boot does majority of the configurations under-hood so to have a better understanding of how things work internally, Spring MVC might help.
this has helped me. inside log4j.xml put the following:
<!-- Appenders --> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-5p: %c - %m%n" /> </layout> </appender> <!-- 3rdparty Loggers --> <logger name="org.springframework.core"> <level value="info" /> </logger> <logger name="org.springframework.beans"> <level value="info" /> </logger> <logger name="org.springframework.context"> <level value="info" /> </logger> <logger name="org.springframework.http"> <level value="debug" /> </logger> <!-- below alternate between debug and info --> <logger name="org.springframework.web"> <level value="debug" /> </logger>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With