1. 程式人生 > >【Kotlin】spring boot項目中,在Idea下啟動,報錯@Configuration class 'BugsnagClient' may not be final.

【Kotlin】spring boot項目中,在Idea下啟動,報錯@Configuration class 'BugsnagClient' may not be final.

post open conf png spa temp 技術 dea and

報錯如下:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: @Configuration class ‘BugsnagClient‘ may not be final. Remove the final modifier to continue.
Offending resource: class path resource [com/rollong/chinatower/server/exception/bugsnag/BugsnagClient.class]

代碼中應該:

請在fun前加上open

技術分享圖片

【Kotlin】spring boot項目中,在Idea下啟動,報錯@Configuration class 'BugsnagClient' may not be final.