栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

SSM项目开发搭建

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

SSM项目开发搭建

一.环境的准备
1.JDK的安装
2.tomcat安装
3.maven的安装及settings.xml的配置
4.eclipse的安装
5.mysql的安装
6.在eclipse中对jdk、tomcat、maven、编码(java和web)的配置
二.进行数据库的设计
1.利用PowerDesigner对数据库进行设计
2.将PD生成的SQL语句导入到数据库中
3.对数据库表进行数据的添加
三.前端页面的简单设计
login.html、index.html.、index.jsp等等
四.创建maven项目引入相关依赖
1.项目名:项目名称_ssm
2.在pom文件中引入相关依赖,项目所需依赖
3.利用节点对jar包版本进行统一管理

1.  
2.  4.0.0  
3.  cn.tedu  
4.  tes_ssm  
5.  1.0  
6.  war  
7.    
8.    UTF-8  
9.    4.3.7.RELEASE  
10.    2.8.1  
11.    3.4.5  
12.    1.3.1  
13.    5.0.8  
14.    1.0.14  
15.    1.3.2  
16.    3.13  
17.    1.2.3  
18.    1.8.7  
19.    
20.      
21.      
22.      
23.        javax.servlet  
24.        javax.servlet-api  
25.        4.0.1  
26.      
27.      
28.      
29.        org.springframework  
30.        spring-context  
31.        ${spring.version}  
32.      
33.      
34.      
35.        org.springframework  
36.        spring-web  
37.        ${spring.version}  
38.      
39.      
40.        org.springframework  
41.        spring-webmvc  
42.        ${spring.version}  
43.      
44.      
45.      
46.        org.springframework  
47.        spring-jdbc  
48.        ${spring.version}  
49.      
50.      
51.        org.springframework  
52.        spring-tx  
53.        ${spring.version}  
54.      
55.      
56.      
57.        org.springframework  
58.        spring-test  
59.        ${spring.version}  
60.      
61.      
62.      
63.        com.fasterxml.jackson.core  
64.        jackson-core  
65.        ${jackson.version}  
66.      
67.      
68.        com.fasterxml.jackson.core  
69.        jackson-databind  
70.        ${jackson.version}  
71.      
72.      
73.      
74.        org.mybatis  
75.        mybatis  
76.        ${mybatis.version}  
77.      
78.      
79.      
80.        org.mybatis  
81.        mybatis-spring  
82.        ${mybatis.spring.version}  
83.      
84.      
85.      
86.        mysql  
87.        mysql-connector-java  
88.        ${mysql.version}  
89.      
90.      
91.      
92.        com.alibaba  
93.        druid  
94.        ${druid.version}  
95.      
96.      
97.      
98.        commons-fileupload  
99.        commons-fileupload  
100.        ${fileupload.version}  
101.      
102.      
103.      
104.        org.apache.poi  
105.        poi  
106.        ${poi.version}  
107.      
108.      
109.      
110.        org.apache.shiro  
111.        shiro-all  
112.        ${shiro.version}  
113.      
114.      
115.      
116.        org.springframework  
117.        spring-aop  
118.        ${spring.version}  
119.      
120.      
121.        org.aspectj  
122.        aspectjweaver  
123.        ${aspectjweaver.version}  
124.      
125.    
126.  

五.相关配置文件
web.xml、spring.xml、spring_mybatis.xml、springmvc.xml、mybatisconfig.xml
1.web.xml文件

web.xml文件加载的顺序:
1.全局初始化参数–>2.监听器–>3.过滤器–>4.Servlet
1–>context-param
2.–>listener
3.—>filter
4.–>servlet(springmvc)

1.  
2.  
3.  ***_ssm  
4.    
5.    index.html  
6.    index.htm  
7.    index.jsp  
8.    default.html  
9.    default.htm  
10.    default.jsp  
11.    
12.    
13.      
14.        contextConfigLocation  
15.          
16.                  classpath:conf/spring.xml;  
17.                  classpath:conf/spring_mybatis.xml;  
18.                  classpath:conf/spring_shiro.xml  
19.          
20.      
21.      
22.      
23.        org.springframework.web.context.ContextLoaderListener  
24.      
25.      
26.      
27.      
28.        encodingFilter  
29.        org.springframework.web.filter.CharacterEncodingFilter  
30.          
31.            encoding  
32.            UTF-8  
33.          
34.          
35.            forceEncoding  
36.            true  
37.          
38.      
39.      
40.        encodingFilter  
41.        /*  
42.      
43.      
44.      
45.      
46.        shiroFilter  
47.        org.springframework.web.filter.DelegatingFilterProxy  
48.              
49.                           
50.                targetFilterLifecycle  
51.                true  
52.              
53.      
54.      
55.        shiroFilter  
56.        /*  
57.      
58.      
59.      
60.      
61.      
62.        dispatcher_restful  
63.        org.springframework.web.servlet.DispatcherServlet  
64.          
65.            contextConfigLocation  
66.            classpath:conf/spring_mvc.xml  
67.          
68.        1  
69.      
70.      
71.        dispatcher_restful  
72.        /  
73.      
74.  

2.Springmvc.xml文件
静态资源的添加,扫描包及其注解,spring mvc文件的上传

1.  
2.  
23.  
24.      
25.      
26.      
27.  
28.      
29.      
30.  
31.  
32.      
33.      
34.      
35.      
36.      
38.          
39.          
40.          
41.          
42.      
43.  
44.  

3.Spring.xml文件
属性文件的加载,扫描Service包,util包

1.  
2.  
23.      
24.      
25.     
26.        
28.     
29.     
31.     
32.     
33.     
34.     
35.     
36.  

4.Spring_mybatis.xml文件
数据库连接池的配置、mybatis配置读取配置文件、扫描xxxMapper对象,创建代理对象、spring事务管理、事务的注解扫描

1.  
2.  
23.          
24.      
28.          
29.          
30.            ${jdbc_driverClass}  
31.          
32.          
33.            ${jdbc_url}  
34.          
35.          
36.            ${jdbc_userName}  
37.          
38.          
39.            ${jdbc_userPassword}  
40.          
41.          
42.          
43.            5  
44.          
45.          
46.          
47.            2  
48.          
49.          
50.          
51.            6000  
52.          
53.          
54.          
55.            2  
56.          
57.          
58.          
59.            2  
60.          
61.          
62.          
63.            true  
64.          
65.          
66.          
67.            180  
68.          
69.          
70.          
71.            clientEncoding=UTF-8  
72.                
73.      
74.  
75.      
76.      
77.      
82.      
83.      
84.      
87.          
88.      
89.      
90.          
91.      
92.      
93.      
94.          
95.      
96.      
97.      
98.      
99.     
100.      
101.  

5.configuration.xml文件

1.  
2.  
4.  
5.      
6.      
7.          
8.          
9.          
10.          
11.          
12.      
13.      
14.  
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/287031.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号