drtrang / druid-spring-boot

Spring Boot Starter for Druid.
Apache License 2.0
312 stars 85 forks source link

什么时候针对boot2.0升级一下啊 #9

Closed jdonee closed 6 years ago

jdonee commented 6 years ago

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@61fafb74: startup date [Fri Nov 24 13:24:53 CST 2017]; root of context hierarchy at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:420) at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:95) at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:240) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:576) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:552) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:953) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:521) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.destroySingletons(FactoryBeanRegistrySupport.java:227) at org.springframework.beans.factory.support.AbstractBeanFactory.destroySingletons(AbstractBeanFactory.java) at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:960) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1035) at org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:562) at org.springframework.context.support.AbstractApplicationContext.jrLockAndRefresh(AbstractApplicationContext.java) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:387) at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) at com.riversdm.platform.admin.PlatformAdmin.main(PlatformAdmin.java:76) 13:24:54.619 [main] ERROR o.s.boot.SpringApplication - Application startup failed

jdonee commented 6 years ago

13:24:54.585 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.github.trang.druid.autoconfigure.DruidDataSourceConfiguration]; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/bind/RelaxedPropertyResolver 13:24:54.589 [main] ERROR o.s.b.f.s.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception

drtrang commented 6 years ago

SpringBoot 2.0 版本改动较大,基于普及情况和个人精力考虑,目前暂无计划跟进。 如有兴趣,欢迎提交基于 2.0 版本的 PR,成为该项目的 Contributor。 : )

loocao commented 6 years ago

+1

drtrang commented 6 years ago

SpringBoot 2.0 版本正式发布(Maven 中央仓库)后会跟进。

godpit commented 6 years ago

不是已经发布了有段时间么,还没有更新呀

drtrang commented 6 years ago

@godpit 这周会发布

drtrang commented 6 years ago

@godpit sorry,对形势预估失败,spring boot 2 改动较大,很多功能尚不清楚如何迁移,加上近期事情很多无法深入研究,所以该更新会 delay。

drtrang commented 6 years ago

@jdonee @loocao @godpit druid-spring-boot 已跟进 spring-boot2 的升级,敬请使用最新版的 starter。

<!-- spring boot 1.x -->
<dependency>
    <groupId>com.github.drtrang</groupId>
    <artifactId>druid-spring-boot-starter</artifactId>
    <version>1.1.8</version>
</dependency>

<!-- spring boot 2.x -->
<dependency>
    <groupId>com.github.drtrang</groupId>
    <artifactId>druid-spring-boot2-starter</artifactId>
    <version>1.1.8</version>
</dependency>
drtrang commented 6 years ago

支持 spring-boot 2.0 的 druid-starter 已发布,该 ISSUE 我暂时关闭了,如后续有问题请重新提问,谢谢。