Skip to content

Commit

Permalink
merge with lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina Tarasova committed Aug 14, 2024
1 parent 5fcaf9f commit 2bd5580
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
Expand Down
17 changes: 17 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.api.tasks.JavaExec

plugins {
id("com.github.ben-manes.versions") version "0.48.0"
Expand Down Expand Up @@ -108,3 +109,19 @@ tasks.jacocoTestReport {
xml.required.set(true)
}
}

tasks.register<JavaExec>("runTaskManagerApp") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("hexlet.code.AppApplication")
args("--server.port=8080")
}

tasks.register<JavaExec>("runAnonymizerApp") {
classpath = sourceSets.main.get().runtimeClasspath
mainClass.set("io.project.Application")
args("--server.port=8081")
}

tasks.register("runAllApps") {
dependsOn("runTaskManagerApp", "runAnonymizerApp")
}
2 changes: 1 addition & 1 deletion src/main/java/hexlet/code/service/TaskService.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public TaskDTO findById(Long id) {

public TaskDTO update(TaskUpdateDTO taskUpdateDTO, Long id) {
var task = taskRepository.findByIdWithEagerUpload(id)
.orElseThrow(() -> new ResourceNotFoundException("Task With Id: " + id + " Not Found"));
.orElseThrow(() -> new ResourceNotFoundException("Task With Id: " + id + " Not Found"));

taskMapper.update(taskUpdateDTO, task);

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ spring:
generate-ddl: true
show-sql: true
hibernate:
ddl-auto: create-drop
ddl-auto: create

output:
ansi:
enabled: always
Expand Down

0 comments on commit 2bd5580

Please sign in to comment.