Bonjour, je programme une petite application en spring boot java sur intellij avec la base h2.

Dans mon fichier application.properties je configure l'accès à H2

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
spring.jpa.defer-datasource-initialization=true
spring.datasource.url=jdbc:h2:file:/data/demo
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.username=sa
spring.datasource.password=password
 
spring.sql.init.mode=always
pour l'instant j'ai l'erreur suivante (je travaille sur MAC)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
Error while creating file "/data" [90062-240]
Caused by: java.nio.file.FileSystemException: /data: Read-only file system
j'aimerais aussi configurer la base sur H2 dans Intellij
voici un printscreen

Nom : Capture d’écran 2026-06-01 à 19.36.20.png
Affichages : 54
Taille : 232,3 Ko