摘要: 一、创建maven项目 前几步相同 spring-boot 搭建web项目 - hehehenhen - 博客园 (cnblogs.com) 二、引入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apac 阅读全文
posted @ 2021-11-25 16:51 hehehenhen 阅读(86) 评论(0) 推荐(0)
摘要: DAO (Data Access Object)数据访问对象 DAO(Data Access Object)是一个数据访问接口,数据访问:顾名思义就是与数据库打交道。夹在业务逻辑与数据库资源中间。一般在 业务逻辑层(Service) 对 数据库(SQL) 的访问时使用,一般能对SQL进行操作。xxx 阅读全文
posted @ 2021-11-25 14:33 hehehenhen 阅读(1601) 评论(0) 推荐(0)
摘要: 定义异常捕获类: 使用 @ControllerAdvice和@ExceptionHandler注解来捕获指定类型的异常 package cn.newstrength.controller; import org.springframework.web.bind.annotation.Controll 阅读全文
posted @ 2021-11-25 13:29 hehehenhen 阅读(35) 评论(0) 推荐(0)