Skip to content

Commit d400c07

Browse files
committed
Add backend-java on ai-llm-connector
1 parent 89a2c2a commit d400c07

File tree

79 files changed

+2900
-1787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2900
-1787
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/mvnw text eol=lf
2+
*.cmd text eol=crlf
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# ================================================
2+
# ✅ Sensitive files / Local config
3+
# ================================================
4+
5+
# Do not commit real configuration or secrets
6+
.env
7+
.env.local
8+
.env.development
9+
.env.test
10+
.env.production
11+
src/main/resources/application.properties
12+
13+
# Keep templates for sharing example configs
14+
!.env.template
15+
!src/main/resources/application.template.properties
16+
17+
# ================================================
18+
# ☕ Maven / Java build artifacts
19+
# ================================================
20+
21+
target/
22+
build/
23+
!.mvn/wrapper/maven-wrapper.jar
24+
!**/src/main/**/target/
25+
!**/src/test/**/target/
26+
!**/src/main/**/build/
27+
!**/src/test/**/build/
28+
29+
# Logs
30+
*.log
31+
hs_err_pid*.log
32+
33+
# ================================================
34+
# 🧪 IDE: Eclipse / Spring Tools Suite (STS)
35+
# ================================================
36+
37+
.apt_generated
38+
.classpath
39+
.factorypath
40+
.project
41+
.settings/
42+
.springBeans
43+
.sts4-cache/
44+
45+
# ================================================
46+
# 💡 IDE: IntelliJ IDEA
47+
# ================================================
48+
49+
.idea/
50+
*.iws
51+
*.iml
52+
*.ipr
53+
out/
54+
55+
# ================================================
56+
# 🧰 IDE: NetBeans
57+
# ================================================
58+
59+
/nbproject/private/
60+
/nbbuild/
61+
/dist/
62+
/nbdist/
63+
/.nb-gradle/
64+
65+
# ================================================
66+
# 🖥️ IDE: Visual Studio Code
67+
# ================================================
68+
69+
.vscode/
70+
71+
# ================================================
72+
# 🗂️ OS files / Backup / Temp
73+
# ================================================
74+
75+
.DS_Store
76+
Thumbs.db
77+
*.swp
78+
*.swo
79+
*.bak
80+
*.tmp
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

ai-llm-connector/backend-java/HELP.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Read Me First
2+
The following was discovered as part of building this project:
3+
4+
* The original package name 'com.example.backend-java-springboot' is invalid and this project uses 'com.example.backend-java-springboot' instead.
5+
6+
# Getting Started
7+
8+
### Reference Documentation
9+
For further reference, please consider the following sections:
10+
11+
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
12+
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.4/maven-plugin)
13+
* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.4/maven-plugin/build-image.html)
14+
* [Spring Web](https://docs.spring.io/spring-boot/3.4.4/reference/web/servlet.html)
15+
16+
### Guides
17+
The following guides illustrate how to use some features concretely:
18+
19+
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
20+
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
21+
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
22+
23+
### Maven Parent overrides
24+
25+
Due to Maven's design, elements are inherited from the parent POM to the project POM.
26+
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
27+
To prevent this, the project POM contains empty overrides for these elements.
28+
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
29+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# backend-java-springboot
2+
3+
Application Spring Boot packagée en WAR, compatible Tomcat / Jetty, avec linter, tests, build Maven.
4+
5+
---
6+
7+
## 🔧 Lint (analyse statique)
8+
9+
Analyse du style de code Java avec Checkstyle :
10+
11+
```bash
12+
mvn checkstyle:check
13+
```
14+
15+
⛔️ La build échoue si le code ne respecte pas les règles définies dans `checkstyle.xml`.
16+
17+
---
18+
19+
## 🧪 Tests unitaires
20+
21+
Exécution des tests + génération du rapport JaCoCo :
22+
23+
```bash
24+
mvn clean test
25+
mvn jacoco:report
26+
```
27+
28+
Rapport de couverture généré dans :
29+
30+
```
31+
target/site/jacoco/index.html
32+
```
33+
34+
---
35+
36+
## 🏗️ Build
37+
38+
Compilation + tests + packaging + installation locale :
39+
40+
```bash
41+
mvn clean install
42+
```
43+
44+
Génère le fichier :
45+
46+
```
47+
target/backend-java-springboot-1.0.0.war
48+
```
49+
50+
---
51+
52+
## 🚀 Déploiement local (Tomcat)
53+
54+
1. Copier le fichier WAR dans :
55+
56+
```
57+
<chemin-vers-tomcat>/webapps
58+
```
59+
60+
2. Démarrer Tomcat
61+
62+
3. Accéder à l'application :
63+
64+
- http://localhost:8080/backend-java-springboot-1.0.0/
65+
- http://localhost:8080/backend-java-springboot-1.0.0/persons
66+
67+
---
68+
69+
## 🌐 Déploiement Jetty (optionnel)
70+
71+
Ajoute dans `pom.xml` :
72+
73+
```xml
74+
<plugin>
75+
<groupId>org.eclipse.jetty</groupId>
76+
<artifactId>jetty-maven-plugin</artifactId>
77+
<version>11.0.25</version>
78+
<configuration>
79+
<webApp>
80+
<contextPath>/</contextPath>
81+
</webApp>
82+
</configuration>
83+
</plugin>
84+
```
85+
86+
Puis exécute :
87+
88+
```bash
89+
mvn clean compile jetty:run
90+
# ou simplement :
91+
mvn jetty:run
92+
```
93+
94+
Accès local :
95+
- http://localhost:8080/backend-java-springboot/
96+
97+
---
98+
99+
## 📦 Commandes Maven utiles
100+
101+
```bash
102+
mvn clean
103+
mvn compile
104+
mvn test
105+
mvn package
106+
mvn install
107+
mvn checkstyle:check
108+
mvn dependency:tree
109+
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/mvnw text eol=lf
2+
*.cmd text eol=crlf
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=only-script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip

0 commit comments

Comments
 (0)