Config server module

This commit is contained in:
rayankonecny 2025-12-18 17:57:37 +00:00
parent 711b44ccf1
commit 3052d3aab6
5 changed files with 24 additions and 2 deletions

3
config-server/.env Normal file
View file

@ -0,0 +1,3 @@
CONFIG_SERVER_URI=https://forgeo-olymp.duckdns.org/rayankonecny/config-server
CONFIG_SERVER_USERNAME=rayankonecny
CONFIG_SERVER_PASSWORD=550919ca9d3411b0611d697f6acb6744e4510000

View file

@ -2,7 +2,9 @@ package br.com.rayankonecny.configserver;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@EnableConfigServer
@SpringBootApplication @SpringBootApplication
public class ConfigServerApplication { public class ConfigServerApplication {

View file

@ -1 +1,13 @@
spring:
application:
name: 'config-server'
cloud:
config:
server:
git:
default-label: main
uri: ${CONFIG_SERVER_URI}
username: ${CONFIG_SERVER_USERNAME}
password: ${CONFIG_SERVER_PASSWORD}
server:
port: ${PORT:8888}

View file

@ -20,6 +20,9 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb' implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'
// Swagger / OpenAPI (compatível com Spring Boot 3.3.x) // Swagger / OpenAPI (compatível com Spring Boot 3.3.x)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'

View file

@ -1,3 +1,5 @@
spring: spring:
profiles:
active: dev
application: application:
name: user-service-api name: 'user-service-api'