- 博客(7)
- 收藏
- 关注
原创 springboot缓存的快速上手使用
1.依赖 <!--springBoot 缓存--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency>2.启功类加注解@EnableCachin
2021-07-02 14:26:41
207
原创 已解决问题:mysql插入修改时间与本地时间差8小时
插入时间和修改时间不正确,没有设置服务器时区原配置信息:url: jdbc:mysql://ip:3306/数据库?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false添加:&serverTimezone=Asia/Shanghai更改后配置信息:url: jdbc:mysql://ip:3306/数据库?useUnic
2021-06-28 17:59:08
179
原创 已解决报错:MybatisPlusException: Error: Method queryTotal execution error of sql
Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: Error: Method queryTotal execution error of sql :错误原因:在mapper中写自定义sql,多加了where,自定义sql传入queryWrapper不能加where错误code:String customSql="select * from ("+queryAll+") as q where ${ew.custo
2021-06-28 10:51:37
5251
原创 @MapperScan和@ComponentScan一块使用冲突问题
项目集成了knief4j报错NoSuchBeanDefinitionException: No qualifying bean of type 'springfox.documentation.schema.TypeNameExtractor'很明显是容器缺少必须的bean,启动不成功解决方案:一.@MapperScan和@ComponentScan一起使用1.建一个配置类package com.test.config;import org.springframework.context
2021-05-22 09:38:19
1474
原创 /和/*和/**的使用区别
/:不会拦截页面,只会拦截路径/:会拦截路径和页面/:会拦截所有的的文件夹和里面的子文件夹总结:/*:只拦截后面一级/**:拦截内容包含多个层级
2021-01-25 10:48:18
1783
原创 字符串内容相同而地址值不同,创建字符串内存地址的引用
1.String类(特殊的类)java.lang.String表示字符串,本质是一个char[]数组//public String(String original) 构造方法public String(String original) { this.value = original.value; this.hash = original.hash; } private final char value[];从构造方法源码可以看出String类型的对象
2020-10-15 16:42:17
1817
1
原创 hashCode()方法源码执行简要分析
执行代码public class Demo06 { public static void main(String[] args) { String s="hello"; System.out.println(s.hashCode()); } }以下是hashCode()源码public int hashCode() { int h = hash; if (h == 0 && value.lengt
2020-10-03 16:19:17
238
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人