-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add banner Fix docker volume location Improve swagger documentation Remove unused ID in Product request
- Loading branch information
Darren Buller
committed
Nov 14, 2024
1 parent
a8d5cf6
commit db06948
Showing
12 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,6 @@ build/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Docker volumes ### | ||
/docker/volumes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/example/microservices/product/config/ObservationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.example.microservices.product.config; | ||
|
||
import io.micrometer.observation.ObservationRegistry; | ||
import io.micrometer.observation.aop.ObservedAspect; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class ObservationConfig { | ||
@Bean | ||
ObservedAspect observedAspect(ObservationRegistry registry) { | ||
return new ObservedAspect(registry); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/main/java/com/example/microservices/product/dto/ProductRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package com.example.microservices.product.dto; | ||
|
||
import java.math.BigDecimal; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record ProductRequest(String id, String name, String description, | ||
String skuCode, BigDecimal price) { | ||
@Schema(description = "Details the product to create") | ||
public record ProductRequest(String name, String description, | ||
String skuCode, BigDecimal price) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
______ _ _ _____ _ | ||
| ___ \ | | | | / ___| (_) | ||
| |_/ / __ ___ __| |_ _ ___| |_ \ `--. ___ _ ____ ___ ___ ___ | ||
| __/ '__/ _ \ / _` | | | |/ __| __| `--. \/ _ \ '__\ \ / / |/ __/ _ \ | ||
| | | | | (_) | (_| | |_| | (__| |_ /\__/ / __/ | \ V /| | (_| __/ | ||
\_| |_| \___/ \__,_|\__,_|\___|\__| \____/ \___|_| \_/ |_|\___\___| | ||
|
||
${application.title} ${application.version} | ||
Powered by Spring Boot ${spring-boot.version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml"/> | ||
<springProperty scope="context" name="appName" source="spring.application.name"/> | ||
<springProperty scope="context" name="lokiUrl" source="loki.url"/> | ||
|
||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>${lokiUrl}</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>application=${appName},host=${HOSTNAME},level=%level</pattern> | ||
</label> | ||
<message> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</message> | ||
<sortByTime>true</sortByTime> | ||
</format> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="LOKI"/> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters