How to use Spring's JdbcTemplate to connect to a simple MySql database?

前端 未结 1 1918
广开言路
广开言路 2020-12-17 19:42

I am trying to use Spring\'s JdbcTemplate Class to connect to a simple MySql database based on this tutorial. In fact, I used their project setup:

pom.xml



        
相关标签:
1条回答
  • 2020-12-17 20:11

    Add the dependency below:

    <dependency>
        <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>
    

    Which will autoconfigure the Datasource

    0 讨论(0)
提交回复
热议问题