feat :AIOJ 后端模块并更新项目结构
- 引入了新模块:gateway、judge service、question service、user service 和 UPMS。 - 在 gateway 和 user service 模块中创建了 package-info.java 文件用于文档说明。 - 更新了 pom.xml 文件以反映新的模块结构和依赖关系。 - 在 UserController 中实现了基本的用户资料管理端点。 - 为每个新模块添加了扁平化 POM 文件以有效管理依赖。 - 增强了项目属性,以实现更好的版本管理和模块间一致性。
This commit is contained in:
109
pom.xml
109
pom.xml
@@ -3,18 +3,21 @@
|
||||
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>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.5.7</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<groupId>cn.meowrain</groupId>
|
||||
|
||||
<groupId>cn.meowrain.aioj</groupId>
|
||||
<artifactId>ai-oj</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>ai-oj-microservices</name>
|
||||
<description>一款集成了AI功能的OJ判题系统</description>
|
||||
|
||||
<modules>
|
||||
<module>aioj-backend-common</module>
|
||||
<module>aioj-backend-gateway</module>
|
||||
@@ -24,51 +27,54 @@
|
||||
<module>aioj-backend-ai-service</module>
|
||||
<module>aioj-backend-auth</module>
|
||||
<module>aioj-backend-upms</module>
|
||||
<module>aioj-backend-common/aioj-backend-common-swagger</module>
|
||||
<module>aioj-backend-file-service</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<!-- ==================== 项目基础配置 ==================== -->
|
||||
<revision>1.0.0</revision>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<!-- ==================== Spring生态版本 ==================== -->
|
||||
<spring-boot.version>3.5.7</spring-boot.version>
|
||||
<spring-cloud.version>2025.0.0</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2025.0.0.0</spring-cloud-alibaba.version>
|
||||
|
||||
<!-- ==================== 构建插件版本 ==================== -->
|
||||
<spring.checkstyle.plugin>0.0.47</spring.checkstyle.plugin>
|
||||
<git.commit.plugin>9.0.2</git.commit.plugin>
|
||||
<maven.compiler.plugin.version>3.14.1</maven.compiler.plugin.version>
|
||||
<jib.plugin.version>3.4.5</jib.plugin.version>
|
||||
<flatten.plugin.version>1.6.0</flatten.plugin.version>
|
||||
|
||||
<!-- ==================== Docker配置 ==================== -->
|
||||
<docker.spring.active>dev</docker.spring.active>
|
||||
</properties>
|
||||
|
||||
<!-- 全局依赖:所有子模块都会继承 -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- AIOJ 内部模块BOM (优先级最高,放在最前面) -->
|
||||
<dependency>
|
||||
<groupId>cn.meowrain.aioj</groupId>
|
||||
<artifactId>aioj-backend-common-bom</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>${revision}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!--Spring
|
||||
Boot依赖-->
|
||||
|
||||
<!-- Spring Boot 依赖管理 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
@@ -76,9 +82,8 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- Spring Cloud依赖-->
|
||||
<!--
|
||||
https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies -->
|
||||
|
||||
<!-- Spring Cloud 依赖管理 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
@@ -86,6 +91,8 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Cloud Alibaba 依赖管理 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
@@ -102,27 +109,55 @@
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<!-- Java 编译插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.14.1</version>
|
||||
<version>${maven.compiler.plugin.version}</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Spring Boot Maven 插件 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</plugin>
|
||||
<!--
|
||||
代码格式插件,默认使用spring 规则,可运行命令进行项目格式化:./mvnw spring-javaformat:apply 或 mvn
|
||||
spring-javaformat:apply,可在IDEA中安装插件以下插件进行自动格式化:
|
||||
https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin
|
||||
-->
|
||||
|
||||
<!-- Flatten 插件:处理 ${revision} 变量 -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>${flatten.plugin.version}</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- 代码格式插件 -->
|
||||
<plugin>
|
||||
<groupId>io.spring.javaformat</groupId>
|
||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||
@@ -135,8 +170,7 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--打包jar
|
||||
与git commit 关联插件-->
|
||||
<!-- Git Commit 信息插件 -->
|
||||
<plugin>
|
||||
<groupId>io.github.git-commit-id</groupId>
|
||||
<artifactId>git-commit-id-maven-plugin</artifactId>
|
||||
@@ -150,7 +184,6 @@
|
||||
<configuration>
|
||||
<failOnNoGitDirectory>false</failOnNoGitDirectory>
|
||||
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
||||
<!--因为项目定制了jackson的日期时间序列化/反序列化格式,因此这里要进行配置,不然通过management.info.git.mode=full进行完整git信息监控时会存在问题-->
|
||||
<dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
|
||||
<includeOnlyProperties>
|
||||
<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
|
||||
@@ -159,12 +192,14 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!-- JIB Docker 镜像构建插件 -->
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>3.4.5</version>
|
||||
<version>${jib.plugin.version}</version>
|
||||
<configuration>
|
||||
<allowInsecureRegistries>true</allowInsecureRegistries>
|
||||
<from>
|
||||
|
||||
Reference in New Issue
Block a user