Last active
September 27, 2016 16:00
-
-
Save jagedn/4e2e9dadab7c11debaced770d59d1049 to your computer and use it in GitHub Desktop.
Using Spring Cloud Config Server with Grails 3.1
This file contains 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
// Don't forget to enable refresh endpoint into application.yml | |
# Spring Actuator Endpoints are Disabled by Default | |
endpoints: | |
enabled: false | |
jmx: | |
enabled: true | |
refresh: | |
enabled: true |
This file contains 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
class ApplicationController implements PluginManagerAware { | |
GrailsApplication grailsApplication | |
GrailsPluginManager pluginManager | |
@Autowired | |
BeansConfiguration beansConfiguration | |
def index() { | |
[grailsApplication: grailsApplication, pluginManager: pluginManager,hello:beansConfiguration.hello] | |
} | |
} |
This file contains 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
// follow http://mrhaki.blogspot.com.es/2016/01/grails-goodness-using-spring-cloud.html instructions | |
// after, add a BeansConfiguration: | |
@Component | |
@ConfigurationProperties(prefix="authorization") | |
class BeansConfiguration { | |
String hello | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment