ssm項目快速搭建(配置)

核心jar包

UTF-8

1.8

1.8

5.0.2.RELEASE

1.6.6

1.2.12

5.1.6

3.4.5

?

?



org.aspectj

aspectjweaver

1.6.8

?

org.springframework

spring-aop

${spring.version}

?

org.springframework

spring-context

${spring.version}

?

org.springframework

spring-web

${spring.version}

?

org.springframework

spring-webmvc

${spring.version}

?

org.springframework

spring-test

${spring.version}

?

org.springframework

spring-tx

${spring.version}

?

org.springframework

spring-jdbc

${spring.version}

?

junit

junit

4.12

compile

?

mysql

mysql-connector-java

${mysql.version}

?

javax.servlet

servlet-api

2.5

provided

?

javax.servlet.jsp

jsp-api

2.0

provided

?

jstl

jstl

1.2

?

? ?<!-- log start -->

? ?<dependency>

? ? ?<groupId>log4j</groupId>

? ? ?<artifactId>log4j</artifactId>

? ? ?<version>${log4j.version}</version>

? ?</dependency>

?

? ?<dependency>

? ? ?<groupId>org.slf4j</groupId>

? ? ?<artifactId>slf4j-api</artifactId>

? ? ?<version>${slf4j.version}</version>

? ?</dependency>

?

? ?<dependency>

? ? ?<groupId>org.slf4j</groupId>

? ? ?<artifactId>slf4j-log4j12</artifactId>

? ? ?<version>${slf4j.version}</version>

? ?</dependency>

?

? ?<!-- log end -->

? ?<dependency>

? ? ?<groupId>org.mybatis</groupId>

? ? ?<artifactId>mybatis</artifactId>

? ? ?<version>${mybatis.version}</version>

? ?</dependency>

?

? ?<dependency>

? ? ?<groupId>org.mybatis</groupId>

? ? ?<artifactId>mybatis-spring</artifactId>

? ? ?<version>1.3.0</version>

? ?</dependency>

?

? ?<dependency>

? ? ?<groupId>c3p0</groupId>

? ? ?<artifactId>c3p0</artifactId>

? ? ?<version>0.9.1.2</version>

? ? ?<type>jar</type>

? ? ?<scope>compile</scope>

? ?</dependency>

? ?<dependency>

? ? ?<groupId>org.projectlombok</groupId>

? ? ?<artifactId>lombok</artifactId>

? ? ?<version>1.16.8</version>

? ?</dependency>

? ?<dependency>

? ? ?<groupId>com.fasterxml.jackson.core</groupId>

? ? ?<artifactId>jackson-core</artifactId>

? ? ?<version>2.9.0</version>

? ?</dependency>

? ?<dependency>

? ? ?<groupId>com.fasterxml.jackson.core</groupId>

? ? ?<artifactId>jackson-annotations</artifactId>

? ? ?<version>2.9.0</version>

? ?</dependency>

? ?<dependency>

? ? ?<groupId>com.fasterxml.jackson.core</groupId>

? ? ?<artifactId>jackson-databind</artifactId>

? ? ?<version>2.9.0</version>

? ?</dependency>

? ?<dependency>

? ? ?<groupId>org.projectlombok</groupId>

? ? ?<artifactId>lombok</artifactId>

? ? ?<version>1.16.8</version>

? ?</dependency>

?</dependencies>

web.xml配置文件

"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

"http://java.sun.com/dtd/web-app_2_3.dtd" >

?

Archetype Created Web Application


contextConfigLocation

classpath:applicationContext.xml


org.springframework.web.context.ContextLoaderListener

?


characterEncodingFilter

org.springframework.web.filter.CharacterEncodingFilter

encoding

UTF-8

characterEncodingFilter

/*


dispatcherServlet

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath:springmvc.xml

dispatcherServlet

/

applicationContext.xml文件


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:mvc="http://www.springframework.org/schema/mvc"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc.xsd">

?



?


?


?



?


?


?


springMVC.xml配置文件


xmlns:mvc="http://www.springframework.org/schema/mvc"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd">



?




?


JdbcConfig.properties配置文件

jdbc.driver=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/mybatis

jdbc.username=root

jdbc.password=root

SqlMapConfig.xml核心mybstis配置文件


PUBLIC "-//mybatis.org//DTD Config 3.0//EN"

"http://mybatis.org/dtd/mybatis-3-config.dtd">

?

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容