I. SSM project-Distributed project Structure setup
Two. SSM Project-spring mybatis MySQL configuration implementation three SSM project-redis cache strategy and configuration implementation four. SSM Project-SPRINGMVC Configuration implementation
First, the SSM Framework Web project starts from the zero--distributed project structure constructs
/**
This article is the main original article, such as reprint please attach a link.
**/ I. SSM Project-Directory framework built to achieve 1. Preface
Do the SSM project has a period of time, never systematic to the entire project structure to do a summary, near the year, while there is time, want to the entire SSM project framework of the relevant content comb it, but also make up for their own deficiencies, may be some of the examination questions, please be a lot of understanding.
This series of articles, will involve Springmvc,spring,mybatis,maven, Mysql,redis and other framework knowledge, if you do not know the relevant knowledge of the students, please go to the corresponding official website for self recharge. At the same time, this series of articles is only a SSM project to build an example, some problems will not be in-depth. If it is helpful to you, please click on it. 2. SSM project from zero start article directory
This series of articles will be divided into four chapters, the specific article directory is as follows
1) SSM Project-maven Project Structure construction
2) SSM Project-spring mybatis MySQL configuration implementation
3) SSM Project-redis cache strategy and configuration implementation
4) SSM Project-SPRINGMVC Configuration Implementation 3. SSM Project-maven Project structure build 3.1 SSM project structure 3.1.1 Traditional SSM project Structure
Advantages: All project code distributed uniformly in a file, easy to manage;
Disadvantage: All project code uniformly distributed together, the module coupling degree is not conducive to the code distributed management, not conducive to the project distributed deployment, MAVEN needs each individual compilation processing. 3.1.2 Distributed SSM Project Structure
Disadvantages: Code dispersion, increase the amount of code;
Advantage: The code sees the coupling degree to reduce, facilitates the code management, the project sees through the POM dependence carries on the related invocation dependence, the deployment through the jar realizes the project dependence, simultaneously facilitates the project distributed deployment. 3.2 SSM Project Structure Realization
This section will implement the Distributed SSM project structure in 3.1.2, with the overall project structure as follows
3.2.1 Ssm-parent SSM Project Maven Parent project, POM can be configured with the entire Web application-related shelf-dependencies, plug-ins, JDK versions etc 3.2.1.1 Maven Project New
1 new MAVEN project projects;
2) Select Create a simple project ...
3 Set the project to save the directory location, if you choose Default, the project directory files may appear confusing, difficult to manage. 3.2.1.2 Configure Project
1) Packaging need to select Pom; 3.2.1.3 ssm-parent Project Structure
3.2.2 Ssm-commons SSM Project Public component package for other engineering calls. 3.2.2.1 Maven Project
3.2.2.2 Configure Project
1) Packaging Select jar
2) Parentproject input ssm-parent related information 3.2.2.3 ssm-commons project Structure
3.2.3 Ssm-manager SSM Project Web application implementation Project 3.2.3.1 Maven Project
3.2.3.2 Configure Project
1) packaging Select Pom;
2) parentproject input ssm-parent 3.2.3.3 Ssm-manager Project Structure
3.2.4 Ssm-manager-pojo
Pojo Storage Project-related entities 3.2.4.1 Maven module
3.2.4.2 Configure Project
1) Packaging Select Jar 3.2.5 ssm-manager-service and Ssm-manager-mapper
Ssm-manager-mapper:dao layer, mainly interacts with data;
Ssm-manager-service:service layer, mainly for business logic processing;
Ssm-manager-service,ssm-manager-mapper Project projects are similar
Ssm-manager-pojo 3.2.6 Ssm-manager-controller
Ssm-manager-controller: Interactive control with front end, also includes front-end code; 3.2.6.1 Maven Module
Create a module like Ssm-manager-pojo; 3.2.6.2 Configure Project
1) Packaging select War; 3.2.6.3 Ssm-manager-controller Project Structure
4. SSM Project-Project Structure summary
Through the above steps, our SSM project overall project structure has been completed, the next chapter we will introduce Spring,mybatis to implement the related configuration.
two. SSM project-spring mybatis mysql configuration implementation three. SSM Project-redis cache policy and configuration implementation four. Implementation of SSM Project-SPRINGMVC configuration