@Configuration class 'CustConfiguer' may not be final
时间: 2024-01-28 08:03:28 浏览: 110
引用\[1\]中的报错信息是关于一个@Configuration类被标记为final的问题。在Kotlin中,默认情况下,所有的类和方法都是final的,不能直接继承或重写。而@SpringBootApplication注解中使用了@Configuration注解,所以被标记为final的类会导致报错。\[2\]
@Configuration是一个被@Component注解修饰的注解,它用于标识一个类是一个配置类,其中包含了一些用@Bean注解修饰的方法,用于定义和配置Bean。\[3\]
所以,如果你想使用@Configuration注解修饰的类,你需要将该类的final修饰符移除,以解决报错问题。
#### 引用[.reference_title]
- *1* [spring boot项目中,在Idea下启动,报错@Configuration class 'BugsnagClient' may not be final....](https://blog.csdn.net/weixin_33774308/article/details/85976954)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [springboot+kotlin 启动报错:Configuration problem: @Configuration class 'Application' may not be final](https://blog.csdn.net/qq_39089503/article/details/82786002)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [【spring】@Configuration的使用与原理](https://blog.csdn.net/u022812849/article/details/123729178)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文