Skip to content
Snippets Groups Projects
Commit 45f53e9e authored by Benedikt Elser's avatar Benedikt Elser
Browse files

Added some comments on how to run this software with different databases

parent ae414c7e
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,21 @@ ...@@ -38,6 +38,21 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- Wenn sie eine andere Datenbank als h2 verwenden wollen hier einige Beispile -->
<!-- Hier Mysql -->
<!-- dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency -->
<!-- Hier Postgres -->
<!-- dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency -->
<dependency> <dependency>
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
......
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:h2:file:./data/demo spring.jpa.open-in-view=false
spring.datasource.driverClassName=org.h2.Driver spring.jpa.show-sql=true
#####
# Database configuration
#####
spring.datasource.username=user spring.datasource.username=user
spring.datasource.password=password spring.datasource.password=password
#
# This is the h2 database part
spring.datasource.url=jdbc:h2:file:./data/demo
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.open-in-view=false spring.h2.console.enabled=true
spring.jpa.show-sql=true
spring.h2.console.enabled=true # Oder mysql
\ No newline at end of file # spring.datasource.url=jdbc:mysql://servername:3306/datenankname
# Der zu verwendende Treiber. Achtung: Den mssen Sie in Ihren Abhngigkeiten (pom.xml) auch definieren!
# spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#
# Oder postgres
# spring.datasource.url=jdbc:postgresql://localhost:5432/testdb
# Der zu verwendende Treiber. Achtung: Den mssen Sie in Ihren Abhngigkeiten (pom.xml) auch definieren!
# spring.datasource.driverClassName=org.postgresql.Driver
#
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment