Skip to content

Commit

Permalink
Remove useless ConditionalOnPlatformVersion annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed May 27, 2024
1 parent 2401e95 commit fce115a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import io.spring.initializr.generator.buildsystem.gradle.GradleBuildSystem;
import io.spring.initializr.generator.buildsystem.maven.MavenBuildSystem;
import io.spring.initializr.generator.condition.ConditionalOnBuildSystem;
import io.spring.initializr.generator.condition.ConditionalOnPlatformVersion;
import io.spring.initializr.generator.condition.ConditionalOnRequestedDependency;
import io.spring.initializr.generator.project.ProjectDescription;
import io.spring.initializr.generator.project.ProjectGenerationConfiguration;
Expand All @@ -37,7 +36,6 @@
*/
@ProjectGenerationConfiguration
@ConditionalOnRequestedDependency("dgs-codegen")
@ConditionalOnPlatformVersion("3.2.0")
class DgsCodegenProjectGenerationConfiguration {

private final String dgsCodegenPluginVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import io.spring.initializr.generator.project.ProjectGenerationConfiguration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* Configuration for generation of projects that use observability.
Expand All @@ -33,33 +32,27 @@
@ProjectGenerationConfiguration
class ObservabilityProjectGenerationConfiguration {

@Configuration(proxyBeanMethods = false)
@ConditionalOnPlatformVersion("3.2.0")
static class ObservabilityConfiguration {

@Bean
ObservabilityActuatorBuildCustomizer observabilityActuatorBuildCustomizer() {
return new ObservabilityActuatorBuildCustomizer();
}

@Bean
ObservabilityDistributedTracingBuildCustomizer observabilityDistributedTracingBuildCustomizer() {
return new ObservabilityDistributedTracingBuildCustomizer();
}
@Bean
ObservabilityActuatorBuildCustomizer observabilityActuatorBuildCustomizer() {
return new ObservabilityActuatorBuildCustomizer();
}

@Bean
ObservabilityHelpDocumentCustomizer observabilityHelpDocumentCustomizer(ProjectDescription description,
Build build) {
return new ObservabilityHelpDocumentCustomizer(description, build);
}
@Bean
ObservabilityDistributedTracingBuildCustomizer observabilityDistributedTracingBuildCustomizer() {
return new ObservabilityDistributedTracingBuildCustomizer();
}

@Bean
@ConditionalOnRequestedDependency("wavefront")
@ConditionalOnPlatformVersion("[3.2.0, 3.3.0-M1)")
WavefrontHelpDocumentCustomizer wavefrontHelpDocumentCustomizer(Build build) {
return new WavefrontHelpDocumentCustomizer("https://docs.wavefront.com/wavefront_springboot3.html", build);
}
@Bean
ObservabilityHelpDocumentCustomizer observabilityHelpDocumentCustomizer(ProjectDescription description,
Build build) {
return new ObservabilityHelpDocumentCustomizer(description, build);
}

@Bean
@ConditionalOnRequestedDependency("wavefront")
@ConditionalOnPlatformVersion("[3.2.0, 3.3.0-M1)")
WavefrontHelpDocumentCustomizer wavefrontHelpDocumentCustomizer(Build build) {
return new WavefrontHelpDocumentCustomizer("https://docs.wavefront.com/wavefront_springboot3.html", build);
}

}

0 comments on commit fce115a

Please sign in to comment.