Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem fix when migrating Quickstart to MySQL #56

Open
nemasket opened this issue Oct 29, 2017 · 0 comments
Open

Problem fix when migrating Quickstart to MySQL #56

nemasket opened this issue Oct 29, 2017 · 0 comments

Comments

@nemasket
Copy link

nemasket commented Oct 29, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant