Skip to content

Instantly share code, notes, and snippets.

@asvignesh
Created March 22, 2020 14:32
Show Gist options
  • Save asvignesh/fec8daf3d89ffd26d13a0a1473af8402 to your computer and use it in GitHub Desktop.
Save asvignesh/fec8daf3d89ffd26d13a0a1473af8402 to your computer and use it in GitHub Desktop.
Spring Boot Config Server
server.port=7777
spring.profiles.active=native
spring.cloud.config.server.native.searchLocations=file:///home/vignesh/conf
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group 'io.cloud-odo'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.SR3")
}
dependencies {
implementation 'org.springframework.cloud:spring-cloud-config-server'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@EnableConfigServer
@SpringBootApplication
public class ConfigurationServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigurationServiceApplication.class, args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment