You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following the guide in the readme for migrating the quickstart from H2 to own instance of MySQL. After changing the files listed and running steps, the server on port 4200 correctly listed the entities in my MySQL database, but the back end at port 8080 was still using the H2 database.
I traced this back to a hardcoded entry in a pack-angular file. There may be a better way to set the database, I simply changed it. The key is the jdbc.url. Here's the diff:
--- a/pack-angular/celerio/pack-angular/src/main/resources/application.yml.p.vm
+++ b/pack-angular/celerio/pack-angular/src/main/resources/application.yml.p.vm
@@ -31,7 +31,7 @@ spring:
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
database-platform: @hibernate.dialect@
- database: H2
+ database: MySQL
show_sql: true
properties:
hibernate.cache.use_second_level_cache: false
@@ -54,4 +54,4 @@ spring:
# profile used by Dockerfile... just for convenient demo
#
spring.profiles: demowithdocker
-spring.datasource.url: jdbc:h2:/db/angulardb;MVCC=TRUE;FILE_LOCK=NO
+spring.datasource.url: @jdbc.url@
With this change, the steps provided work as expected.
The text was updated successfully, but these errors were encountered:
I was following the guide in the readme for migrating the quickstart from H2 to own instance of MySQL. After changing the files listed and running steps, the server on port 4200 correctly listed the entities in my MySQL database, but the back end at port 8080 was still using the H2 database.
I traced this back to a hardcoded entry in a pack-angular file. There may be a better way to set the database, I simply changed it. The key is the jdbc.url. Here's the diff:
With this change, the steps provided work as expected.
The text was updated successfully, but these errors were encountered: