简体   繁体   中英

Can we load XML beans for spring data source according to our CONFIG_MODE in Spring Boot application?

VM argument is: -DCONFIG_MODE=DEV

Can I load my respective ${CONFIG_MODE}/spring-config.${CONFIG_MODE}.XML file and get the required beans in spring boot application?

the springboot project default use @artifactId@-@profiles.active@.yml,so u can follow this rule

spring:
  application:
    name: @artifactId@
  profiles:
    active: @profiles.active@

if @artifactId@ is testproject and @profiles.active@ is dev so result testproject-dev.yml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM