-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Constructor injection in JUnit Jupiter test classes without @Autowired #26309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
FYI, official document has a section for constructor injection in test with JUnit5. |
derp, I are dumb... though I see now what I was really remembering... not wanting to have to put |
@xenoterracide there is really no need to qualify your issue with something in brackets in the description, the team can triage the issue based on title and a description. This was discussed before, more context in #22924 |
I'm not sure if you read the entire documentation on the subject, but you do not have to annotate constructors with
If you're talking about test annotations in Spring Boot, then yes. Most if not all of the test related annotations in Spring Boot Test are meta-annotated with |
well, currently I'm using On a related note, if anyone has any ideas about this https://stackoverflow.com/q/65418290/206466. I've tried quite a few things :'( . However this isn't the place for questions, though having read over the docs in spring security on webmvc integration a couple of times I wonder if the docs there couldn't be improved. |
Juni5 5 supports constructor injection, it would be nice if springs test harness supported it, so you could write spring tests in the same way you write other classes in both junit and spring core. note: I searched this repo and google and didn't find anything.
The text was updated successfully, but these errors were encountered: