Created
October 11, 2019 11:20
-
-
Save j-tim/da5ba2983b59cb911dd2a43b3376f7c4 to your computer and use it in GitHub Desktop.
Spring Boot 2.2 @ConditionalOnCloudPlatform Kubernetes detection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nl.jtim.spring.boot; | |
import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform; | |
import org.springframework.boot.cloud.CloudPlatform; | |
import org.springframework.stereotype.Service; | |
@Service | |
@ConditionalOnCloudPlatform(CloudPlatform.KUBERNETES) | |
public class MyVeryCoolService { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment