Skip to content

Commit b171800

Browse files
committed
⚙️ Enhance: Expandir configuración de aplicación con configuraciones profesionales
## Mejoras implementadas: ### 🚀 **Performance y optimización** - Configuración de Tomcat optimizada - Compresión HTTP habilitada - HTTP/2 support - Cache configuration con Caffeine - Timeouts y connection pools ### 📊 **Monitoreo y observabilidad** - Actuator endpoints completos - Health checks personalizados - Métricas y Prometheus ready - Info endpoints con detalles del sistema ### 📝 **API Documentation mejorada** - Swagger UI optimizado - Grupos de APIs organizados - Try-it-out habilitado - Sorting y organización ### 🔒 **Seguridad y CORS** - CORS configurado para desarrollo y producción - Origins permitidos configurables - Rate limiting preparado ### 🌊 **Configuraciones específicas del dominio** - Parámetros sísmicos configurables - Configuración de tsunami - Límites de performance - Validaciones de entrada ### 🏗️ **Configuración por perfiles** - Soporte para múltiples entornos - Logging configurable por nivel - Error handling mejorado
1 parent 931d186 commit b171800

File tree

1 file changed

+127
-1
lines changed

1 file changed

+127
-1
lines changed
Lines changed: 127 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,130 @@
1+
# ===============================================
2+
# SismoView Backend - Application Configuration
3+
# ===============================================
4+
5+
# ========================
6+
# SERVER CONFIGURATION
7+
# ========================
18
server.port=8080
9+
server.servlet.context-path=
10+
server.compression.enabled=true
11+
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css
12+
server.http2.enabled=true
13+
14+
# Connection and timeout settings
15+
server.tomcat.connection-timeout=20000
16+
server.tomcat.keep-alive-timeout=15000
17+
server.tomcat.max-connections=8192
18+
server.tomcat.threads.max=200
19+
server.tomcat.threads.min-spare=10
20+
21+
# ========================
22+
# SPRING BOOT CONFIGURATION
23+
# ========================
24+
spring.application.name=sismoview-backend
25+
spring.profiles.active=@spring.profiles.active@
26+
spring.jmx.enabled=false
27+
28+
# JSON serialization
29+
spring.jackson.default-property-inclusion=NON_NULL
30+
spring.jackson.serialization.write-dates-as-timestamps=false
31+
spring.jackson.time-zone=UTC
32+
33+
# ========================
34+
# API DOCUMENTATION (OpenAPI/Swagger)
35+
# ========================
236
springdoc.api-docs.path=/v3/api-docs
337
springdoc.swagger-ui.path=/swagger-ui.html
4-
management.endpoints.web.exposure.include=health,info
38+
springdoc.swagger-ui.operationsSorter=method
39+
springdoc.swagger-ui.tagsSorter=alpha
40+
springdoc.swagger-ui.try-it-out-enabled=true
41+
42+
# API Information
43+
springdoc.api-docs.groups.enabled=true
44+
springdoc.group-configs[0].group=seismic
45+
springdoc.group-configs[0].paths-to-match=/api/simulate/seismic/**
46+
springdoc.group-configs[1].group=tsunami
47+
springdoc.group-configs[1].paths-to-match=/api/simulate/tsunami/**
48+
49+
# ========================
50+
# ACTUATOR ENDPOINTS
51+
# ========================
52+
management.endpoints.web.exposure.include=health,info,metrics,prometheus,env
53+
management.endpoints.web.base-path=/actuator
54+
management.endpoint.health.show-details=when-authorized
55+
management.endpoint.health.show-components=always
56+
57+
# Custom health indicators
58+
management.health.diskspace.enabled=true
59+
management.health.ping.enabled=true
60+
61+
# Application info
62+
management.info.env.enabled=true
63+
management.info.java.enabled=true
64+
management.info.os.enabled=true
65+
66+
# ========================
67+
# LOGGING CONFIGURATION
68+
# ========================
69+
logging.level.com.sismoview=INFO
70+
logging.level.org.springframework.web=INFO
71+
logging.level.org.springframework.security=INFO
72+
logging.level.org.hibernate=WARN
73+
74+
# Log pattern for console
75+
logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} : %m%n%wEx
76+
77+
# ========================
78+
# CORS CONFIGURATION
79+
# ========================
80+
sismoview.cors.allowed-origins=http://localhost:3000,http://localhost:3001,https://*.vercel.app
81+
sismoview.cors.allowed-methods=GET,POST,PUT,DELETE,OPTIONS
82+
sismoview.cors.allowed-headers=*
83+
sismoview.cors.allow-credentials=true
84+
sismoview.cors.max-age=3600
85+
86+
# ========================
87+
# SEISMIC CALCULATION SETTINGS
88+
# ========================
89+
sismoview.seismic.default-p-velocity=6.0
90+
sismoview.seismic.default-s-velocity=3.5
91+
sismoview.seismic.earth-radius-km=6371
92+
sismoview.seismic.max-distance-km=20000
93+
94+
# Performance settings
95+
sismoview.seismic.max-cities-per-request=50
96+
sismoview.seismic.cache-results=true
97+
sismoview.seismic.cache-duration-minutes=30
98+
99+
# ========================
100+
# TSUNAMI SIMULATION SETTINGS
101+
# ========================
102+
sismoview.tsunami.default-grid-resolution=360
103+
sismoview.tsunami.max-simulation-time-hours=24
104+
sismoview.tsunami.wave-speed-ms=200
105+
106+
# ========================
107+
# RATE LIMITING
108+
# ========================
109+
sismoview.rate-limit.requests-per-minute=60
110+
sismoview.rate-limit.burst-capacity=10
111+
sismoview.rate-limit.enabled=true
112+
113+
# ========================
114+
# CACHE CONFIGURATION
115+
# ========================
116+
spring.cache.type=caffeine
117+
spring.cache.caffeine.spec=maximumSize=1000,expireAfterWrite=30m
118+
119+
# ========================
120+
# VALIDATION
121+
# ========================
122+
spring.validation.enabled=true
123+
124+
# ========================
125+
# ERROR HANDLING
126+
# ========================
127+
server.error.include-message=always
128+
server.error.include-binding-errors=always
129+
server.error.include-stacktrace=on_param
130+
server.error.include-exception=false

0 commit comments

Comments
 (0)