This is the back-end part of the GenTree application.
The back-end is structured as a Spring Boot project using Gradle as the build tool. It includes controllers, models, repositories, services, and utility classes.
The build.gradle
file contains the project's dependencies and configuration. Notable dependencies include Spring Boot starters for data, web, and Thymeleaf.
// build.gradle
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
runtimeOnly 'com.mysql:mysql-connector-j'
// Dépendances Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.junit.platform:junit-platform-launcher:1.9.3'
testImplementation fileTree(dir: 'libs', include: ['*.jar'])
}
The settings.gradle
file specifies the root project name.
rootProject.name = 'genealogic-tree-back'
under folder javadoc
This is the back-end part of the GenTree application.
-
java:
- com.acfjj.app:
- controller: (Contains controllers)
- model: (Contains models)
- repository: (Contains repositories)
- service: (Contains services)
- utils: (Contains utility files)
- GenTreeApp.java: (Main class to launch the back-end)
- com.acfjj.app:
-
resources:
- application.properties:
spring.application.name=GenTreeApp server.port=8080 spring.jpa.hibernate.ddl-auto=update spring.session.jdbc.initialize-schema=always spring.datasource.url=jdbc:mysql://nas-clementc.synology.me:7777/GTREEDB_PROD?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=CFc9&qN#BHmE7Tt# spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver angular.app.url=http://localhost:4200
- test.properties:
spring.application.name=GenTreeAppTests server.port=8080 spring.jpa.hibernate.ddl-auto=create spring.session.jdbc.initialize-schema=always spring.datasource.url=jdbc:mysql://localhost:3308/GTREEDB_TEST?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password= spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver angular.app.url=http://localhost:4200
- application.properties:
- java:
- model:
- service:
- Spring Data JPA
- Spring Data JDBC
- Thymeleaf
- Spring Web
- Spring Web Services
- Spring Boot DevTools
- MySQL Driver
- Clone the repository.
- Navigate to the
genealogic-tree-back
directory. - Execute the
GenTreeApp.java
file. (GenTreeAppTest.java
with Junit5 to run tests) - The back-end will start, and you can access it at http://localhost:8080.
Note: Make sure you have MySQL installed, and the database configurations in application.properties
are appropriate.