| Start |
|---|
schema.sql file |
First JdbcTemplate Boot App |
data.sql RemarksIn order to get started, in your sts eclipse go to new --> Spring Starter Project --> fill in your Maven coordinates --> and add the next dependencies: Under SQL tab --> add JDBC + add MySql (if MySql is your choice). For Mysql you'll also need to add the MySql Java Connector. In you Spring Boot application.properties file (you Spring Boot configuration file) you'll need to configure your Data Source credentials to MySql DB:
for example: Under the resources folder add the next two files: Spring Boot will provide you JdbcTemplate bean automatically so you can instantly can you use it like this: without any other configurations. |
Read Article
https://develop.horje.com/learn/1434/reference