snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Spring DI guide - ideas for enhancements #241

Closed snowdrop-bot closed 3 years ago

snowdrop-bot commented 3 years ago

I was playing a bit with Spring DI and Quarkus before Christmas. I took repo referenced from baeldung.com site, trimmed the code and pom.xml to use just di.spring package. After the trimming I tried to migrate source code to use quarkus-spring and then I tried to migrate tests. I have ideas for enhancements in Spring DI guide

Code is here: https://github.com/rsvoboda/tutorials/commits/experiments

@ComponentScan and @Import In https://github.com/rsvoboda/tutorials/commit/68c9f76fdcd181b4dc913977f564f09705784beb I had to comment out org.springframework.context.annotation.ComponentScan and org.springframework.context.annotation.Import stuff

Based on the discussion with @geoand, @ComponentScan is entirely unnecessary because of the build time processing. @Import is not supported as we don't support XML config.

Info about @ComponentScan and @Import should be added into https://quarkus.io/guides/spring-di#conversion-table or nearby. People without Quarkus context won't know the above details and it will make Quarkus onboarding easier.

ApplicationContext There is nothing about org.springframework.context.ApplicationContext in our guides. We don't support that - it's too tied to Spring internals. Spring DI guide should provide some context and explain into what ApplicationContext translates in Arc / Quarkus DI world.

Testing For tests, we don't support any of the Spring testing stuff. It's just so different than what we have in Quarkus. https://quarkus.io/guides/getting-started-testing could be linked from the guide.


https://github.com/quarkusio/quarkus/issues/14221


$upstream:14221$