externalizing configuration

This commit is contained in:
bvn13 2025-02-28 02:30:47 +03:00
parent 780d9b5c35
commit 47d3aace47
2 changed files with 57 additions and 0 deletions

53
config/application.yaml Normal file

@ -0,0 +1,53 @@
server:
port: 8080
spring:
application:
name: jateway
profiles:
active: dev
cloud:
gateway:
routes:
- id: simple_route
uri: http://example.com
predicates:
- Method=GET
management:
server:
port: 8081
endpoints:
enabled-by-default: false
web:
base-path: /actuator
exposure:
include: health,info,env,loggers,mappings,metrics,logfile,routing,httptrace
endpoint:
env:
enabled: true
health:
enabled: true
info:
enabled: true
loggers:
enabled: true
mappings:
enabled: true
metrics:
enabled: true
logfile:
enabled: true
routing:
enabled: true
httptrace:
enabled: true
logging:
level:
root: info
# org.springframework.web.filter.CommonsRequestLoggingFilter: debug
# org.springframework.web.server.adapter.HttpWebHandlerAdapter: debug
# org.springframework.web.reactive.handler.SimpleUrlHandlerMapping: debug
# org.springframework.web.reactive.resource.ResourceWebHandler: debug
# org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler: debug
# org.springframework.web: debug

@ -8,3 +8,7 @@ services:
restart: unless-stopped
ports:
- 8080:8080
environment:
- SPRING_CONFIG_LOCATION=/app/config/application.yaml
volumes:
- ./config:/app/config