springboot Environment注入異常

error

***************************
APPLICATION FAILED TO START
***************************

Description:

Field environment in com.xxx.Environment required a bean of type 'org.springframework.core.env.Environment' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.core.env.Environment' in your configuration.

fix

緣由是有bean命名爲environment跟spring的重複了,須要改一下spring

doc

相關文章
相關標籤/搜索