Init
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
package space.nstart.pcp.spring_cloud_config_server
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.cloud.config.server.EnableConfigServer
|
||||
|
||||
@EnableConfigServer
|
||||
@SpringBootApplication
|
||||
class SpringCloudConfigServerApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<SpringCloudConfigServerApplication>(*args)
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
spring:
|
||||
application:
|
||||
name: spring-cloud-config-server
|
||||
profiles:
|
||||
group:
|
||||
local: native
|
||||
cloud:
|
||||
config:
|
||||
server:
|
||||
git:
|
||||
uri: ${CONFIG_GIT_URI:}
|
||||
default-label: ${CONFIG_GIT_DEFAULT_LABEL:main}
|
||||
search-paths: ${CONFIG_GIT_SEARCH_PATHS:config-repo}
|
||||
clone-on-start: ${CONFIG_GIT_CLONE_ON_START:false}
|
||||
force-pull: ${CONFIG_GIT_FORCE_PULL:true}
|
||||
timeout: ${CONFIG_GIT_TIMEOUT:10}
|
||||
username: ${CONFIG_GIT_USERNAME:oauth2}
|
||||
password: ${CONFIG_GIT_TOKEN:}
|
||||
skipSslValidation: ${CONFIG_GIT_SKIP_SSL_VALIDATION:false}
|
||||
boot:
|
||||
admin:
|
||||
client:
|
||||
enabled: false
|
||||
|
||||
server:
|
||||
port: ${SERVER_PORT:8888}
|
||||
|
||||
management:
|
||||
health:
|
||||
client-config-server:
|
||||
enabled: false
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,env,refresh
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
|
||||
logging:
|
||||
level:
|
||||
org.springframework.cloud.config.server: INFO
|
||||
|
||||
---
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: local
|
||||
cloud:
|
||||
config:
|
||||
server:
|
||||
native:
|
||||
search-locations: ${CONFIG_NATIVE_SEARCH_LOCATIONS:optional:file:./config-repo,optional:file:../config-repo,optional:file:../../config-repo}
|
||||
|
||||
---
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: test
|
||||
cloud:
|
||||
config:
|
||||
server:
|
||||
git:
|
||||
uri: https://gitlab.example.invalid/group/config-repo.git
|
||||
clone-on-start: false
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package space.nstart.pcp.spring_cloud_config_server
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.springframework.boot.test.context.SpringBootTest
|
||||
|
||||
@SpringBootTest
|
||||
class SpringCloudConfigServerApplicationTests {
|
||||
|
||||
@Test
|
||||
fun contextLoads() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user