MutatingResourceBanner Class — spring-boot Architecture
Architecture documentation for the MutatingResourceBanner class in ResourceBannerTests.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java lines 215–242
static class MutatingResourceBanner extends MockResourceBanner {
MutatingResourceBanner(Resource resource, String bootVersion, @Nullable String applicationTitle) {
super(resource, bootVersion, applicationTitle);
}
@Override
protected List<PropertyResolver> getPropertyResolvers(Environment environment, @Nullable Class<?> sourceClass) {
List<PropertyResolver> resolvers = super.getPropertyResolvers(environment, sourceClass);
PropertyResolver resolver = new AbstractPropertyResolver() {
@Override
@SuppressWarnings("unchecked")
public <T> @Nullable T getProperty(String key, Class<T> targetType) {
return String.class.equals(targetType) ? (T) getPropertyAsRawString(key) : null;
}
@Override
protected @Nullable String getPropertyAsRawString(String key) {
return ("foo".equals(key)) ? "bar" : null;
}
};
resolvers.add(resolver);
return resolvers;
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free