Java 类org.springframework.boot.autoconfigure.condition.ConditionalOnResource 实例源码
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:EndpointWebMvcHypermediaManagementContextConfiguration.java
@Bean
@ConditionalOnEnabledEndpoint("docs")
@ConditionalOnResource(resources = "classpath:/META-INF/resources/spring-boot-actuator/docs/index.html")
public DocsMvcEndpoint docsMvcEndpoint(
ManagementServletContext managementServletContext) {
return new DocsMvcEndpoint(managementServletContext);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:ProjectInfoAutoConfiguration.java
@ConditionalOnResource(resources = "${spring.info.build.location:classpath:META-INF/build-info.properties}")
@ConditionalOnMissingBean
@Bean
public BuildProperties buildProperties() throws Exception {
return new BuildProperties(
loadFrom(this.properties.getBuild().getLocation(), "build"));
}
项目:spring-boot-concourse
文件:EndpointWebMvcHypermediaManagementContextConfiguration.java
@Bean
@ConditionalOnEnabledEndpoint("docs")
@ConditionalOnResource(resources = "classpath:/META-INF/resources/spring-boot-actuator/docs/index.html")
public DocsMvcEndpoint docsMvcEndpoint(
ManagementServletContext managementServletContext) {
return new DocsMvcEndpoint(managementServletContext);
}
项目:spring-boot-concourse
文件:ProjectInfoAutoConfiguration.java
@ConditionalOnResource(resources = "${spring.info.build.location:classpath:META-INF/build-info.properties}")
@ConditionalOnMissingBean
@Bean
public BuildProperties buildProperties() throws Exception {
return new BuildProperties(
loadFrom(this.properties.getBuild().getLocation(), "build"));
}
项目:contestparser
文件:EndpointWebMvcHypermediaManagementContextConfiguration.java
@Bean
@ConditionalOnProperty(prefix = "endpoints.docs", name = "enabled", matchIfMissing = true)
@ConditionalOnResource(resources = "classpath:/META-INF/resources/spring-boot-actuator/docs/index.html")
public ActuatorDocsEndpoint actuatorDocsEndpoint(
ManagementServletContext managementServletContext) {
return new ActuatorDocsEndpoint(managementServletContext);
}