Kit SSM or SSH2 jar package
New springmvc-servlet.xml--Configuration View resolver (prefix and suffix)
New applocationcontext.xml--configuration database connection, Sqlsessionfatory/sessionfactory Factory
<import resource= "" > Extract the External file, you can write the database connection to the Propeties file, and then import to the Applocationcontext.xml
Modify the web.xml--Add Listener (https://www.cnblogs.com/wuchaodzxx/p/6038895.html), Associating Master profile Springmvc-servlet.xml, associating other profile applocationcontext.xml, filter (Filter access address)
Adding entity classes
Configuring the *mapping.xml of an entity class
A factory association in Applocationcontext.xml that makes its other associated entity class mappings--*mapping.xml
Write the DAO layer, Service (SERVICE.IMPL) layer and the method that they need--service.impl to privatize the properties of a DAO object for invoking methods inside the DAO layer
Modify the mapping file of the entity class Mapping.xml file so that it corresponds to the method inside the DAO layer
In the form of an interface in the Applocationcontext.xml to inject a DAO layer of the object-here Hibernate and Struts2 interface implementation are given to SPRINGMVC management, in Springmvc do not know, Direct-pass scan of the resulting DAO object
or by scanning injection, or by annotating automatic assembly injection (note to go to Applocationcontext.xml to add package scan--<context:component-scan base-package= "package name, Package name ..." > </context:component-scan>
Modify the workspace in the *mapping.xml so that it corresponds to the interface class inside the DAO layer.
Write test class Test--Get ApplicationContext
How to write a controller
Writing annotations (@controller @RequestMapping ("Binding Interface")
Adding a controller's scan in Springmvc-servlet.xml
Pass value to page via JSONP--Guide Package (note package, core package, data binding package), add annotations (@RequestBody) on method, start annotations in Springmvc-servlet
Simple development process for SSM or SSH projects