dubbo springboot ,IllegalStateException: ApplicationConfig.application == null

4033 단어 문제 및 이상
400.100, 예외 환경
dubbo-spring-boot-starter:0.2.0
spring-boot-starters:2.0.3.RELEASE
JDK 8

400.200, 이상 세부 정보:
console- 2018-08-10 09:55:12.222 [ERROR] [main]  org.springframework.boot.SpringApplication[SpringApplication.java:842] - Application run failed
java.lang.IllegalStateException: ApplicationConfig.application == null
	at com.alibaba.dubbo.config.AbstractConfig.appendParameters(AbstractConfig.java:246)
	at com.alibaba.dubbo.config.AbstractConfig.appendParameters(AbstractConfig.java:181)
	at com.alibaba.dubbo.config.AbstractInterfaceConfig.loadRegistries(AbstractInterfaceConfig.java:175)
	at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:356)
	at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:317)
	at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:216)
	at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:123)
	at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:49)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
	at com.xxx.xx.xxxBusServerApplication.main(IxxBusServerApplication.java:34)
Caused by: java.lang.IllegalStateException: ApplicationConfig.application == null
	at com.alibaba.dubbo.config.AbstractConfig.appendParameters(AbstractConfig.java:231)
	... 22 common frames omitted

400.300, 이상 원인
dubbo 구성:
│        dubbo.application.name = ${spring.profiles.active}-bus-service │        dubbo.protocol.id = dubbo │        dubbo.protocol.name = dubbo │        dubbo.protocol.port = 20886 │        dubbo.protocol.register = true │        dubbo.registry.address = │        dubbo.registry.group = smsroot_${spring.profiles.active} │        dubbo.registry.id = ${spring.profiles.active}-registry
----------------------------------------------------------------------------------------------------
dubbo 설정에 변수를 사용했기 때문에 정규 검사를 통과할 수 없습니다.
checkProperty:405, AbstractConfig {com.alibaba.dubbo.config}
              |-- application.name 부적합 정규 [\-._0-9a-zA-Z]+, 예외 던지기
|--bind:79, JavaBeanBinder {org.springframework.boot.context.properties.bind} 이상 계속 던지기
|--withIncreasedDepth:444, Binder$Context(org.springframework.boot.context.properties.bind)catch 이상이 없음(무시됨), 직접finally.그래서 마지막으로 AbstractConfig가 제대로 초기화되지 않았습니다.
checkName:362, AbstractConfig {com.alibaba.dubbo.config} setName:96, ApplicationConfig {com.alibaba.dubbo.config}
400.400, 이상 해결
dubbo의 설정은 모두 상수를 사용합니다
 

좋은 웹페이지 즐겨찾기