From f1bb888009c3e8dcc280638fed5b9f79da8c19fa Mon Sep 17 00:00:00 2001
From: teddy Kernix <93723692+tgamiette@users.noreply.github.com>
Date: Mon, 17 Feb 2025 12:29:07 +0100
Subject: [PATCH] add hot-reload config inteliJ
---
.gitignore | 2 ++
.idea/.gitignore | 8 ++++++++
.idea/GoofyFiles.iml | 6 ++++++
.idea/compiler.xml | 18 +++++++++++++++++
.idea/encodings.xml | 6 ++++++
.idea/git_toolbox_blame.xml | 6 ++++++
.idea/jarRepositories.xml | 20 +++++++++++++++++++
.idea/misc.xml | 14 +++++++++++++
.idea/modules.xml | 8 ++++++++
.idea/vcs.xml | 6 ++++++
.vscode/settings.json | 4 +++-
Dockerfile | 3 ++-
java/pom.xml | 3 +++
.../GoofyFiles/GoofyFilesApplication.java | 2 +-
.../src/main/resources/application.properties | 8 +++++++-
15 files changed, 110 insertions(+), 4 deletions(-)
create mode 100644 .gitignore
create mode 100644 .idea/.gitignore
create mode 100644 .idea/GoofyFiles.iml
create mode 100644 .idea/compiler.xml
create mode 100644 .idea/encodings.xml
create mode 100644 .idea/git_toolbox_blame.xml
create mode 100644 .idea/jarRepositories.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cee1840
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# windsurf rules
+.windsurfrules
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/GoofyFiles.iml b/.idea/GoofyFiles.iml
new file mode 100644
index 0000000..6054576
--- /dev/null
+++ b/.idea/GoofyFiles.iml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..f8de26d
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..d862369
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml
new file mode 100644
index 0000000..7dc1249
--- /dev/null
+++ b/.idea/git_toolbox_blame.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..4c3c29d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..661f696
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 2a0f000..0bcf2ea 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -2,5 +2,7 @@
"java.project.sourcePaths": ["java/src/main/java"],
"files.eol": "\n",
"editor.formatOnSave": true,
- "editor.defaultFormatter": "esbenp.prettier-vscode"
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "java.compile.nullAnalysis.mode": "automatic",
+ "java.configuration.updateBuildConfiguration": "interactive"
}
diff --git a/Dockerfile b/Dockerfile
index 0494926..f534207 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,4 +14,5 @@ COPY --from=build /app/target/GoofyFiles-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
-ENTRYPOINT ["java", "-jar", "app.jar"]
+WORKDIR /source
+CMD ["mvn", "spring-boot:run", "-Dspring-boot.run.jvmArguments=-XX:TieredStopAtLevel=1"]
diff --git a/java/pom.xml b/java/pom.xml
index 79d0efc..5d75d17 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -62,6 +62,9 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ false
+
diff --git a/java/src/main/java/com/goofy/GoofyFiles/GoofyFilesApplication.java b/java/src/main/java/com/goofy/GoofyFiles/GoofyFilesApplication.java
index d81c68b..52d66aa 100644
--- a/java/src/main/java/com/goofy/GoofyFiles/GoofyFilesApplication.java
+++ b/java/src/main/java/com/goofy/GoofyFiles/GoofyFilesApplication.java
@@ -16,6 +16,6 @@ public static void main(String[] args) {
// Mapping de la racine pour afficher "Hello, World!"
@GetMapping("/")
public String helloWorld() {
- return "Hello, World!";
+ return "Hello, World!5";
}
}
\ No newline at end of file
diff --git a/java/src/main/resources/application.properties b/java/src/main/resources/application.properties
index a6fc1a8..81e4c8c 100644
--- a/java/src/main/resources/application.properties
+++ b/java/src/main/resources/application.properties
@@ -2,4 +2,10 @@ spring.application.name=GoofyFiles
spring.datasource.url=${SPRING_DATASOURCE_URL}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
-spring.jpa.hibernate.ddl-auto=update
\ No newline at end of file
+spring.jpa.hibernate.ddl-auto=update
+
+# Hot reload configuration
+spring.devtools.restart.enabled=true
+spring.devtools.livereload.enabled=true
+spring.devtools.restart.poll-interval=2s
+spring.devtools.restart.quiet-period=1s
\ No newline at end of file