pagehelper / pagehelper-spring-boot

pagehelper-spring-boot
MIT License
1.55k stars 311 forks source link

关于自动装配问题 #148

Closed livk-cloud closed 1 year ago

livk-cloud commented 1 year ago

SpringBoot3-M5删除了spring.factories的自动装配spring boot wiki 可以升级一下自动装配的方式嘛

abel533 commented 1 year ago

2.6

Changes to Auto-configuration Auto-configuration Registration If you have created your own auto-configurations, you should move the registration from spring.factories under the org.springframework.boot.autoconfigure.EnableAutoConfiguration key to a new file named META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. Rather than a single comma-separate list, each line contains the fully qualified name of an auto-configuration class. See the included auto-configurations for an example.

For backwards compatibility, entries in spring.factories will still be honored.

3.0

Auto-configuration Registration Spring Boot 2.7 introduced a new META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports file for registering auto-configurations, while maintaining backwards compatibility with registration in spring.factories. With this release, support for registering auto-configurations in spring.factories has been removed in favor of the imports file.

example

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

abel533 commented 1 year ago

https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.developing-auto-configuration