We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议同时采用聚合和继承,使用<dependencyManagement> 管理 spring-boot-dependencies,这样可以更方便的管理 SpringBoot 版本,也方便约束一些其它包(比如 mybatis-plus-boot-starter )的版本,
<dependencyManagement>
spring-boot-dependencies
mybatis-plus-boot-starter
比如/spring-boot-examples/pom.xml:
/spring-boot-examples/pom.xml
<project> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>spring-boot-examples</artifactId> <version>2.0.0</version> <packaging>pom</packaging> <modules> <module>spring-boot-redis</module> </modules> <properties> <java.version>11</java.version> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>2.3.7.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> </project>
/spring-boot-examples/spring-boot-redis/pom.xml:
/spring-boot-examples/spring-boot-redis/pom.xml
<project > <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.example</groupId> <artifactId>spring-boot-examples</artifactId> <version>2.0.0</version> </parent> <artifactId>spring-boot-redis</artifactId> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> </project>
The text was updated successfully, but these errors were encountered:
模块管理还是很重要。 有很多包阿里镜像没有,想改一下版本发现每个模块的依赖都是独立的,很尴尬。 最后只能开代理从官方仓库中下载解决。
Sorry, something went wrong.
是的, 如果 spring-boot-examples 下没有 pom 还好, 既然选择了 module 还是完善更好些.
No branches or pull requests
建议同时采用聚合和继承,使用
<dependencyManagement>
管理spring-boot-dependencies
,这样可以更方便的管理 SpringBoot 版本,也方便约束一些其它包(比如mybatis-plus-boot-starter
)的版本,比如
/spring-boot-examples/pom.xml
:/spring-boot-examples/spring-boot-redis/pom.xml
:The text was updated successfully, but these errors were encountered: