|
|
<?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.campus.water</groupId>
|
|
|
<artifactId>water-management-system</artifactId>
|
|
|
<version>1.0.0</version>
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
<name>Water Machine Management System</name>
|
|
|
<description>校园直饮矿化水物联网运维平台</description>
|
|
|
|
|
|
<parent>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
|
<version>3.3.5</version>
|
|
|
<relativePath/>
|
|
|
</parent>
|
|
|
|
|
|
<properties>
|
|
|
<java.version>23</java.version>
|
|
|
<maven.compiler.source>23</maven.compiler.source>
|
|
|
<maven.compiler.target>23</maven.compiler.target>
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
</properties>
|
|
|
|
|
|
<dependencies>
|
|
|
<!-- Spring Boot Starter Web -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 核心:添加参数校验依赖(解决javax.validation.Valid解析问题) -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-validation</artifactId>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- Spring Data JPA -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- Spring Integration Core -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.integration</groupId>
|
|
|
<artifactId>spring-integration-core</artifactId>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- Spring Integration MQTT -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.integration</groupId>
|
|
|
<artifactId>spring-integration-mqtt</artifactId>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- MySQL 驱动 -->
|
|
|
<dependency>
|
|
|
<groupId>com.mysql</groupId>
|
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
|
<version>8.0.33</version>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- MQTT Client -->
|
|
|
<dependency>
|
|
|
<groupId>org.eclipse.paho</groupId>
|
|
|
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
|
|
|
<version>1.2.5</version>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- FastJSON2 -->
|
|
|
<dependency>
|
|
|
<groupId>com.alibaba.fastjson2</groupId>
|
|
|
<artifactId>fastjson2</artifactId>
|
|
|
<version>2.0.43</version>
|
|
|
</dependency>
|
|
|
|
|
|
<!-- Lombok -->
|
|
|
<dependency>
|
|
|
<groupId>org.projectlombok</groupId>
|
|
|
<artifactId>lombok</artifactId>
|
|
|
<optional>true</optional>
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
<!-- 测试依赖 -->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
|
<scope>test</scope>
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-security</artifactId>
|
|
|
</dependency>
|
|
|
<dependency>
|
|
|
<groupId>io.jsonwebtoken</groupId>
|
|
|
<artifactId>jjwt-api</artifactId>
|
|
|
<version>0.11.5</version>
|
|
|
</dependency>
|
|
|
<dependency>
|
|
|
<groupId>io.jsonwebtoken</groupId>
|
|
|
<artifactId>jjwt-impl</artifactId>
|
|
|
<version>0.11.5</version>
|
|
|
<scope>runtime</scope>
|
|
|
</dependency>
|
|
|
<dependency>
|
|
|
<groupId>io.jsonwebtoken</groupId>
|
|
|
<artifactId>jjwt-jackson</artifactId>
|
|
|
<version>0.11.5</version>
|
|
|
<scope>runtime</scope>
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
<groupId>org.springdoc</groupId>
|
|
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
|
|
<version>2.2.0</version>
|
|
|
</dependency>
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
<build>
|
|
|
<sourceDirectory>src/main/java</sourceDirectory>
|
|
|
<resources>
|
|
|
<resource>
|
|
|
<directory>src/main/resources</directory>
|
|
|
</resource>
|
|
|
</resources>
|
|
|
<plugins>
|
|
|
<!-- 1. 编译插件:解决Lombok注解处理器问题 -->
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
<version>3.12.1</version>
|
|
|
<configuration>
|
|
|
<source>23</source>
|
|
|
<target>23</target>
|
|
|
<encoding>UTF-8</encoding>
|
|
|
<!-- 核心:Lombok注解处理器配置 -->
|
|
|
<annotationProcessorPaths>
|
|
|
<path>
|
|
|
<groupId>org.projectlombok</groupId>
|
|
|
<artifactId>lombok</artifactId>
|
|
|
<version>${lombok.version}</version>
|
|
|
</path>
|
|
|
</annotationProcessorPaths>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
|
|
|
<!-- 2. Spring Boot打包插件 -->
|
|
|
<plugin>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
<configuration>
|
|
|
<excludes>
|
|
|
<exclude>
|
|
|
<groupId>org.projectlombok</groupId>
|
|
|
<artifactId>lombok</artifactId>
|
|
|
</exclude>
|
|
|
</excludes>
|
|
|
<!-- 必加:指定启动类(替换为你的实际路径) -->
|
|
|
<mainClass>com.campus.water.CampusWaterApplication</mainClass>
|
|
|
</configuration>
|
|
|
<!-- 必加:生成可执行JAR -->
|
|
|
<executions>
|
|
|
<execution>
|
|
|
<goals>
|
|
|
<goal>repackage</goal>
|
|
|
</goals>
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
</plugins>
|
|
|
</build>
|
|
|
</project> |