This is the backend API, built with Java Spring Boot. It provides core business logic, authentication, user management, mailing, and more for the Walkre.com ecommerce platform.
- Java Development Kit (JDK) 21 or higher
- Apache Maven (included as
mvnw
in this repo) - PostgreSQL or CockroachDB (with SSL root certificate)
- An IDE (IntelliJ IDEA, VS Code, or Eclipse recommended)
git clone https://github.com/your-org/backend-java-kit.git
cd backend-java-kit
- Edit
src/main/resources/application.properties
to set your database credentials and other environment variables. - Ensure your SSL certificate is at
src/main/resources/cert/root.crt
(or update the path in your config).
./mvnw clean install
./mvnw spring-boot:run
java -jar target/commerce-maven-0.0.1-SNAPSHOT.jar
The server will start on port 8080 by default. You can change this in application.properties
:
server.port=8080
- Main API:
http://localhost:8080
- Swagger UI:
http://localhost:8080/swagger-ui.html
- Migration scripts are in
src/main/resources/db/migration/
- To repair migration history (if needed):
./mvnw flyway:repair -Dflyway.url='jdbc:postgresql://<host>:<port>/<db>?sslmode=verify-full&user=<user>&password=<password>&sslrootcert=src/main/resources/cert/root.crt'
- To apply migrations:
./mvnw flyway:migrate
src/main/java/com/backende_mav-kiten/
— Main Java source codesrc/main/resources/
— Application config, templates, migrations, certificatessrc/main/resources/templates/index.html
— Home page for backendsrc/main/resources/db/migration/
— Flyway migration scripts
- Run tests:
./mvnw test
- Build JAR:
./mvnw clean package
- SSL Certificate Error:
Copy your certificate to~/.postgresql/root.crt
or update the path inapplication.properties
. - Migration Errors:
Useflyway:repair
and check theflyway_schema_history
table in your database.