Com. Incorrect-site. Controller
Com. Incorrect-site. Dao
Com. Incorrect-site. Mapping
Com. Incorrect-site. Pojo
Com. Incorrect-site. Service
The config
XML/SSM/SRC/config/applicationcontext.
/SSM/SRC/config/JDBC properties
XML/SSM/SRC/config/Mybatis.
/SSM/SRC/config/for springMVC - servlet. XML
2. The file configuration
2.1 integration file exists problems
2.1.1 the startup problem of the spring framework: because not the main method in the web, so applicationContext container startup needs depends on the tomcat container, when the server starts, it should be loaded applicationContext IOC container;
2.1.2 mybaties configuration and loading, as a result of the conventional SqlsessionFactory object is founded by the SqlsessionFactoryBuilder is, and the SqlsessionFactoryBuilder is dependent on the mybaties. XML file, so can't blend in the spring, so in order to solve this problem, mybaties manufacturers, a class to encapsulate the SqlsessionFactoryBeans, this object can be implemented mybaties main configuration file loading, as well as various attributes configuration! , basically can be separated from the original mybaties, XML files, because to show that habit, selective retention;
3. The configuration process and the train of thought:
3.1 configuration web. XML
<? The XML version="1.0" encoding="utf-8"?> SSM index. HTML index. HTM index. The JSP default. The default HTML. HTM. Default JSP contextConfigLocation classpath: config/applicationcontext. XML org. Springframework. Web. Context. The ContextLoaderListener
CodePudding user response:
Used the SSM framework, doing? To study the