摘要: 代码: <!--配置过滤器--> <filter> <filter-name>characterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</fil 阅读全文
posted @ 2022-05-01 09:21 yfs1024 阅读(125) 评论(0) 推荐(0)
摘要: 错误提示: Invalid content was found starting with element '{"http://xmlns.jcp.org/xml/ns/javaee":init-param}'. One of '{"http://xmlns.jcp.org/xml/ns/javae 阅读全文
posted @ 2022-04-30 18:14 yfs1024 阅读(342) 评论(0) 推荐(0)
摘要: 前提知识:“==”当比较基本类型时比较的是值,当为引用类型时比较的是内存地址 首先看代码和结果: Integer integer1 = new Integer(1); Integer integer2 = new Integer(1); System.out.println("integer1 == 阅读全文
posted @ 2022-04-30 17:00 yfs1024 阅读(88) 评论(0) 推荐(0)
摘要: //1.需求: 想使用 Computer 接口,并创建对象 //2.传统方式,是写一个类,实现该接口,并创建对象 //3.类只是使用一次,后面再不使用 原始做法: /** * 创建时间: 2022/4/30 * * @author 尼古拉斯.Cai灯 */ public class BasicCla 阅读全文
posted @ 2022-04-30 14:40 yfs1024 阅读(31) 评论(0) 推荐(0)
摘要: | 官方定义表达式(瞟一眼就行): execution(modifiers-pattern? ret-type-pattern declaring-type-pattern?name-pattern(param-pattern) throws-pattern?) | | | | 解释: modifi 阅读全文
posted @ 2022-04-29 15:24 yfs1024 阅读(310) 评论(0) 推荐(0)
摘要: (SpringAop中的五种常见的通知注解) @Before: 前置通知注解 定义方法,方法是实现切面功能的。 方法的定义要求: 1.公共方法 public 2.方法没有返回值 3.方法名称自定义 4.方法可以有参数,也可以没有参数。 如果有参数,参数不是自定义的,有几个参数类型可以使用。 属性:v 阅读全文
posted @ 2022-04-28 18:23 yfs1024 阅读(259) 评论(0) 推荐(0)
摘要: 现在大多项目都是使用Mybatis了,但也有些公司使用Hibernate。使用Mybatis最大的特性就是sql需要自己写,而写sql就需要传递多个参数。面对各种复杂的业务场景,传递参数也是一种学问。 下面给大家总结了以下几种多参数传递的方法。 方法1:顺序传参法 public User selec 阅读全文
posted @ 2022-04-28 16:57 yfs1024 阅读(243) 评论(0) 推荐(0)
摘要: <!--springIoc注解自动扫描:--> <context:component-scan base-package="com.cn" /> <!--aop注解自动扫描--> <aop:aspectj-autoproxy ></aop:aspectj-autoproxy> <!--开启事务注释驱 阅读全文
posted @ 2022-04-24 09:53 yfs1024 阅读(46) 评论(0) 推荐(0)
摘要: db.properties 一般数据库的主要的配置放在代码外的配置文件中即这里的db.properties,如下: jdbc.driverClass=com.mysql.jdbc.Driver jdbc.connectionURL=jdbc:mysql://localhost:3306/boot_c 阅读全文
posted @ 2022-04-21 23:28 yfs1024 阅读(93) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.d 阅读全文
posted @ 2022-04-21 23:14 yfs1024 阅读(23) 评论(0) 推荐(0)