Kite2Server is a Spring Boot (Java) backend project featuring REST APIs for data management and GPT integration.
Quick Overview
- Java: 17
- Spring Boot: 3.x (Parent in
pom.xml3.1.0) - Main Class:
com.hhn.kite2server.Kite2ServerApplication - Build Tool: Maven (uses
./mvnw/mvnw.cmdon Windows)
Table of Contents
- Prerequisites
- Build & Start
- Configuration
- Key Modules / Controllers
- Troubleshooting
- Development & Contribution
- Tests
- License
- JDK 17 installed and added to PATH
- Maven (or the provided wrapper script mvnw / mvnw.cmd)
- PostgreSQL (or a configured database)
On Windows (PowerShell):
# Build
.\mvnw.cmd clean package
# Starten (erzeugte JAR im Ordner target, finalName = Kite2Server)
java -jar .\target\Kite2Server.jar
# Alternativ direkt mit dem Maven Spring Boot Plugin (zum Entwickeln)
.\mvnw.cmd spring-boot:runOn Unix/macOS:
./mvnw clean package
java -jar ./target/Kite2Server.jarRunning Tests:
.\mvnw.cmd testThe central configuration is located in src/main/resources/application.yml. Key settings include:
server.port: Default is 8080spring.datasource.*: JDBC URL, username, and password (current values are examples — must be updated)openai.api.key/ Environment Variables: The project utilizesspring-dotenv. Sensitive keys should be stored in a.envfile or set as environment variables. Essential variables:OPENAI_API_KEY(API key for GPT)OPENAI_MODEL(e.g., gpt-4o)API_USERNAME/API_PASSWORD(if applicable)
- SSL Keystore:
src/main/resources/keystore/keystore.p12(optional).
Important: The example passwords in the repository are placeholders. Never commit sensitive data to the repository.
The project is structured into packages under com.hhn.kite2server. Important sub-packages and controllers include:
data:DataController,DataService,DataRepositorygpt:GptController,GptService,GptConfig
The main entry point is com.hhn.kite2server.Kite2ServerApplication.
- Actuator: Enabled (exposed endpoints are configurable in
application.yml) - Access Logs: Configured in
application.ymlvia Tomcat accesslog.
- Database Connection Failed: Verify
spring.datasource.url, username, password, and ensure PostgreSQL is reachable. - TLS/SSL: To start with SSL, set
server.ssl.enabled: true and configurekey-store/key-store-password.
- Branch Workflow: Use feature branches and submit Pull Requests (PRs) against
main. - Code Format: The project follows standard Java formatting and uses Lombok in several parts of the code.
- Security: Do not commit secrets — use
.envfiles or a CI secret store instead.
- Unit and integration tests can be executed using
./mvnw testormvnw.cmdtest.
The source code is released under the MIT License. For details, see LICENSE_SOFTWARE.txt
Summary: This README provides a quick start guide for building, running, and configuring the project. Ensure you adapt the application.yml and environment variables to your environment, particularly the database and API keys.
Kite2Server ist ein Spring Boot (Java) Backend-Projekt mit REST-APIs für Datenverwaltung und GPT-Integration.
Kurzüberblick
- Java: 17
- Spring Boot: 3.x (Parent im
pom.xml3.1.0) - Hauptklasse:
com.hhn.kite2server.Kite2ServerApplication - Build Tool: Maven (
./mvnw/mvnw.cmdauf Windows)
Inhalt dieser README
- Voraussetzungen
- Build & Start
- Konfiguration
- Wichtige Module / Controller
- Troubleshooting
- JDK 17 installiert und in PATH
- Maven (oder das mitgelieferte Wrapper-Skript
mvnw/mvnw.cmd) - PostgreSQL (oder eine konfigurierte Datenbank)
Auf Windows (Powershell):
# Build
.\mvnw.cmd clean package
# Starten (erzeugte JAR im Ordner target, finalName = Kite2Server)
java -jar .\target\Kite2Server.jar
# Alternativ direkt mit dem Maven Spring Boot Plugin (zum Entwickeln)
.\mvnw.cmd spring-boot:runAuf Unix/macOS:
./mvnw clean package
java -jar ./target/Kite2Server.jarFür Tests:
.\mvnw.cmd testZentrale Konfiguration liegt in src/main/resources/application.yml. Wichtige Punkte:
server.port: Standard 8080spring.datasource.*: JDBC URL, Nutzer und Passwort (aktuell Beispielwerte — unbedingt anpassen)openai.api.keybzw. Umgebungsvariablen: Das Projekt nutztspring-dotenv— sensitive Keys sollten in einer.envliegen oder als Umgebungsvariablen gesetzt werden. Wichtige Variablen:OPENAI_API_KEY(API-Key für GPT)OPENAI_MODEL(z. B.gpt-4o)API_USERNAME/API_PASSWORD(falls genutzt)
- SSL-Keystore:
src/main/resources/keystore/keystore.p12(optional; imapplication.ymlals Kommentar vorhanden)
Wichtig: Die im Repository vorhandenen Beispielpasswörter sind Platzhalter. Niemals sensible Daten ins Repo committen.
Das Projekt ist in Pakete unter com.hhn.kite2server strukturiert. Wichtige Subpakete und Controller (nicht vollständig):
data—DataController,DataService,DataRepositorygpt—GptController,GptService,GptConfig
Die Hauptklasse ist com.hhn.kite2server.Kite2ServerApplication.
- Actuator ist aktiviert (exposed endpoints konfigurierbar in
application.yml) - Access-Logs sind in
application.ymlkonfiguriert (Tomcat accesslog)
- Datenbankverbindung schlägt fehl: Prüfe
spring.datasource.url, Nutzer, Passwort und ob Postgres erreichbar ist. - TLS/SSL: Falls mit SSL gestartet werden soll,
server.ssl.enabled: truesetzen undkey-store/key-store-passwordkonfigurieren.
- Branch-Workflow: Feature-Branches, PRs gegen
main. - Code-Format: Projekt nutzt Standard-Java-Formatierung; Nutzt Lombok in Teilen des Codes.
- Bitte keine Secrets committen — stattdessen
.envoder CI-Secret-Store verwenden.
- Unit- und Integrationstests lassen sich mit
./mvnw testbzw.mvnw.cmd testausführen.
Der Quellcode steht unter der MIT-Lizenz. Details siehe LICENSE_SOFTWARE.txt
Kurzzusammenfassung: Diese README bietet einen schnellen Einstieg zum Bauen, Starten und Konfigurieren des Projekts. Passe application.yml und Umgebungsvariablen an deine Umgebung an, insbesondere DB- und API-Keys.