spring-projects / spring-projects/spring-boot
Inconsistent configuration report with bean registration phase checks
@snicoll is already working on this.
Since Jul 26, 2024.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
When caching is not enabled on a project, we get the following output:
RedisCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.RedisCacheConfiguration automatic cache type (CacheCondition)
NoOpCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration automatic cache type (CacheCondition)
SimpleCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration automatic cache type (CacheCondition)
GenericCacheConfiguration matched:
- Cache org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration automatic cache type (CacheCondition)
Ignoring the fact the Redis one should not be there in the first place (#13508), each of those configuration classes have a CacheManager bean and the configuration report does not have a reference to that in the "did not match" section.
When an auto-configuration does not match, then it's easy because it is in the non matched section. When it does and no bean was contributed, for instance because of a bean registration phase condition at class level that doesn't match, it would be nice to have some sort of indication.
Those are perhaps two separate issue in the end but we should at least make sure that reference to, e.g. SimpleCacheConfiguration#cacheManager, are available in the report.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.