Description of common spring configuration and parsing classes
There are many articles on spring MVC configuration usage, but the specific description is not clear. Here we mainly introduce the usage of common configuration items and its parsing class. Spring MVC can process content in two ways: converter and viewresolver. Both can handle JSON, XML and form content formats.
Spring MVC returns JSON configuration steps as follows:
1. Add Jackson Jar package
2. In ApplicationContext Add the following code to the XML configuration file
3. Add the following code to the controller
The return value can be list or map
summary
The above is all about the description of common spring configuration and parsing classes in this article. I hope it will be helpful to you. Interested friends can continue to refer to this website:
Spring uses the configuration file and @ value to inject attribute value code
Spring configuration scanning multiple packages problem resolution
Detailed explanation of bean life cycle used by spring configuration