- 博客(10)
- 资源 (1)
- 收藏
- 关注
原创 利用随机数随机创建子类对象
public static Animal getInstance(int key) { switch (key) { case 0: return new Cat (); case 1: return new Dog (); default: return new Sheep (); } }
2022-03-03 14:29:16
217
原创 mybatis-plus 报错Ambiguous mapping. Cannot map ‘xxxxController‘ method.
报错信息:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘documentationPluginsBootstrapper’ defined in URL…Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mappin
2021-07-30 11:46:14
312
原创 springboot整合mybatis-plus报错Could not set parameters for mapping:解决方法
报错信息:nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=‘ew.paramNameValuePairs.MPGENVAL1’, mode=IN, javaType=class java.lang.Object, jdbcType=null, numericScale=null, resultMapId=‘null
2021-07-30 11:12:26
9166
2
原创 Java常用工具类的常用方法(更新)
BeanUtilscopyproPerties方法: @Test public void testcopy(){ Dog dog = new Dog(); Dog dog1 = new Dog(); dog.setAge(4); dog.setName("mq"); BeanUtils.copyProperties(dog,dog1); System.out.println(dog1); }
2021-07-22 17:10:15
137
原创 maven配置错误解决
vm options for importer加上-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true(跳过网站证书检查)jdk for importer 选择自己的jdk!!!vm options 加上-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.h..
2021-07-19 09:40:35
2017
原创 redis 命令(狂神说redis部分笔记图片版)
redis 命令stringFLUSHALL:清空所有数据库FLUSHDB:清空当前数据库keys *:查看当前数据库所有key名exists:判断是否存在move:移动到其他数据库expire:定义key的存在时间,过了直接过期ttl key:查看key值剩下的时间type key:查看key的类型APPEND key1 “hello”:在key值为key1的后面追加一个“hello”,如果key1不存在相当于set key1 “hello”STRLEN key1:查看key1的长度
2021-07-19 09:37:18
115
原创 注解使用(更新)
@Controller控制层@Controller用于标记在一个类上,使用它标记的类就是一个SpringMvc Controller对象,分发处理器会扫描使用该注解的类的方法,并检测该方法是否使用了@RequestMapping注解。@Controller只是定义了一个控制器类,而使用@RequestMapping注解的方法才是处理请求的处理器。...
2021-07-03 17:08:30
204
原创 mysql修改时区
方法一:通过mysql命令行模式下动态修改1.1 查看mysql当前时间,当前时区select curtime(); #或select now()也可以±----------+| curtime() |±----------+| 15:18:10 |±----------+show variables like “%time_zone%”;±-----------------±-------+| Variable_name | Value |±-----------
2021-07-02 15:38:17
89
原创 @PostMapping和@GetMapping什么时候使用
@GetMapping用于将HTTP GET请求映射到特定处理程序方法的注释。具体来说,@GetMapping是一个作为快捷方式的组合注释@RequestMapping(method = RequestMethod.GET)。@PostMapping用于将HTTP POST请求映射到特定处理程序方法的注释。具体来说,@PostMapping是一个作为快捷方式的组合注释@RequestMapping(method = RequestMethod.POST)。@RequestMapping:一般情况
2021-07-01 17:52:18
2413
1
原创 idea中@AllArgsConstructor或者@NoArgsConstructor注解无法使用时候
在setting->plugins中搜索lambok插件导入并重启
2021-07-01 16:19:51
678
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人