springboot+mybatis+thymeleaf+ajax+JQuery 技术整合搭建项目开发环境__02_技术落地(技术选型)

时间:2025-02-15 08:27:45
  • <?xml version="1.0" encoding="UTF-8"?>
  • <project xmlns="/POM/4.0.0"
  • xmlns:xsi="http:///2001/XMLSchema-instance"
  • xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0.">
  • <modelVersion>4.0.0</modelVersion>
  • <groupId></groupId>
  • <artifactId>spring-boot-ajax</artifactId>
  • <version>1.0-SNAPSHOT</version>
  • <!--第一步 配置父依赖版本-->
  • <parent>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-parent</artifactId>
  • <version>2.0.</version>
  • </parent>
  • <!--第二步 配置默认属性 -->
  • <properties>
  • <>UTF-8</>
  • <>UTF-8</>
  • <>1.8</>
  • </properties>
  • <!--第三步 当前工程的依赖配置 -->
  • <dependencies>
  • <!-- This is a web application -->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-web</artifactId>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-thymeleaf</artifactId>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-devtools</artifactId>
  • <optional>true</optional>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>lombok</artifactId>
  • <version>1.16.10</version>
  • </dependency>
  • <dependency>
  • <groupId>-lib</groupId>
  • <artifactId>json-lib</artifactId>
  • <version>2.2.3</version>
  • <classifier>jdk15</classifier>
  • </dependency>
  • <!-- 整合mybatis-->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>mybatis-spring-boot-starter</artifactId>
  • <version>1.3.2</version>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-jdbc</artifactId>
  • </dependency>
  • <dependency>
  • <groupId>mysql</groupId>
  • <artifactId>mysql-connector-java</artifactId>
  • <scope>runtime</scope>
  • </dependency>
  • <!-- springboot 整合 mybatis pagehelper -->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>pagehelper-spring-boot-starter</artifactId>
  • <version>1.2.5</version>
  • </dependency>
  • <!-- springboot 整合 redis -->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-data-redis</artifactId>
  • </dependency>
  • <!--使用cache缓存(不使用缓存时,每次访问都会连接数据库)-->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-cache</artifactId>
  • </dependency>
  • <!--整合 JPA-->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-data-jpa</artifactId>
  • </dependency>
  • <!--整合 activemq 消息中间件-->
  • <!-- activemq -->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-starter-activemq</artifactId>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>activemq-pool</artifactId>
  • </dependency>
  • <!-- 单元测试相关依赖-->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-boot-test</artifactId>
  • <scope>test</scope>
  • </dependency>
  • <dependency>
  • <groupId>junit</groupId>
  • <artifactId>junit</artifactId>
  • <scope>test</scope>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>spring-test</artifactId>
  • <scope>test</scope>
  • </dependency>
  • <!--API工具 -->
  • <dependency>
  • <groupId></groupId>
  • <artifactId>springfox-swagger2</artifactId>
  • <version>2.8.0</version>
  • </dependency>
  • <dependency>
  • <groupId></groupId>
  • <artifactId>springfox-swagger-ui</artifactId>
  • <version>2.8.0</version>
  • </dependency>
  • </dependencies>
  • <!--第四步 项目构建的配置:常用插件 -->
  • <build>
  • <plugins>
  • <!-- Package as an executable jar/war -->
  • <plugin>
  • <groupId></groupId>
  • <artifactId>spring-boot-maven-plugin</artifactId>
  • <configuration>
  • <fork>true</fork>
  • <!-- 如果没有该项配置,devtools不会起作用,即应用不会restart -->
  • </configuration>
  • </plugin>
  • <plugin>
  • <groupId></groupId>
  • <artifactId>maven-war-plugin</artifactId>
  • <configuration>
  • <warSourceExcludes>src/main/resources/**</warSourceExcludes>
  • <warName>spring-boot-ajax</warName>
  • </configuration>
  • </plugin>
  • </plugins>
  • </build>
  • </project>