IT源码网

SSM讲解

sanshao 2021年02月13日 程序员 149 0

首先创建项目

项目创建成功,将项目转换成web项目

 

转换成功

添加依赖包

<?xml version="1.0" encoding="UTF-8"?> 
<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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
 
    <groupId>com.wbg</groupId> 
    <artifactId>bookstoreSSM</artifactId> 
    <version>1.0-SNAPSHOT</version> 
 
    <properties> 
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
        <spring.version>4.3.0.RELEASE</spring.version> 
    </properties> 
 
    <dependencies> 
        <!--Spring框架核心库 --> 
        <dependency> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-context</artifactId> 
            <version>${spring.version}</version> 
        </dependency> 
        <!-- Spring MVC --> 
        <dependency> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-webmvc</artifactId> 
            <version>${spring.version}</version> 
        </dependency> 
        <dependency> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-context-support</artifactId> 
            <version>${spring.version}</version> 
        </dependency> 
        <!-- aspectJ AOP 织入器 --> 
        <dependency> 
            <groupId>org.aspectj</groupId> 
            <artifactId>aspectjweaver</artifactId> 
            <version>1.8.9</version> 
        </dependency> 
        <!--mybatis-spring适配器 --> 
        <dependency> 
            <groupId>org.mybatis</groupId> 
            <artifactId>mybatis-spring</artifactId> 
            <version>1.3.0</version> 
        </dependency> 
        <!--Spring java数据库访问包,在本例中主要用于提供数据源 --> 
        <dependency> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-jdbc</artifactId> 
            <version>${spring.version}</version> 
        </dependency> 
        <!--log4j日志包 --> 
        <dependency> 
            <groupId>org.apache.logging.log4j</groupId> 
            <artifactId>log4j-core</artifactId> 
            <version>2.6.1</version> 
        </dependency> 
        <!-- mybatis ORM框架 --> 
        <dependency> 
            <groupId>org.mybatis</groupId> 
            <artifactId>mybatis</artifactId> 
            <version>3.4.1</version> 
        </dependency> 
        <!-- JUnit单元测试工具 --> 
        <dependency> 
            <groupId>junit</groupId> 
            <artifactId>junit</artifactId> 
            <version>4.10</version> 
        </dependency> 
        <!--c3p0 连接池 --> 
        <dependency> 
            <groupId>c3p0</groupId> 
            <artifactId>c3p0</artifactId> 
            <version>0.9.1.2</version> 
        </dependency> 
        <!-- JSTL --> 
        <dependency> 
            <groupId>javax.servlet</groupId> 
            <artifactId>jstl</artifactId> 
            <version>1.2</version> 
        </dependency> 
        <!-- Servlet核心包 --> 
        <dependency> 
            <groupId>javax.servlet</groupId> 
            <artifactId>javax.servlet-api</artifactId> 
            <version>3.0.1</version> 
            <scope>provided</scope> 
        </dependency> 
        <!--JSP --> 
        <dependency> 
            <groupId>javax.servlet.jsp</groupId> 
            <artifactId>jsp-api</artifactId> 
            <version>2.1</version> 
            <scope>provided</scope> 
        </dependency> 
 
    </dependencies> 
 
</project>

Idea整合Tomcat

添加输出目录

 

 

将依赖包添加到Web-Inf目录下

 

项目创建完成

 

发布评论

分享到:

IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

Mybatis-generator自动生成讲解
你是第一个吃螃蟹的人
发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。