Advertisement

Spring Boot 项目中使用 dataSource 处理数据库操作

阅读量:

SpringBoot项目 通过 jdbcTemplate 操作数据库

一、前期准备阶段概述

1. 依赖说明

复制代码
    <!-- 连接数据源需要的依赖 jar 包-->
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jdbc</artifactId>
    </dependency>
    
    <!--        <dependency>-->
    <!--            <groupId>org.springframework.boot</groupId>-->
    <!--            <artifactId>spring-boot-starter-jdbc</artifactId>-->
    <!--        </dependency>-->
    
    <!-- 连接指定数据库使用的 jdbc 驱动 -->
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <!

全部评论 (0)

还没有任何评论哟~