I've a app with spring boot tests, can I enforce the number of times that spring boot is loaded? so if someone will load another spring boot I'll will warn about it.
The question is a bit general and my answer may be not exactly what is wanted.
With
logging.level.org.springframework.test.context.cache: debug
you can monitor how many contexts are loaded, for example this project use 7 contexts:
Spring test ApplicationContext cache statistics: [DefaultContextCache@3655a68c size = 7, maxSize = 32, parentContextCount = 0, hitCount = 1780, missCount = 7]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With