From 6a96437936335d8234511a189671e467084301f4 Mon Sep 17 00:00:00 2001 From: "A.B" Date: Wed, 12 Jun 2024 22:15:03 +0200 Subject: [PATCH] chore: remove broken bootRunDev gradle task (#9) * chore: remove broken bootRunDev gradle task Signed-off-by: ablandel * chore: update CHANGELOG Signed-off-by: ablandel --------- Signed-off-by: ablandel --- CHANGELOG.md | 4 ++++ README.md | 16 ++++++++++++---- build.gradle.kts | 18 ------------------ 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b9830..6870db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ Add the changes here. - Configuration of the default logger with rolling policy to trace server logs in a file +### Updated + +- Update of the dev tools configuration - removing of the broken bootRunDev `gradle` task + ### Fix - Fix N+1 request problem during `Kaomoji` entity fetch diff --git a/README.md b/README.md index 0900114..3ab95b4 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,28 @@ docker compose up ``` This project is also configured with the `spring-boot-docker-compose` Spring dependency. The `docker-compose.yaml` can -be automatically launched using `spring.docker.compose.enabled` property or the gradle `bootRunDev` task. +be automatically launched using `spring.docker.compose.enabled` property. #### Start the server -If a database is already running and the application configured. +Using the prod profile with a database already configured and running: ```shell ./gradlew bootRun ``` -Else, using the dev mode with the `spring-boot-docker-compose` Spring feature. +For developers with useful tools: ```shell -./gradlew bootRunDev +SPRING_PROFILES_ACTIVE=dev \ +SPRING_DOCKER_COMPOSE_ENABLED=true \ +LOGGING_LEVEL_WEB=info \ +SPRING_MVC_LOG_REQUEST_DETAILS=true \ +SPRING_CODEC_LOG_REQUEST_DETAILS=true \ +SPRING_JPA_SHOW_SQL=true \ +HIBERNATE_GENERATE_STATISTICS=false \ +HIBERNATE_USE_SQL_COMMENTS=false \ +./gradlew bootRun ``` ### Run the tests diff --git a/build.gradle.kts b/build.gradle.kts index 8d968cd..ef6c4b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,24 +52,6 @@ dependencies { developmentOnly("org.springframework.boot:spring-boot-devtools:3.3.0") } -tasks.register("bootRunDev") { - group = "application" - description = "Runs this project as a Spring Boot application with the dev profile" - doFirst { - tasks.bootRun.configure { - systemProperty("spring.profiles.active", "dev") - systemProperty("spring.docker.compose.enabled", true) - systemProperty("logging.level.web", "info") - systemProperty("spring.mvc.log-request-details", true) - systemProperty("spring.codec.log-request-details", true) - systemProperty("spring.jpa.show-sql", true) - systemProperty("hibernate.generate_statistics", false) - systemProperty("hibernate.use_sql_comments", false) - } - } - finalizedBy("bootRun") -} - tasks.test { useJUnitPlatform() jvmArgs("-XX:+EnableDynamicAgentLoading") // see: https://eclipse.dev/openj9/docs/xxenabledynamicagentloading/