|
217 | 217 | url: https://quarkus.io/guides/maven-tooling#build-tool-maven; |
218 | 218 | springboot-annotations-to-quarkus-00000: |
219 | 219 | category: mandatory |
220 | | - description: Remove the SpringBoot @SpringBootApplication annotation |
| 220 | + description: Replace SpringBootApplication bootstrap model with Quarkus bootstrap |
| 221 | + and CDI |
221 | 222 | effort: 1 |
222 | 223 | incidents: |
223 | 224 | - codeSnip: 6 @SpringBootApplication |
224 | 225 | lineNumber: 6 |
225 | | - message: "Remove the SpringBoot @SpringBootApplication annotation.\n\n A Spring\ |
226 | | - \ Boot application contains a \"main\" class with the @SpringBootApplication\ |
227 | | - \ annotation. A Quarkus application does not have such a class. Two different\ |
228 | | - \ alternatives can be followed - either\n to remove the \"main\" class associated\ |
229 | | - \ with the annotation, or add the `org.springframework.boot:spring-boot-autoconfigure`\ |
230 | | - \ dependency as an `optional` Maven dependency. An optional dependency \n\ |
231 | | - \ is available when an application compiles but is not packaged with the\ |
232 | | - \ application at runtime. Doing this would allow the application to compile\ |
233 | | - \ without modification, but you\n would also need to maintain a Spring version\ |
234 | | - \ along with the Quarkus application." |
| 226 | + message: "Remove or refactor the SpringBoot `@SpringBootApplication` bootstrap model for Quarkus.\n\n\ |
| 227 | + `@SpringBootApplication` combines three concerns; in Quarkus they map differently:\n\ |
| 228 | + - `@EnableAutoConfiguration`: Quarkus configures features by adding Quarkus extensions at build time (no Spring Boot auto-configuration runtime model).\n\ |
| 229 | + - `@ComponentScan`: Quarkus uses CDI bean discovery with bean-defining annotations (for example `@ApplicationScoped`, `@Singleton`), not Spring component scanning semantics.\n\ |
| 230 | + - `@SpringBootConfiguration`: use CDI scopes and producer methods (`@Produces`) for bean registration; for tests, use Quarkus testing patterns instead of Spring Boot configuration detection.\n\n\ |
| 231 | + If needed as an intermediate step, keeping `org.springframework.boot:spring-boot-autoconfigure` as `optional` may allow compilation, but this keeps Spring compatibility baggage and should not be the target end state." |
235 | 232 | uri: src/main/java/com/telran/application/BookServerApp.java |
236 | 233 | labels: |
237 | 234 | - konveyor.io/source=springboot |
238 | 235 | - konveyor.io/target=quarkus |
| 236 | + links: |
| 237 | + - title: Quarkus CDI reference |
| 238 | + url: https://quarkus.io/guides/cdi-reference |
| 239 | + - title: Quarkus Spring DI guide |
| 240 | + url: https://quarkus.io/guides/spring-di |
| 241 | + - title: Quarkus testing guide |
| 242 | + url: https://quarkus.io/guides/getting-started-testing |
239 | 243 | springboot-di-to-quarkus-00000: |
240 | | - category: potential |
| 244 | + category: mandatory |
241 | 245 | description: Replace the SpringBoot Dependency Injection artifact with Quarkus |
242 | 246 | 'spring-di' extension |
243 | 247 | effort: 1 |
|
0 commit comments