Skip to content

Commit c352643

Browse files
committed
feat: reuse config from common, ecs metadata
1 parent d46c739 commit c352643

File tree

10 files changed

+19
-97
lines changed

10 files changed

+19
-97
lines changed

compose.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<dependency>
9494
<groupId>com.github.soat-tech-challenge</groupId>
9595
<artifactId>service-common</artifactId>
96-
<version>4.1.0</version>
96+
<version>5.0.0</version>
9797
</dependency>
9898
<dependency>
9999
<groupId>org.postgresql</groupId>

src/main/java/br/com/grupo63/serviceorder/ServiceOrderApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.springframework.boot.SpringApplication;
1010
import org.springframework.boot.autoconfigure.SpringBootApplication;
1111
import org.springframework.cloud.openfeign.EnableFeignClients;
12+
import org.springframework.context.annotation.ComponentScan;
1213

1314
@OpenAPIDefinition(
1415
info = @Info(title = "${info.name}", description = "${info.description}", version = "${info.version}"),
@@ -26,6 +27,7 @@
2627
)
2728
@SpringBootApplication
2829
@EnableFeignClients
30+
@ComponentScan(basePackages = {"br.com.grupo63"})
2931
public class ServiceOrderApplication {
3032

3133
public static void main(String[] args) {

src/main/java/br/com/grupo63/serviceorder/config/JwtFilter.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/main/java/br/com/grupo63/serviceorder/config/JwtFilterConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package br.com.grupo63.serviceorder.config;
22

3+
import br.com.grupo63.techchallenge.common.config.JwtFilter;
4+
import br.com.grupo63.techchallenge.common.config.JwtService;
35
import org.springframework.beans.factory.annotation.Autowired;
46
import org.springframework.boot.web.servlet.FilterRegistrationBean;
57
import org.springframework.context.annotation.Bean;

src/main/java/br/com/grupo63/serviceorder/config/JwtService.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/main/resources/application-dev.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ spring:
1818
flyway:
1919
locations: classpath:db/migrations/{vendor}/
2020
enabled: true
21-
jwt:
22-
token:
23-
key:
24-
public: "${JWT_PUBLIC_KEY:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqStd8n4SGNM0eZhV/hzU+urHA5/IMZPoP9YQ9ZcLKWiX33nI6bSuZMCrLZcJExf63xS+uxDpGxM8Mnk2zOdl+lPwANXLzP1us5P1PyA3YPycW9J7C5YTQW0GiEL3M93ZX7vMJiVoBYblP3JPlYnoYlBORuc0JPk33KtfEZP+78qXpPHM8imYrJLe8ceiDLLFDU/nh5KC2dWAy3ci1ahoJ1Q9ELhp3IZLvOTX57H/T2VKOYOya5+ST41h+JjzI+qGTVnLcKaW+k25YLlVnkSspvdx98+yQDi7kbOTS6yRZHUPD6wPk/nUozpD0nZKccoH4W+zMwmQVtsAA6JCA9gfGwIDAQAB}"
2521

2622
# --- Custom keys ---
2723

2824
app:
25+
auth:
26+
jwt_public_key: "${JWT_PUBLIC_KEY:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqStd8n4SGNM0eZhV/hzU+urHA5/IMZPoP9YQ9ZcLKWiX33nI6bSuZMCrLZcJExf63xS+uxDpGxM8Mnk2zOdl+lPwANXLzP1us5P1PyA3YPycW9J7C5YTQW0GiEL3M93ZX7vMJiVoBYblP3JPlYnoYlBORuc0JPk33KtfEZP+78qXpPHM8imYrJLe8ceiDLLFDU/nh5KC2dWAy3ci1ahoJ1Q9ELhp3IZLvOTX57H/T2VKOYOya5+ST41h+JjzI+qGTVnLcKaW+k25YLlVnkSspvdx98+yQDi7kbOTS6yRZHUPD6wPk/nUozpD0nZKccoH4W+zMwmQVtsAA6JCA9gfGwIDAQAB}"
2927
api-url:
3028
identification: "${API_URL_IDENTIFICATION:http://localhost:8001}"

src/main/resources/application-prod.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ spring:
66
username: ${DB_USERNAME:backend}
77
devtools:
88
add-properties: false
9+
10+
info:
11+
ecs_metadata_url_v4: "${ECS_CONTAINER_METADATA_URI_V4:unknown}"

src/main/resources/application.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Global config
2+
logging:
3+
level:
4+
br.com.grupo63: "${LOGGING_LEVEL:info}"
5+
26
spring:
37
docker:
48
compose:
@@ -14,10 +18,6 @@ spring:
1418
flyway:
1519
locations: classpath:db/migrations/{vendor}/
1620
enabled: true
17-
jwt:
18-
token:
19-
key:
20-
public: "${JWT_PUBLIC_KEY}"
2121

2222
springdoc:
2323
swagger-ui:
@@ -38,6 +38,7 @@ management:
3838
exposure:
3939
include: health, info, metrics, shutdown
4040

41+
4142
server:
4243
servlet:
4344
context-path: "/order"
@@ -46,6 +47,8 @@ server:
4647
# --- Custom keys ---
4748

4849
app:
50+
auth:
51+
jwt_public_key: "${JWT_PUBLIC_KEY}"
4952
docs-api-url: "${DOCS_API_URL:(no value)}"
5053
api-url:
5154
identification: "${API_URL_IDENTIFICATION}"
@@ -54,3 +57,4 @@ info:
5457
name: "@project.name@"
5558
description: "@project.description@"
5659
version: "@project.version@"
60+
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
app:
2-
version: '@project.version@'
31
springdoc:
42
api-docs:
53
enabled: false
@@ -13,10 +11,6 @@ spring:
1311
output:
1412
ansi:
1513
enabled: always
16-
jwt:
17-
token:
18-
key:
19-
public: "${JWT_PUBLIC_KEY:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoNgzDuoQFLRFb3ivIA5CEHFRuqltT7xR6hFu+6xPD5q0sq8Exjue5s5MIQwkJMldk8/Dhp85OT5ULmAA5x4hPZfFlQEMlMPT5QItQImQ7UFCxBbMwksZlUQEP37Aa5OJ+KhEPBDTe0AaXqXFKxIOLEjHYWqhFHq5whxNotbuPrqLWEopCAgY4lqCe0pSoT3V+7Jszpq+czLBOl6eCbD933pK98/aVD9yA2+7LNOwmkYVyR4kvXX25K5Q/DDUZgMWyQTm3TCnfCrbdH6IH/Z12/DkePNuGFygUKDCEYPkPYnHbRXee4CXbeDkEdgZwzGJPM8gPhSUFrrzFVeihvN5OQIDAQAB}"
2014
management:
2115
endpoints:
22-
enabled-by-default: false
16+
enabled-by-default: false

0 commit comments

Comments
 (0)