Table des matières

Paris-H2 project

Projet Spring-boot avec H2

Outils/Frameworks

Création

Créer le projet à partir de Spring Initializr

Importation

Dézipper l'archive du projet dans votre Workspace Eclipse (dans l'explorateur windows).
A partir d'Eclipse Java EE, importer le projet Maven en sélectionnant l'emplacement du projet.

Configuration

Modifier le fichier de configuration de l'application Spring pour intégrer H2 et Mustache :

spring.datasource.url=jdbc:h2:file:./data/paris;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect

spring.h2.console.enabled=true
spring.h2.console.path=/h2-console

# Mustache Template engine
spring.mustache.prefix=classpath:/templates/
spring.mustache.suffix=.html