2.3 Configuration of the sample

dependency yue-library-base module: application-yue-library-base.yml

server:
  tomcat:
    remote:
      port-header: GET, POST, PUT, DELETE
spring:
  servlet:
    multipart:
      max-file-size: 512MB
      max-request-size: 1024MB

dependency yue-library-data-jdbc module: application-yue-library-data-jdbc.yml

spring:
  profiles:
    include:
      - yue-library-base
  datasource:
    druid:
      filter:
        slf4j:
          enabled: true
          statement-prepare-after-log-enabled: false
          statement-execute-query-after-log-enabled: false
          statement-executable-sql-log-enable: true
logging:
  level:
    druid.sql.Statement: DEBUG

I want to activate both application-yue-library-base.yml and application-yue-library-data-jdbc.yml, Just add the following configuration to the application.yml:

spring:
  profiles:
    include:
    - yue-library-data-jdbc

2.4 Configuration of the sample

dependency yue-library-base module: application-yue-library-base.yml

server:
  tomcat:
    remote:
      port-header: GET, POST, PUT, DELETE
spring:
  config:
    activate:
      on-profile: yue-library-base

dependency yue-library-data-jdbc module: application-yue-library-data-jdbc.yml

spring:
  config:
    activate:
      on-profile: yue-library-data-jdbc
  datasource:
    druid:
      filter:
        slf4j:
          enabled: true
          statement-prepare-after-log-enabled: false
          statement-execute-query-after-log-enabled: false
          statement-executable-sql-log-enable: true
logging:
  level:
    druid.sql.Statement: DEBUG

I want to activate both application-yue-library-base.yml and application-yue-library-data-jdbc.yml, I need to configure this:

spring:
  application:
    name: yue-library-test
  profiles:
    group:
      "test": "yue-library-base,yue-library-data-jdbc"
    active: test

expect

2.3, I just needed include: yue-library-data-jdbc 2.4, I need to includes: yue-library-base,yue-library-data-jdbc

Comment From: philwebb

I think we cover this in https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide#profile-groups. Specifically "As discussed above, it’s no longer possible to use spring.profiles.include in a profile-specific document so this file isn’t valid."

Comment From: yl-yue

I think we cover this in https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide#profile-groups. Specifically "As discussed above, it’s no longer possible to use spring.profiles.include in a profile-specific document so this file isn’t valid."

Hello, maybe I didn't describe the requirements clearly, so let me give you a concise example of module dependencies: DDDDDD -> CCCCCC -> BBBBBB -> AAAAAA

2.3

spring:
  profiles:
    include:
    - DDDDDD

2.4

spring:
  profiles:
    group:
      "test": "DDDDDD,CCCCCC,BBBBBB,AAAAAA"
    active: test

In 2.4, I need to declare each module, whereas in 2.3, I only need to declare the module 'DDDDDD'