摘要: 1.thymeleaf依赖 <!-- thymeleaf --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dep 阅读全文
posted @ 2023-01-10 23:45 西东怪 阅读(399) 评论(1) 推荐(0) 编辑
摘要: 前置准备 1.导入依赖 <!-- jackson --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.14.0</ver 阅读全文
posted @ 2022-11-22 22:09 西东怪 阅读(285) 评论(0) 推荐(0) 编辑
摘要: <!-- 配置中文乱码过滤器 --> <filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</f 阅读全文
posted @ 2022-11-22 20:19 西东怪 阅读(16) 评论(0) 推荐(0) 编辑
摘要: web.xml(springMVC的核心配置DispatchServlet) <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://ww 阅读全文
posted @ 2022-11-14 21:38 西东怪 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1.原理图(实现代表自动装配完成,虚线我们需要实现的地方) 2.实现步骤 3.实现 HelloController.java package com.zxy.contorller; import org.springframework.web.servlet.ModelAndView; import 阅读全文
posted @ 2022-11-05 16:27 西东怪 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 核心:spring整合mybatis spring-dao.xml <?xml version="1.0" encoding="UTF8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://w 阅读全文
posted @ 2022-11-01 22:43 西东怪 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 方法一 使用API接口实现(每个方法都需要配置aop约束) Log.java import org.springframework.aop.MethodBeforeAdvice; import java.lang.reflect.Method; public class Log implements 阅读全文
posted @ 2022-10-30 20:40 西东怪 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 使用Spring注解前的配置 <?xml version="1.0" encoding="UTF8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS 阅读全文
posted @ 2022-10-28 21:45 西东怪 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 实体类: package com.zxy.pojo; public class Address { private String address; public String getAddress() { return address; } public void setAddress(String 阅读全文
posted @ 2022-10-28 16:19 西东怪 阅读(15) 评论(0) 推荐(0) 编辑
摘要: mybatis-08 实体类 public interface BlogMapper { //查询博客 List<Blog> queryBlogIF(Map map); List<Blog> queryBlogChoose(Map map); //更新博客 int updateBlog(Map ma 阅读全文
posted @ 2022-10-23 17:30 西东怪 阅读(19) 评论(0) 推荐(0) 编辑
返回顶端