# 数据源配置 spring.datasource.url=jdbc:mysql://127.0.0.1:3306/demo?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai spring.datasource.username=root spring.datasource.password=123456 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # mybatis配置 mybatis.mapper-locations=classpath:mapper/*Mapper.xml mybatis.type-aliases-package=com.example.demo.model
spring: datasource: url: jdbc:mysql://localhost:3306/junjun?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8 username: root password: 123456 driver-class-name: com.mysql.cj.jdbc.Driver
package controller; import entity.Books; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import service.BookService; import java.util.List; @Controller //