Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataSource 不能自动注入啊 #1

Open
classDawn opened this issue May 31, 2017 · 6 comments
Open

DataSource 不能自动注入啊 #1

classDawn opened this issue May 31, 2017 · 6 comments

Comments

@classDawn
Copy link

classDawn commented May 31, 2017

2017-05-31 23:47:20.137 ERROR 8136 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7205765b: startup date [Wed May 31 23:47:19 CST 2017]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) [spring-context-4.3.7.RELEASE.jar:4.3.7.RELEASE]

这是什么问题

@dazi005
Copy link

dazi005 commented Jun 4, 2017

同样问题 启动不了

@dazi005
Copy link

dazi005 commented Jun 4, 2017

redis 那个 @value 也是取不到值

@liu-peiyu
Copy link
Owner

liu-peiyu commented Jun 26, 2017

@dazi005 redis哪个不用配置也可以启动,只是为了作集群存储用户信息用的,基础的系统用不到redis

@liu-peiyu
Copy link
Owner

@classDawn @dazi005 启动前需要先配置数据源,另外启动的时候需要增加启动参数--spring.profiles.active=dev 或 pro

@39627020
Copy link

39627020 commented Sep 4, 2017

我是把spring.profiles.active=dev直接写到application.properties里面的,然后通过sts直接运行就可以了

@popshao
Copy link

popshao commented May 14, 2018

Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.

现在下载还是会出这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants