详细整合SSM以及整理所需要的jar包

 

SSM框架配置

 

目录

1. web.xml 1

2. applicationContext.xml 2

3. jdbc.properties 5

4. mybatis-config.xml 6

5. spring-mvc.xml 6

6. log4j.properties 7

7. Mapper.xml 7

8. Pom.xml 8

 

 

1.web.xml

 

xmlns="http://java.sun.com/xml/ns/javaee"

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

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

  

  

login.jsp

  

  

  

  contextConfigLocation

  classpath:applicationContext.xml

  

  

  

  encodingFilter

  org.springframework.web.filter.CharacterEncodingFilter

  true

  

  encoding

  UTF-8

  

  

  

  encodingFilter

  /*

  

  

  

  org.springframework.web.context.ContextLoaderListener

  

  

  

  SpringMVC

  org.springframework.web.servlet.DispatcherServlet

  

  contextConfigLocation

  classpath:spring-mvc.xml

  

  

  

  SpringMVC

  *.do

  

 

 

 

 

2.applicationContext.xml

 

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

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

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

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

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

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

xsi:schemaLocation="

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

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

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

http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd  

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

 

 

            ${jdbc.driverClassName}

        

        

            ${jdbc.url}

        

        

            ${jdbc.username}

        

        

            ${jdbc.password}

        

        

            5

        

        

        

            30

        

        

        

            10

        

        

        

            60

        

        

        

            5

        

        

        

            0

        

        

        

            60

        

        

        

            30

        

        

        

            true

        

        

        

            false

        

mybatis-config.xml">

com/java/mappers/*.xml">

com.java.dao">

 

 

 

 

 

 

 

 

 

 

 

 

 

 

com.java.service.*.*(..))" id="serviceOperation"/>

 

 

 

 

 

3.jdbc.properties

 

jdbc.driverClassName=com.mysql.jdbc.Driver

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

jdbc.username=root

jdbc.password=root

 

 

 

 

 

4.mybatis-config.xml

 

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

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

    

    

        com.java.entity" />    

    

 

 

 

 

 

 

5.spring-mvc.xml

 

 

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

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

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

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

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

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

xsi:schemaLocation="

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

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

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

http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd  

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

 

/">

.jsp">

 

 

 

 

 

 

 

6.log4j.properties

 

log4j.rootLogger=DEBUG, Console

 

#Console  

log4j.appender.Console=org.apache.log4j.ConsoleAppender  

log4j.appender.Console.layout=org.apache.log4j.PatternLayout  

log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n  

 

log4j.logger.java.sql.ResultSet=INFO  

log4j.logger.org.apache=INFO  

log4j.logger.java.sql.Connection=DEBUG  

log4j.logger.java.sql.Statement=DEBUG  

log4j.logger.java.sql.PreparedStatement=DEBUG  

 

 

 

 

7.Mapper.xml

 

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

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

com.java1234.mappers.StudentMapper">

 

 

 

 

 

 

8.Pom.xml

 

    

    4.0.2.RELEASE

    

    3.2.6

    

    1.7.7

    1.2.17

  

 

  

    

      junit

      junit

      4.11

      

      test

    

    

    

      org.springframework

      spring-core

      ${spring.version}

    

 

    

      org.springframework

      spring-web

      ${spring.version}

    

    

      org.springframework

      spring-oxm

      ${spring.version}

    

    

      org.springframework

      spring-tx

      ${spring.version}

    

 

    

      org.springframework

      spring-jdbc

      ${spring.version}

    

 

    

      org.springframework

      spring-webmvc

      ${spring.version}

    

    

      org.springframework

      spring-aop

      ${spring.version}

    

 

    

      org.springframework

      spring-context-support

      ${spring.version}

    

 

    

      org.springframework

      spring-test

      ${spring.version}

    

    

    

      org.mybatis

      mybatis

      ${mybatis.version}

    

    

    

      org.mybatis

      mybatis-spring

      1.2.2

    

    

    

      javax

      javaee-api

      7.0

    

    

    

      mysql

      mysql-connector-java

      5.1.30

    

    

    

      commons-dbcp

      commons-dbcp

      1.2.2

    

    

    

      jstl

      jstl

      1.2

    

    

    

    

      log4j

      log4j

      ${log4j.version}

    

   

   

    

    

      com.alibaba

      fastjson

      1.1.41

    

 

 

    

      org.slf4j

      slf4j-api

      ${slf4j.version}

    

 

    

      org.slf4j

      slf4j-log4j12

      ${slf4j.version}

    

    

    

    

      org.codehaus.jackson

      jackson-mapper-asl

      1.9.13

    

    

    

      commons-fileupload

      commons-fileupload

      1.3.1

    

    

      commons-io

      commons-io

      2.4

    

    

      commons-codec

      commons-codec

      1.9

    

   

   

  

 

 

 

 

 


你可能感兴趣的:(SSM)