May 29, 2017

[HDGEM] How to connect Spring Boot Application to database

Spring Boot gives you defaults on all things, the default in database is H2, so when you want to change this and use any other database you must define the connection attributes in the file.

In the sources folder, you create a resource file src/main/resources/
spring.jpa.hibernate.ddl-auto=create  spring.datasource.url=jdbc:mysql://localhost:3306/db_example  spring.datasource.username=springuser  spring.datasource.password=ThePassword

Posted By Blogger to HDGEM at 5/29/2017 01:41:00 PM
Post a Comment

Featured Post

Trading volumes of most major cryptocurrencies across leading exchanges remain low overall

Bitcoin's daily trading volume has been relatively low