Spring Boot 3 集成 Knife4j

时间:2025-04-27 09:41:31
<?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> <parent> <groupId></groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.0.6</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId></groupId> <artifactId>gis-java-mp</artifactId> <version>0.0.1-SNAPSHOT</version> <name>gis-java-mp</name> <description>Demo project for Spring Boot</description> <properties> <>17</> </properties> <dependencies> <!-- /artifact//spring-boot-starter-web --> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId></groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.3</version> <exclusions> <exclusion> <groupId></groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </exclusion> </exclusions> </dependency> <!-- 多数据源配置 --> <dependency> <groupId></groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.6.1</version> <exclusions> <exclusion> <groupId></groupId> <artifactId>spring-boot-starter-aop</artifactId> </exclusion> <exclusion> <groupId></groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </exclusion> </exclusions> </dependency> <!-- 代码自动生成 start --> <dependency> <groupId></groupId> <artifactId>mybatis-plus-generator</artifactId> <version>3.5.3</version> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-jdbc</artifactId> <version>2.1.</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.16</version> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-freemarker</artifactId> <version>3.1.5</version> </dependency> <!-- 代码自动生成 end --> <dependency> <groupId></groupId> <artifactId>lombok</artifactId> <version>1.18.24</version> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId></groupId> <artifactId>spring-boot-autoconfigure</artifactId> <version>3.0.0</version> </dependency> <!-- Spring Boot 3 集成 Knife4j start --> <dependency> <groupId></groupId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> </dependency> <!-- Spring Boot 3 集成 Knife4j end --> <dependency> <groupId></groupId> <artifactId>hutool-all</artifactId> <version>5.8.10</version> </dependency> <!-- <dependency> <groupId></groupId> <artifactId>gson</artifactId> </dependency> --> </dependencies> <repositories> <repository> <id>nexus-maven</id> <name>nexus-maven</name> <url>/content/repositories/snapshots/</url> </repository> </repositories> <!-- Spring Boot 3 集成 Knife4j start --> <dependencyManagement> <dependencies> <dependency> <groupId></groupId> <artifactId>knife4j-dependencies</artifactId> <version>4.3.0-SNAPSHOT</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <!-- Spring Boot 3 集成 Knife4j end --> <build> <finalName>gis-mp</finalName> <plugins> <plugin> <groupId></groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>.Knife4jSpringBoot3DemoApplication</mainClass> </configuration> </plugin> </plugins> </build> </project>