Skip to content

Instantly share code, notes, and snippets.

class ConfigLine {
static belongsTo = [configuration: Configuration]
String label
String value
static constraints = {
value(maxSize: 5000, nullable: true)
label(maxSize: 500)
class Configuration {
String name // service name for what is configuration
static hasMany = [configLines: ConfigLine]
static mapping = {
configLines cascade: 'all-delete-orphan'
}
}
class Configuration {
String name // service name for what is configuration (microcervice-app)
static hasMany = [configLines: ConfigLine]
static mapping = {
configLines cascade: 'all-delete-orphan'
}
}
class Configuration {
String name
static hasMany = [configLines: ConfigLine]
static mapping = {
configLines cascade: 'all-delete-orphan'
}
}
spring:
application:
name: server-service
profiles:
active: native
cloud:
config:
server:
bootstrap: true // flag to indicate that the server should configure itself from its own remote repository
prefix: /config // changing the location of the server endpoints
spring:
application:
name: server-service
profiles:
active: native
cloud:
config:
server:
bootstrap: true // flag to indicate that the server should configure itself from its own remote repository
prefix: /config // changing the location of the server endpoints
spring:
application:
name: dev-portal (1)
profiles:
active: native
cloud:
config:
server:
bootstrap: true (2)
prefix: /config (3)
spring:
application:
name: dev-portal
profiles:
active: native
cloud:
config:
server:
bootstrap: true
prefix: /config
@EnableConfigServer
class Application extends GrailsAutoConfiguration {
static void main(String[] args) {
GrailsApp.run(Application, args)
}
}
dependencies {
compile('org.springframework.cloud:spring-cloud-config-server:1.3.0.RELEASE')
}