2017年9月12日星期二

spring boot使用bazel编译运行时无法注入bean

使用到了azure-storage-spring-boot-starter中的bean,所以我增加了@ComponentScan({"com.xxx", "com.microsoft.azure"}),还是无法注入bean。

最后增加了@PropertySource("classpath:application.properties")显示指定application.properties文件(配置文件中有azure storage连接的配置)才解决问题。不知道啥原因,瞎打瞎碰解决了问题。

没有评论:

发表评论