springboot的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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!--springboot的父依赖-->
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>com.ZestfulYoghurt</groupId>
    <artifactId>zy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>zy</name>
    <description>Demo project for Spring Boot</description>


    <!--用于版本号的定义,可以使用${变量名}的形式代替-->
    <properties>

        <!--定义jdk的版本号-->
        <java.version>1.8</java.version>

        <!--定义springboot-mybatis接口对接包的版本号-->
        <springboot-mybatis.version>2.1.4</springboot-mybatis.version>

        <!--数据库连接jar包版本号-->
        <mysql-connector.version>5.1.6</mysql-connector.version>

        <!--定义shiro的版本号-->
        <shiro.version>1.7.0</shiro.version>

        <!--定义lombok的jar包版本号-->
        <lombok.version>1.18.20</lombok.version>

        <!--定义aspectjrt的jar包版本号-->
        <aspectjrt.version>1.9.6</aspectjrt.version>

        <!--定义aspectjweaver的jar包版本号-->
        <aspectjweaver.version>1.9.8.M1</aspectjweaver.version>

        <!--定义cglib的jar包版本号-->
        <cglib.version>3.2.12</cglib.version>

        <!--定义jedis的jar包版本号-->
        <jedis.version>2.9.0</jedis.version>


    </properties>

    <dependencies>

        <!--引入springboot对jdbc的依赖包-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>

        <!--引入mybatis和springboot对接的依赖包-->
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>${springboot-mybatis.version}</version>
        </dependency>

        <!--引入mysql连接依赖包-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql-connector.version}</version>
        </dependency>

        <!-- shiro依赖包 -->
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-spring</artifactId>
            <version>${shiro.version}</version>
        </dependency>

        <!--热部署依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!--引入测试依赖包-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!--提供给@Slf4j使用的依赖-->
        <!--设置日志jar包-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>

        <!--引入springboot对web支持的相关依赖包-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!--aop依赖导入-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <!--spring通过该jar包实现aop-->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectjrt.version}</version>
        </dependency>

        <!--aspectjrt的需要依赖aspectjweaver中的注解和一些类,所以需要导入-->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspectjweaver.version}</version>
        </dependency>

        <!--引入cglib动态代理的jar包依赖-->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>${cglib.version}</version>
        </dependency>

        <!--引入spring-aop的jar包依赖-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>

        <!--redis的jar包依赖-->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>${jedis.version}</version>
        </dependency>

        <!--springboot和redis的对接jar包依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <!--支持jsp的jar包依赖-->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>


        <!--让jsp支持jstl表达式导入的jar包依赖包-->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>

    </dependencies>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.3.5.RELEASE</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>9</source>
                    <target>9</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

上一篇:什么是webpack?Webpack的核心概念


下一篇:js-Date-UTC标准时间