输入banner图图片脚本导航/分类

Springboot JdbcTemplate

JdbcTemplate实现对图书的添加功能小案例

 采用springboot2.0.0版本

导入所需依赖jar包

技术图片

 

 

 

application.properties中的配置

1 spring.datasource.url=jdbc:mysql://localhost:3306/bookshop 2 spring.datasource.username=root 3 spring.datasource.password=123 4 spring.datasource.driver-class-name=com.mysql.jdbc.Driver

 

entity层

 技术图片

 

 

 

 

4.service层

 技术图片

 

 

controller层

 技术图片

 

 

success.ftl

 技术图片

 

 

启动项目

 技术图片

 

 

控制台打印

 技术图片

Springboot JdbcTemplate

标签:spring   service   books   template   com   控制台   图书   span   ftl