![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
JAVA
小曦曦大神
这个作者很懒,什么都没留下…
展开
-
Spring Devtools 简单使用
1.引入依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>2.6.3</version></dependency>2.修改代码后点击原创 2022-02-19 19:27:23 · 368 阅读 · 0 评论 -
mybatis 打印详细日志(包括sql返回值)
logging.level.root=infologging.level.xxxxxx=tracexxxxxx是项目根包原创 2021-05-24 18:24:57 · 472 阅读 · 0 评论 -
mybatis plus 设置mapper 在java目录下
1. build.gradle 加入processResources { from('src/main/java') { include '**/*.xml' }}2. application.yml 配置mybatis-plus: mapper-locations: classpath*:com/example/demo1/mapper/*.xml原创 2021-03-16 13:02:32 · 855 阅读 · 0 评论 -
springboot Axios post 传递数据 ,使用x-www-form-urlencoded,非json
前端 (需要qs库)const t = { title: "vue", content: "123" , tags: ["66", "777"] }; request({ url: "/bmsPost/sendPost", method: "post", data: qs.stringify(t, {arrayFormat: 'indices'}) });后端@Req原创 2021-03-15 14:48:08 · 411 阅读 · 0 评论 -
mybatis mybatis-plus 配置映射等级 ResultMap不用写所有字段
Springboot yml配置文件中mybatis-plus配置,mybatis 类似,大家自己找下,mybatis-plus: configuration: auto-mapping-behavior: fullhttps://mybatis.org/mybatis-3/zh/sqlmap-xml.html#Auto-mapping原创 2021-03-14 00:11:30 · 1666 阅读 · 0 评论 -
Java8 自定义收集器 (自定义 Collector)
List<User> users = Arrays.asList( new User("张三", 1), new User("李四", 2), new User("王五", 3) ); /** * Collector<T, A, R> * Collector接口有三个泛型,它们的含义如下: *原创 2021-03-09 21:02:47 · 199 阅读 · 0 评论 -
解决idea thymeleaf html页面报错,和不代码提示
解决方案:使用 Map 传参 不使用 HttpServletRequest之前 @RequestMapping("/hello2") public String hello2(HttpServletRequest request) { request.setAttribute("user", new User("zhangsan", 23)); return "hello2"; }之后 @RequestMapping(...原创 2021-03-02 11:36:47 · 1124 阅读 · 0 评论 -
使用Class对象来创建数组的方法
创建Class数组的方法反射的时候有参数类似 String[] args,有这个类的可以String[].class这样写,有些只能反射拿到Class对象的,就不能这样了,找了下,这里记录下相关链接:Stackoverflow Get type of array of class using Java reflection [duplicate]Stackoverflow How to...原创 2020-03-04 17:09:22 · 2591 阅读 · 0 评论 -
JAVA动态代理
基础实现package xxx.xxx;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;public class Test { public static void main(String[] args) {...原创 2020-02-13 12:41:43 · 104 阅读 · 0 评论