• 1.spring、mybatis、mysql整合需要的包


    1.spring、mybatis、mysql整合需要的jar包

    一、spring、mybatis、mysql、和mybatis提供的与spring整合的插件包

      mysql的jar:
    mysql-connector-java-5.1.43-bin.jar
    c3po连接池的jar:
    c3p0-0.9.5.2.jar
    mybatis的jar:
    asm-3.3.1.jar(字节码)
    cglib-2.2.2.jar(代理)
    commons-logging-1.1.1.jar(日志)
    log4j-1.2.17.jar(log4日志,可不要)
    mybatis-3.2.7.jar(核心包)
    mybatis与spring整合的jar:
    mybatis-spring-1.1.1.jar
    spring的ioc模块的jar:(asm包在3.2.2中已经整合到core中)
    spring-beans-4.0.4.RELEASE.jar
    spring-context-4.0.4.RELEASE.jar
    spring-core-4.0.4.RELEASE.jar
    spring-expression-4.0.4.RELEASE.jar
    commons-logging-1.2.jar
    spring的aop模块的jar:
    aopalliance.jar(spring4中未见)
    spring-aspects-4.0.4.RELEASE.jar
    cglib-2.2.2.jar(未见)
    spring-aop-4.0.4.RELEASE.jar
    spring的transavion(事物模块)的jar:
    spring-jdbc-4.0.4.RELEASE.jar
    spring-orm-4.0.4.RELEASE.jar
    org.springframework.transaction-4.0.4.RELEASE.jar(tx)
    spring的web的jar(web工程中使用):
    spring-web-4.0.4.RELEASE.jar
    spring-webmvc-4.0.4.RELEASE.jar

    二、使用maven新建工程时,导包的配置

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>spring_mybatis_mysql</groupId>
        <artifactId>spring_mybatis_mysql</artifactId>
        <packaging>war</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>spring_mybatis_mysql Maven Webapp</name>
        <url>http://maven.apache.org</url>
        <dependencies>
            <!--junit包-->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>3.8.1</version>
                <scope>test</scope>
            </dependency>
            <!--mysql包-->
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.43</version>
            </dependency>
            <!--c3po连接池-->
            <dependency>
                <groupId>com.mchange</groupId>
                <artifactId>c3p0</artifactId>
                <version>0.9.5.2</version>
            </dependency>
            <!--mybatis的包-->
            <dependency>
                <groupId>asm</groupId>
                <artifactId>asm</artifactId>
                <version>3.3.1</version>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>2.2.2</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>3.2.7</version>
            </dependency>
            <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis-spring</artifactId>
                <version>1.1.1</version>
            </dependency>
            <!--spring IOC部分-->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>aopalliance</groupId>
                <artifactId>aopalliance</artifactId>
                <version>1.0</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aspects</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>4.0.4.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>RELEASE</version>
            </dependency>
        </dependencies>
        <build>
            <finalName>spring_mybatis_mysql</finalName>
        </build>
    </project>


  • 相关阅读:
    TypeError: can't compare offset-naive and offset-aware datetimes bugfix
    pg_restore数据库恢复指令
    第四十期百度技术沙龙笔记整理
    JS事件模型小结
    matlab Newton method
    Markdown 语法的简要规则
    iOS社交分享Twitter、Facebook、拷贝到剪切板、LINE、及邮件
    Linux系统调用过程分析
    iOS自己定义返回button(不影响返回手势)
    MAVEN项目模块化
  • 原文地址:https://www.cnblogs.com/Nick-Hu/p/7309358.html
Copyright © 2020-2023  润新知