Consider defining a bean of type 'hgx.parent.parent.properties.**' in your configuration

錯誤是在類中企圖使用

@ConfigurationProperties(prefix = "hgx.security")加載,配置文件中的屬性,但是一直報錯

Description:

Field securityProperties in hgx.parent.parent.Validate.ValidateCodeFilter required a bean of type 'hgx.parent.parent.properties.SecurityProperties' that could not be found.


Action:

Consider defining a bean of type 'hgx.parent.parent.properties.SecurityProperties' in your configuration.
 

 

在啓動類中加入

@ComponentScan({"hgx.parent.parent.properties"})即可解決。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章