liu-peiyu / geek-framework

基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色、权限、会员管理、RestFul、Token和前台用户登录注册以及前后台用户分离的脚手架
Apache License 2.0
828 stars 415 forks source link

DataSource 不能自动注入啊 #1

Open classDawn opened 7 years ago

classDawn commented 7 years ago

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 commented 7 years ago

同样问题 启动不了

dazi005 commented 7 years ago

redis 那个 @Value 也是取不到值

liu-peiyu commented 7 years ago

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

liu-peiyu commented 7 years ago

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

39627020 commented 7 years ago

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

popshao commented 6 years ago

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

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