Skip to content

Commit

Permalink
fix: set env and port
Browse files Browse the repository at this point in the history
  • Loading branch information
g-otn committed Jan 29, 2024
1 parent 2bc6758 commit d6873f6
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 26 deletions.
34 changes: 21 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
<relativePath/> <!-- lookup parent from repository -->
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>br.com.grupo63</groupId>
<artifactId>serviceorder</artifactId>
Expand All @@ -15,6 +16,10 @@
<description>FIAP SOAT1 2023 - Group 63 - Phase 4</description>
<properties>
<java.version>17</java.version>
<sonar.coverage.exclusions>
**/config/*,
**/dto/*DTO.*,
</sonar.coverage.exclusions>
</properties>
<repositories>
<repository>
Expand Down Expand Up @@ -127,6 +132,17 @@
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
</plugin>
</plugins>
<resources>
Expand Down Expand Up @@ -163,16 +179,8 @@
<version>0.8.11</version>
<configuration>
<excludes>
<exclude>**/br/com/grupo63/serviceorder/controller/dto/ProductControllerDTO.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/controller/dto/OrderItemControllerDTO.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/controller/dto/OrderControllerDTO.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/api/controller/order/dto/CreateOrderRequestDTO.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/gateway/identification/dto/ClientDTO.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/config/JwtFilterConfig.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/config/JPAConfigurer.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/config/JwtService.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/config/JwtFilter.class</exclude>
<exclude>**/br/com/grupo63/serviceorder/config/ValidationConfig.class</exclude>
<exclude>**/dto/*DTO.*</exclude>
<exclude>**/config/**</exclude>
<exclude>**/br/com/grupo63/serviceorder/ServiceOrderApplication.class</exclude>
</excludes>
</configuration>
Expand Down Expand Up @@ -200,4 +208,4 @@
</build>
</profile>
</profiles>
</project>
</project>
9 changes: 7 additions & 2 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ jwt:
public: "${JWT_PUBLIC_KEY:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqStd8n4SGNM0eZhV/hzU+urHA5/IMZPoP9YQ9ZcLKWiX33nI6bSuZMCrLZcJExf63xS+uxDpGxM8Mnk2zOdl+lPwANXLzP1us5P1PyA3YPycW9J7C5YTQW0GiEL3M93ZX7vMJiVoBYblP3JPlYnoYlBORuc0JPk33KtfEZP+78qXpPHM8imYrJLe8ceiDLLFDU/nh5KC2dWAy3ci1ahoJ1Q9ELhp3IZLvOTX57H/T2VKOYOya5+ST41h+JjzI+qGTVnLcKaW+k25YLlVnkSspvdx98+yQDi7kbOTS6yRZHUPD6wPk/nUozpD0nZKccoH4W+zMwmQVtsAA6JCA9gfGwIDAQAB}"

urls:
baseurl-identification: '${BASE_URL_IDENTIFICATION:localhost:8081}'
baseurl-identification: "${BASE_URL_IDENTIFICATION:localhost:8081}"

server:
servlet:
context-path: "/order"
context-path: "/order"

app:
docs-api-url: "${DOCS_API_URL:(no value)}"
api-url:
identification: ${API_URL_IDENTIFICATION:http\://localhost\:8081}
2 changes: 0 additions & 2 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ spring:
username: ${DB_USERNAME:backend}
devtools:
add-properties: false
urls:
baseurl: '/'
24 changes: 15 additions & 9 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
show-sql: true
profiles:
# Value comes from Maven profile (pom.xml)
active: '@spring.profiles.active@'
active: "@spring.profiles.active@"
flyway:
locations: classpath:db/migrations/{vendor}/
enabled: true
Expand All @@ -31,15 +31,21 @@ management:
endpoint:
health:
show-components: always
shutdown:
enabled: true # For debugging
endpoints:
web:
exposure:
include: health, info
info:
name: '@project.name@'
description: '@project.description@'
version: '@project.version@'
include: health, info, metrics, shutdown

# --- Custom keys ---

docs:
api:
url: "${DOCS_API_URL:https://9ah1j49vm1.execute-api.us-east-2.amazonaws.com}"
app:
docs-api-url: "${DOCS_API_URL:(no value)}"
api-url:
identification: ${API_URL_IDENTIFICATION}

info:
name: "@project.name@"
description: "@project.description@"
version: "@project.version@"

0 comments on commit d6873f6

Please sign in to comment.