升级:简化微服务切换,增加profile模式 SpringCloud

pull/3602/head
zhangdaiscott 2022-03-30 13:45:43 +08:00
parent 1481b86fb3
commit 6196f0a463
5 changed files with 42 additions and 21 deletions

View File

@ -53,7 +53,7 @@ Jeecg-Boot低代码开发平台可以应用在任何J2EE项目的开发中
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [常见问题 ](http://www.jeecg.com/doc/qa) | [技术支持](http://jeecg.com/doc/help) | [1分钟体验低代码](https://my.oschina.net/jeecg/blog/3083313) - 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [常见问题 ](http://www.jeecg.com/doc/qa) | [技术支持](http://jeecg.com/doc/help) | [1分钟体验低代码](https://my.oschina.net/jeecg/blog/3083313)
- 微服务开发: [单体切换为微服务](http://doc.jeecg.com/2043906) - 微服务开发: [单体切换为微服务](http://doc.jeecg.com/2704725)
- QQ交流群 ⑤860162132、683903138(VUE3版)、~~④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)~~ - QQ交流群 ⑤860162132、683903138(VUE3版)、~~④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)~~

View File

@ -16,14 +16,19 @@
<groupId>org.jeecgframework.boot</groupId> <groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-base-core</artifactId> <artifactId>jeecg-boot-base-core</artifactId>
</dependency> </dependency>
<!--引入微服务启动依赖 starter
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-cloud</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-job</artifactId>
</dependency>-->
</dependencies> </dependencies>
<profiles>
<profile>
<id>SpringCloud</id>
<!-- 引入微服务启动 Starter依赖 -->
<dependencies>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-cloud</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project> </project>

View File

@ -54,7 +54,7 @@
<dependency> <dependency>
<groupId>org.jeecgframework.jimureport</groupId> <groupId>org.jeecgframework.jimureport</groupId>
<artifactId>jimureport-spring-boot-starter</artifactId> <artifactId>jimureport-spring-boot-starter</artifactId>
<version>1.4.32</version> <version>1.4.4-beta</version>
</dependency> </dependency>
@ -73,8 +73,8 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<!--微服务模式下修改为true,跳过打包插件,否则微服务模块无法引用--> <!--微服务模式下修改为true,跳过SpringBoot启动打包插件,否则微服务模块无法引用-->
<skip>false</skip> <skip>${skip.springboot.maven}</skip>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -28,6 +28,13 @@
<dependency> <dependency>
<groupId>org.jeecgframework.boot</groupId> <groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-module-system</artifactId> <artifactId>jeecg-boot-module-system</artifactId>
<!-- 排除demo模块demo模块采用微服务方式独立启动 -->
<exclusions>
<exclusion>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-module-demo</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!-- 测试模块依赖 --> <!-- 测试模块依赖 -->

View File

@ -4,6 +4,7 @@
<artifactId>jeecg-boot-parent</artifactId> <artifactId>jeecg-boot-parent</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>JEECG BOOT ${project.version}</name>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -14,6 +15,8 @@
<properties> <properties>
<jeecgboot.version>3.1.0</jeecgboot.version> <jeecgboot.version>3.1.0</jeecgboot.version>
<!-- 微服务专用属性 -->
<skip.springboot.maven>false</skip.springboot.maven>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud.version>Hoxton.SR8</spring-cloud.version> <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
@ -56,9 +59,6 @@
<module>jeecg-boot-base</module> <module>jeecg-boot-base</module>
<module>jeecg-boot-module-demo</module> <module>jeecg-boot-module-demo</module>
<module>jeecg-boot-module-system</module> <module>jeecg-boot-module-system</module>
<!--需要微服务,请打开
<module>jeecg-boot-starter</module>
<module>jeecg-cloud-module</module>-->
</modules> </modules>
<distributionManagement> <distributionManagement>
@ -296,11 +296,7 @@
<build> <build>
<plugins> <plugins>
<!--<plugin> <!-- 指定JDK编译版本 -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
指定JDK编译版本 -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
@ -420,5 +416,18 @@
<discovery.server-addr>jeecg-boot-nacos:8848</discovery.server-addr> <discovery.server-addr>jeecg-boot-nacos:8848</discovery.server-addr>
</properties> </properties>
</profile> </profile>
<!-- SpringCloud运行环境 -->
<profile>
<id>SpringCloud</id>
<properties>
<!--微服务模式下修改为true, system模块跳过打包插件否则微服务无法引用-->
<skip.springboot.maven>true</skip.springboot.maven>
</properties>
<modules>
<!-- 微服务模块 -->
<module>jeecg-boot-starter</module>
<module>jeecg-cloud-module</module>
</modules>
</profile>
</profiles> </profiles>
</project> </project>