Skip to content
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

Deprecated Annotations entfernen #1223

Closed
4 tasks done
MasterEvarior opened this issue Nov 28, 2024 · 1 comment · Fixed by #1271
Closed
4 tasks done

Deprecated Annotations entfernen #1223

MasterEvarior opened this issue Nov 28, 2024 · 1 comment · Fixed by #1271
Assignees

Comments

@MasterEvarior
Copy link
Collaborator

MasterEvarior commented Nov 28, 2024

Mit dem Upgrade auf Spring Boot 3.4.0 wurden die @MockBean und @SpyBean Annotations als deprecated markiert. Sie werden mit Version 3.6.0 entfernt. Deshalb sollen deshalb mit MockitoBean bzw. MockitoSpyBean ersetzt werden.

Damit wird sichergestellt, dass das Upgrade auf 3.6.0 einfacher verläuft.

Weiter Infos aus den Release-Notes:

@MockBean and @SpyBean have been deprecating in favor of @MockitoBean and @MockitoSpyBean in Spring Framework. The functionality provided by the Spring Framework annotations is not exactly the same as that offered by Spring Boot. For example, @MockitoBean is not yet supported on @Configuration classes and you may need to migrate to annotating fields on a test class instead.

Anforderungen

  • @MockBean muss durch @MockitoBean ersetzt werden, wo es supported ist
  • @SpyBean muss durch @MockitoSpyBean ersetzt werden, wo es supported ist
  • Die Tests funktionieren weiterhin

Akzeptanzkriterien

  • Es gibt keine @MockBean Annotations mehr (Ausnahme: @Configuration)
  • Es gibt keine @SpyBean Annotations mehr (Ausnahme: @Configuration)
  • Es wurden keine Tests entfernt, falls es sich vermeiden lässt
  • Tests laufen alle durch
@nevio18324 nevio18324 self-assigned this Jan 7, 2025
@nevio18324
Copy link
Collaborator

nevio18324 commented Jan 7, 2025

Todo's

  • Nachlesen ob die Annotations irgendeinen sehr grossen Unterschied haben
  • MockBean Annotations mit MockitoBean ersetzten
  • SpyBean Annotations mit MockitoSpyBean ersetzten
  • auftretende bugs fixen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants