build: swagger

This commit is contained in:
2025-04-07 21:16:24 +08:00
parent fedaf3ae04
commit 7cf545bf44
3 changed files with 85 additions and 15 deletions

41
pom.xml
View File

@@ -8,6 +8,12 @@
<artifactId>metis</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
</parent>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
@@ -91,6 +97,16 @@
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
</dependencies>
<build>
@@ -99,7 +115,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.3.4</version>
<executions>
<execution>
<goals>
@@ -107,7 +122,18 @@
</goals>
</execution>
</executions>
</plugin>
<!-- 编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<!-- 注解静态编译功能 注:仅支持 maven-compiler-plugin 的 version 在3.6.0 以上才生效 -->
<annotationProcessorPaths>
<!-- 必须配置 lombok 的注解编译,否则会因为配置了(mapstruct-processor)启动了导致 lombok 对内部类的静态编译失效 -->
@@ -129,19 +155,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- 编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>