1.spring boot配置disconf需要在启动类上配置读取xml的入口注解:@ImportResource({"classpath:spring-disconf.xml"})

package com.zpark;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author cosmo
 * @Title: SptingbootApplication
 * @ProjectName
 * @Description: Sptingboot启动类
 * @date 2019/1/2211:11
 */
@SpringBootApplication
@EnableScheduling
@ImportResource({"classpath:spring-disconf.xml"})
public class SptingbootApplication {
    public static void main(String[] args) {
        SpringApplication.run(PacificServiceApplication.class, args);
    }
}

 

剩下的跟spring集成disconf的步骤都是一样的,详情参见:Spring MVC 集成Disconf

相关文章:

  • 2021-09-12
  • 2021-12-16
  • 2022-12-23
  • 2021-10-21
  • 2021-12-20
  • 2021-07-25
  • 2021-12-01
  • 2021-05-04
猜你喜欢
  • 2021-06-23
  • 2021-11-21
  • 2022-12-23
  • 2021-11-19
  • 2022-01-14
  • 2022-12-23
  • 2021-05-19
相关资源
相似解决方案