diff --git a/apiGateway/src/main/java/com/library/apiGateway/configs/SecurityConfig.java b/apiGateway/src/main/java/com/library/apiGateway/configs/SecurityConfig.java
index 051d7bc..c884431 100644
--- a/apiGateway/src/main/java/com/library/apiGateway/configs/SecurityConfig.java
+++ b/apiGateway/src/main/java/com/library/apiGateway/configs/SecurityConfig.java
@@ -20,7 +20,16 @@ public class SecurityConfig {
"/swagger-ui/**",
"/v3/api-docs/**",
"/swagger-resources/**",
- "/aggregate/**"
+ "/aggregate/**",
+
+ // Public APIs
+ "/book-service/api/books/**",
+ "/book-service/api/authors/**",
+ "/book-service/api/publishers/**",
+ "/book-service/api/genres/**",
+ "/book-service/api/categories/**",
+ "/review-service/api/reviews/**",
+ "/review-service/api/review-metrics/**"
};
@Bean
@@ -37,7 +46,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws
CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(List.of("*"));
- configuration.setAllowedMethods(Arrays.asList("GET","POST"));
+ configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
configuration.setAllowedHeaders(List.of("*"));
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
diff --git a/apiGateway/src/main/resources/application.properties b/apiGateway/src/main/resources/application.properties
index 070acfe..e5f84ae 100644
--- a/apiGateway/src/main/resources/application.properties
+++ b/apiGateway/src/main/resources/application.properties
@@ -1,5 +1,5 @@
spring.application.name=apiGateway
-spring.profiles.active="@spring.profiles.active@"
+spring.profiles.active=@spring.profiles.active@
server.port=9000
springdoc.swagger-ui.enabled=true
diff --git a/bookService/pom.xml b/bookService/pom.xml
index 6751304..39befbb 100644
--- a/bookService/pom.xml
+++ b/bookService/pom.xml
@@ -29,6 +29,23 @@
17
+
+
+ dev
+
+ true
+
+
+ dev
+
+
+
+ prod
+
+ prod
+
+
+
confluent
diff --git a/bookService/src/main/resources/application.properties b/bookService/src/main/resources/application.properties
index 3f7fa16..532df2c 100644
--- a/bookService/src/main/resources/application.properties
+++ b/bookService/src/main/resources/application.properties
@@ -1,4 +1,5 @@
spring.application.name=bookService
+spring.profiles.active=@spring.profiles.active@
server.port=8080
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=none
diff --git a/docker-compose.yml b/docker-compose.yml
index 30ff3aa..264f1bb 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,7 +7,7 @@ services:
ports:
- "3307:3306"
volumes:
- - ./docker/mysql-dev/data:/var/lib/mysql
+ - mysql-dev_data:/var/lib/mysql
- ./infrastructure/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ]
@@ -28,7 +28,7 @@ services:
ports:
- "3308:3306"
volumes:
- - ./docker/kc-mysql/data:/var/lib/mysql
+ - kc-mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$MYSQL_ROOT_PASSWORD' ]
interval: 10s
@@ -45,7 +45,7 @@ services:
ports:
- "27018:27017"
volumes:
- - ./docker/mongodb-dev/data:/data/db
+ - mongodb-dev_data:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
networks:
@@ -157,3 +157,7 @@ services:
- e-library-network
networks:
e-library-network:
+volumes:
+ mysql-dev_data:
+ kc-mysql_data:
+ mongodb-dev_data: