添加Knife

This commit is contained in:
huangge1199 2025-08-05 11:17:20 +08:00
parent 772398d225
commit 5478a347b8
3 changed files with 29 additions and 2 deletions

10
pom.xml
View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.4</version> <version>3.2.4</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>iet.ustb.sf</groupId> <groupId>iet.ustb.sf</groupId>
@ -43,6 +43,7 @@
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.38</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
@ -50,6 +51,13 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- Knife -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1 +0,0 @@
spring.application.name=iet-kpi-service

View File

@ -0,0 +1,20 @@
spring:
application:
name: iet-kpi-service
profiles:
active: dev
server:
port: 9900
servlet:
context-path: /api
# springdoc-openapi????
springdoc:
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: iet.ustb.sf.controller
# knife4j???????????????
knife4j:
enable: true
setting:
language: zh_cn