-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented CRUD operations for Product Module (#45)
* Implemented CRUD operations for Product Module * Security Hotspot issue fixed * Merge Conflicts resolved for "add security and swagger in product (#60)" * Made requested changes
- Loading branch information
1 parent
6871db2
commit 5051dbf
Showing
13 changed files
with
144 additions
and
22 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
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,7 @@ | ||
FROM debezium/postgres:15-alpine | ||
ENV WAL2JSON_TAG=wal2json_2_5 | ||
RUN apk add --no-cache --virtual .debezium-build-deps gcc clang15 llvm15 git make musl-dev pkgconf \ | ||
&& git clone https://github.com/eulerto/wal2json -b master --single-branch \ | ||
&& (cd /wal2json && git checkout tags/$WAL2JSON_TAG -b $WAL2JSON_TAG && make && make install) \ | ||
&& rm -rf wal2json \ | ||
&& apk del .debezium-build-deps | ||
ENV WAL2JSON_TAG="wal2json_2_5" | ||
RUN apk add --no-cache --virtual .debezium-build-deps clang15 gcc git llvm15 make musl-dev pkgconf \ | ||
&& git clone https://github.com/eulerto/wal2json -b master --single-branch \ | ||
&& (cd /wal2json && git checkout tags/"$WAL2JSON_TAG" -b "$WAL2JSON_TAG" && make && make install) \ | ||
&& rm -rf wal2json \ | ||
&& apk del .debezium-build-deps |
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
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
16 changes: 16 additions & 0 deletions
16
product/src/main/java/com/fjb/product/exception/ErrorCreatingEntry.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,16 @@ | ||
package com.fjb.product.exception; | ||
|
||
import com.fjb.product.utils.MessagesUtils; | ||
|
||
public class ErrorCreatingEntry extends RuntimeException { | ||
private final String message; | ||
|
||
public ErrorCreatingEntry(String errorCode, Object... var2) { | ||
this.message = MessagesUtils.getMessage(errorCode, var2); | ||
} | ||
|
||
@Override | ||
public String getMessage() { | ||
return message; | ||
} | ||
} |
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
4 changes: 3 additions & 1 deletion
4
product/src/main/java/com/fjb/product/repository/ProductRepository.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,8 +1,10 @@ | ||
package com.fjb.product.repository; | ||
|
||
import com.fjb.product.entity.Product; | ||
import java.util.List; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ProductRepository extends JpaRepository<Product, Long> { | ||
|
||
List<Product> findAllByOrderByIdAsc(); | ||
} |
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,3 @@ | ||
PRODUCT_DATA_USERNAME= | ||
PRODUCT_DATA_PASSWORD= | ||
PRODUCT_DATASOURCE_URL=jdbc:postgresql://localhost:5432/product |
Empty file.