Skip to content
New issue

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

代码生成器jar包中携带配置文件导致 spring.profiles.active 被覆盖 #6010

Closed
ice2shell opened this issue Mar 19, 2024 · 1 comment

Comments

@ice2shell
Copy link

版本号:

3.6.3

前端版本:vue3版?还是 vue2版?

3.6.3

问题描述:

spring.profiles.active 在 application.yaml 文件定义后,启动项目发现值固定为 dev。
原因在于:
org.jeecgframework.boot:codegenerate 1.4.6 jar包中携带了 application.yml 和 application-dev.yml文件。其中application.yml有如下配置:

spring:
  application:
    name: jeecg-system
  profiles:
    active: dev

按照spring boot 外部化配置的加载原则,这样会导致同名配置被该jar包中配置文件中的值覆盖。所以,该jar包中不应该携带这些应用的配置。

截图&代码:

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能;
@ice2shell ice2shell changed the title jeecg-boot 3.6.3代码生成器jar包中携带配置文件导致 spring.profiles.active 被覆盖 代码生成器jar包中携带配置文件导致 spring.profiles.active 被覆盖 Mar 19, 2024
@zhangdaiscott
Copy link
Member

换成这个版本

<dependency>
  <groupId>org.jeecgframework.boot</groupId>
  <artifactId>codegenerate</artifactId>
  <version>1.4.7</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants