diff --git a/r2dbc/boot-reactive-cache/compose.yaml b/r2dbc/boot-reactive-cache/compose.yaml index a4ddcd0c8..fa43c2226 100644 --- a/r2dbc/boot-reactive-cache/compose.yaml +++ b/r2dbc/boot-reactive-cache/compose.yaml @@ -1,22 +1,22 @@ services: postgres: - container_name: postgres_local_db - image: postgres + container_name: postgres_movie_db + image: postgres:16.4-alpine environment: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: moviesDB + POSTGRES_USER: appuser + POSTGRES_PASSWORD: secret + POSTGRES_DB: appdb ports: - "5432:5432" volumes: - local_dev:/var/lib/postgresql/data redis: - container_name: redis_local_db - image: "redis/redis-stack:latest" + container_name: redis_movie_db + image: redis/redis-stack:latest ports: - "6379:6379" - "8001:8001" environment: - REDIS_REPLICATION_MODE=master volumes: - local_dev: \ No newline at end of file + local_dev: diff --git a/r2dbc/boot-reactive-cache/pom.xml b/r2dbc/boot-reactive-cache/pom.xml index c29670e33..f9bde8805 100644 --- a/r2dbc/boot-reactive-cache/pom.xml +++ b/r2dbc/boot-reactive-cache/pom.xml @@ -11,10 +11,10 @@ com.example.cache - boot-reactive-cache + boot-r2dbc-reactive-cache 0.0.1-SNAPSHOT boot-reactive-cache - boot-reactive-cache + boot-r2dbc-reactive-cache UTF-8 @@ -87,6 +87,14 @@ org.springframework.boot spring-boot-starter-data-r2dbc + + org.flywaydb + flyway-core + + + org.flywaydb + flyway-database-postgresql + org.postgresql @@ -99,14 +107,7 @@ runtime - - org.flywaydb - flyway-core - - - org.flywaydb - flyway-database-postgresql - + org.springdoc springdoc-openapi-starter-webflux-ui diff --git a/r2dbc/boot-reactive-cache/src/main/resources/application.properties b/r2dbc/boot-reactive-cache/src/main/resources/application.properties index 1af008297..bdb74891c 100644 --- a/r2dbc/boot-reactive-cache/src/main/resources/application.properties +++ b/r2dbc/boot-reactive-cache/src/main/resources/application.properties @@ -1,36 +1,18 @@ spring.application.name=boot-reactive-cache +spring.jmx.enabled=false +spring.webflux.problemdetails.enabled=true + server.port=8080 server.shutdown=graceful -spring.main.allow-bean-definition-overriding=true -spring.jmx.enabled=false -spring.mvc.problemdetails.enabled=true ################ Actuator ##################### management.endpoints.web.exposure.include=configprops,env,health,info,logfile,loggers,metrics,prometheus management.endpoint.health.show-details=always -################ Database ##################### -spring.jpa.show-sql=false -spring.jpa.open-in-view=false -spring.data.jpa.repositories.bootstrap-mode=deferred -spring.datasource.hikari.auto-commit=false -spring.datasource.hikari.data-source-properties.ApplicationName=${spring.application.name} -spring.jpa.hibernate.ddl-auto=none -#spring.jpa.properties.hibernate.format_sql=true -spring.jpa.properties.hibernate.jdbc.time_zone=UTC -spring.jpa.properties.hibernate.generate_statistics=false -spring.jpa.properties.hibernate.jdbc.batch_size=25 -spring.jpa.properties.hibernate.order_inserts=true -spring.jpa.properties.hibernate.order_updates=true -spring.jpa.properties.hibernate.query.fail_on_pagination_over_collection_fetch=true -spring.jpa.properties.hibernate.query.in_clause_parameter_padding=true -spring.jpa.properties.hibernate.query.plan_cache_max_size=4096 -spring.jpa.properties.hibernate.connection.provider_disables_autocommit=true -spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true spring.flyway.locations=classpath:/db/migration/{vendor} ###### Docker Compose Configuration ###### spring.docker.compose.lifecycle-management=start_and_stop spring.docker.compose.file=${user.dir}/r2dbc/boot-reactive-cache/compose.yaml -#spring.docker.compose.skip.in-tests=false +spring.docker.compose.skip.in-tests=true #spring.docker.compose.profiles.active=dev diff --git a/r2dbc/boot-reactive-cache/src/test/java/com/example/cache/TestApplication.java b/r2dbc/boot-reactive-cache/src/test/java/com/example/cache/TestApplication.java deleted file mode 100644 index 521076939..000000000 --- a/r2dbc/boot-reactive-cache/src/test/java/com/example/cache/TestApplication.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.cache; - -import com.example.cache.common.ContainersConfig; -import org.springframework.boot.SpringApplication; - -public class TestApplication { - - public static void main(String[] args) { - System.setProperty("spring.profiles.active", "local"); - SpringApplication.from(Application::main).with(ContainersConfig.class).run(args); - } -}