Skip to content

Implement search for all @Configuration classes in Spring project #1934

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Mar 14, 2023

Conversation

IlyaMuravjov
Copy link
Collaborator

Description

Fixes #1921

Implemented BaseTestsModel.getSortedSpringConfigurationClasses() method that searches for classes marked with @Configuration and @TestConfiguration annotations in source module and its test modules.

Classes are sorted in the following order:

  • Classes marked with @TestConfiguration annotation
  • Classes marked with @Configuration annotation

Inside one group classes are sorted by their roots in the following order:

  • Classes from test roots
  • Classes from source roots

Classes from the test roots are additionally sorted by their roots in the order provided by BaseTestsModel.getSortedTestRoots()

How to test

Standard regression checks on regression tests.

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

@IlyaMuravjov IlyaMuravjov added ctg-enhancement New feature, improvement or change request comp-spring Issue is related to Spring projects support labels Mar 13, 2023
@EgorkaKulikov EgorkaKulikov enabled auto-merge (squash) March 14, 2023 08:19
@EgorkaKulikov EgorkaKulikov merged commit c47781e into main Mar 14, 2023
@EgorkaKulikov EgorkaKulikov deleted the ilya_m/search_spring_configuration_classes branch March 14, 2023 08:32
@alisevych alisevych added this to the 2023.03 Release milestone Mar 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
comp-spring Issue is related to Spring projects support ctg-enhancement New feature, improvement or change request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find all @Configuration classes in Spring project
3 participants