Skip to content

Commit 932d00a

Browse files
authored
fix: set env and port (#5)
2 parents 2bc6758 + d6873f6 commit 932d00a

File tree

4 files changed

+43
-26
lines changed

4 files changed

+43
-26
lines changed

pom.xml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
34
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
56
<parent>
67
<groupId>org.springframework.boot</groupId>
78
<artifactId>spring-boot-starter-parent</artifactId>
89
<version>3.2.2</version>
9-
<relativePath/> <!-- lookup parent from repository -->
10+
<relativePath /> <!-- lookup parent from repository -->
1011
</parent>
1112
<groupId>br.com.grupo63</groupId>
1213
<artifactId>serviceorder</artifactId>
@@ -15,6 +16,10 @@
1516
<description>FIAP SOAT1 2023 - Group 63 - Phase 4</description>
1617
<properties>
1718
<java.version>17</java.version>
19+
<sonar.coverage.exclusions>
20+
**/config/*,
21+
**/dto/*DTO.*,
22+
</sonar.coverage.exclusions>
1823
</properties>
1924
<repositories>
2025
<repository>
@@ -127,6 +132,17 @@
127132
</exclude>
128133
</excludes>
129134
</configuration>
135+
<executions>
136+
<execution>
137+
<goals>
138+
<goal>build-info</goal>
139+
</goals>
140+
</execution>
141+
</executions>
142+
</plugin>
143+
<plugin>
144+
<groupId>io.github.git-commit-id</groupId>
145+
<artifactId>git-commit-id-maven-plugin</artifactId>
130146
</plugin>
131147
</plugins>
132148
<resources>
@@ -163,16 +179,8 @@
163179
<version>0.8.11</version>
164180
<configuration>
165181
<excludes>
166-
<exclude>**/br/com/grupo63/serviceorder/controller/dto/ProductControllerDTO.class</exclude>
167-
<exclude>**/br/com/grupo63/serviceorder/controller/dto/OrderItemControllerDTO.class</exclude>
168-
<exclude>**/br/com/grupo63/serviceorder/controller/dto/OrderControllerDTO.class</exclude>
169-
<exclude>**/br/com/grupo63/serviceorder/api/controller/order/dto/CreateOrderRequestDTO.class</exclude>
170-
<exclude>**/br/com/grupo63/serviceorder/gateway/identification/dto/ClientDTO.class</exclude>
171-
<exclude>**/br/com/grupo63/serviceorder/config/JwtFilterConfig.class</exclude>
172-
<exclude>**/br/com/grupo63/serviceorder/config/JPAConfigurer.class</exclude>
173-
<exclude>**/br/com/grupo63/serviceorder/config/JwtService.class</exclude>
174-
<exclude>**/br/com/grupo63/serviceorder/config/JwtFilter.class</exclude>
175-
<exclude>**/br/com/grupo63/serviceorder/config/ValidationConfig.class</exclude>
182+
<exclude>**/dto/*DTO.*</exclude>
183+
<exclude>**/config/**</exclude>
176184
<exclude>**/br/com/grupo63/serviceorder/ServiceOrderApplication.class</exclude>
177185
</excludes>
178186
</configuration>
@@ -200,4 +208,4 @@
200208
</build>
201209
</profile>
202210
</profiles>
203-
</project>
211+
</project>

src/main/resources/application-dev.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ jwt:
2424
public: "${JWT_PUBLIC_KEY:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqStd8n4SGNM0eZhV/hzU+urHA5/IMZPoP9YQ9ZcLKWiX33nI6bSuZMCrLZcJExf63xS+uxDpGxM8Mnk2zOdl+lPwANXLzP1us5P1PyA3YPycW9J7C5YTQW0GiEL3M93ZX7vMJiVoBYblP3JPlYnoYlBORuc0JPk33KtfEZP+78qXpPHM8imYrJLe8ceiDLLFDU/nh5KC2dWAy3ci1ahoJ1Q9ELhp3IZLvOTX57H/T2VKOYOya5+ST41h+JjzI+qGTVnLcKaW+k25YLlVnkSspvdx98+yQDi7kbOTS6yRZHUPD6wPk/nUozpD0nZKccoH4W+zMwmQVtsAA6JCA9gfGwIDAQAB}"
2525

2626
urls:
27-
baseurl-identification: '${BASE_URL_IDENTIFICATION:localhost:8081}'
27+
baseurl-identification: "${BASE_URL_IDENTIFICATION:localhost:8081}"
2828

2929
server:
3030
servlet:
31-
context-path: "/order"
31+
context-path: "/order"
32+
33+
app:
34+
docs-api-url: "${DOCS_API_URL:(no value)}"
35+
api-url:
36+
identification: ${API_URL_IDENTIFICATION:http\://localhost\:8081}

src/main/resources/application-prod.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@ spring:
66
username: ${DB_USERNAME:backend}
77
devtools:
88
add-properties: false
9-
urls:
10-
baseurl: '/'

src/main/resources/application.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spring:
1010
show-sql: true
1111
profiles:
1212
# Value comes from Maven profile (pom.xml)
13-
active: '@spring.profiles.active@'
13+
active: "@spring.profiles.active@"
1414
flyway:
1515
locations: classpath:db/migrations/{vendor}/
1616
enabled: true
@@ -31,15 +31,21 @@ management:
3131
endpoint:
3232
health:
3333
show-components: always
34+
shutdown:
35+
enabled: true # For debugging
3436
endpoints:
3537
web:
3638
exposure:
37-
include: health, info
38-
info:
39-
name: '@project.name@'
40-
description: '@project.description@'
41-
version: '@project.version@'
39+
include: health, info, metrics, shutdown
40+
41+
# --- Custom keys ---
4242

43-
docs:
44-
api:
45-
url: "${DOCS_API_URL:https://9ah1j49vm1.execute-api.us-east-2.amazonaws.com}"
43+
app:
44+
docs-api-url: "${DOCS_API_URL:(no value)}"
45+
api-url:
46+
identification: ${API_URL_IDENTIFICATION}
47+
48+
info:
49+
name: "@project.name@"
50+
description: "@project.description@"
51+
version: "@project.version@"

0 commit comments

Comments
 (0)