Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove broken bootRunDev gradle task #9

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
Loading