随笔分类 -  spring

spring相关
spring mvc 前端返回 js
摘要:@RequestMapping(value = "/test",produces = "text/html; charset=UTF-8")@ResponseBodypublic String test(){String url = "";return "<script>window.locatio 阅读全文

posted @ 2023-08-15 14:33 正义的伙伴! 阅读(36) 评论(0) 推荐(0) 编辑

mybatis: 正确使用mybatis中的mapperLocations配置多个xml扫描路径
摘要:<!-- myBatis文件 --> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource" /> <!-- 阅读全文

posted @ 2023-07-07 11:00 正义的伙伴! 阅读(484) 评论(0) 推荐(0) 编辑

关于变量命名
摘要:来源: https://mp.weixin.qq.com/s?__biz=MzA4NzQ0Njc4Ng==&mid=2247506141&idx=1&sn=2d7148b31fdb9e7c23d77696fabd9228&chksm=903bdcb0a74c55a60ae526f5b5ea12e9e 阅读全文

posted @ 2023-03-15 13:04 正义的伙伴! 阅读(50) 评论(0) 推荐(0) 编辑

spring 注解获取相关
摘要:spring 获取组合注解 AnnotatedElementUtils.getMergedAnnotation(Element.class, Test2.class); 阅读全文

posted @ 2023-03-08 18:35 正义的伙伴! 阅读(24) 评论(0) 推荐(0) 编辑

spring注解工具类AnnotatedElementUtils和AnnotationUtils
摘要:spring注解工具类AnnotatedElementUtils和AnnotationUtils 小眼儿 2022-11-02 原文 一、前言 spring为开发人员提供了两个搜索注解的工具类,分别是AnnotatedElementUtils和AnnotationUtils。在使用的时候,总是傻傻分 阅读全文

posted @ 2023-01-05 09:05 正义的伙伴! 阅读(508) 评论(0) 推荐(0) 编辑

spring mvc @Configuration addConverterFactory 无效问题
摘要:spring 版本: 4.3.7 addFormatters(FormatterRegistry registry) 不生效 <!-- 此处与 @EnableWebmvc 冲突, 配置此处后 EnableWebmvc 中的配置无效 --> <mvc:annotation-driven content 阅读全文

posted @ 2022-11-09 15:25 正义的伙伴! 阅读(550) 评论(0) 推荐(0) 编辑

pointcut 引用规则备忘
摘要:参考 https://zhuanlan.zhihu.com/p/153317556 https://www.jianshu.com/p/5986781b7ba0 1. 扫描任意包方法 whmmm 包下 以 Service 结尾, 以 save 开头的方法 execution(* org.whmmm. 阅读全文

posted @ 2022-10-24 11:05 正义的伙伴! 阅读(72) 评论(0) 推荐(0) 编辑

java 根据 lambda 解析出原数据
摘要:/** * 解析 lambda 表达式, 该方法只是调用了 {@link SerializedLambda#resolve(SFunction)} 中的方法,在此基础上加了缓存。 * 该缓存可能会在任意不定的时间被清除 * * @param func 需要解析的 lambda 对象 * @param 阅读全文

posted @ 2022-10-12 13:26 正义的伙伴! 阅读(126) 评论(0) 推荐(0) 编辑

java 跨域
摘要:response.setHeader("Access-Control-Allow-Origin", originHeads); response.setHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS,DELETE,HEAD,PUT,P 阅读全文

posted @ 2022-10-11 15:31 正义的伙伴! 阅读(221) 评论(0) 推荐(0) 编辑

spring boot 自定义 yml 配置需要用到的注解
摘要:import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configur 阅读全文

posted @ 2022-09-20 13:02 正义的伙伴! 阅读(79) 评论(0) 推荐(0) 编辑

spring mvc org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface
摘要:spring mvc 异常处理 org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.List]: Specified class is an interface 解决方法 Act 阅读全文

posted @ 2022-05-27 10:19 正义的伙伴! 阅读(1030) 评论(0) 推荐(0) 编辑

spring boot / tomcat 远程调试.
摘要:spring boot 允许远程调试 nohup java -Dspring.profiles.active=dev -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5085 -jar abcdef.jar > nohup. 阅读全文

posted @ 2022-05-24 13:22 正义的伙伴! 阅读(73) 评论(0) 推荐(0) 编辑

spring 事务Propagation.REQUIRES_NEW 不起作用的原因
摘要:内部的 this 调用方法不会 走 aop 代理, 需要自身注入自身一个新的对象 实现 BeanFactoryAware, /** * 手动获取 .class 注入 * {@inheritDoc} */ @Override public void setBeanFactory(BeanFactory 阅读全文

posted @ 2022-01-05 11:22 正义的伙伴! 阅读(537) 评论(0) 推荐(0) 编辑

获取注解上的注解
摘要:使用 .annotationType().getAnnotation(ABC.class)不是 .getClass().getAnnotation(ABC.class) 阅读全文

posted @ 2021-04-23 14:00 正义的伙伴! 阅读(144) 评论(0) 推荐(0) 编辑

tomcat 远程 debug
摘要:catalina.sh 设置 JAVA_OPTS : -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888 idea 设置 阅读全文

posted @ 2021-04-22 11:09 正义的伙伴! 阅读(53) 评论(0) 推荐(0) 编辑

idea jrebel debug 问题修复
摘要:如题 debug 提示 错误如下, 并且 tomcat 会 卡住 com.sun.jdi.VMMismatchException : instance of org.apache.tomcat.util.threads.TaskThread(name='http-nio-8100-exec-10', 阅读全文

posted @ 2020-12-26 11:41 正义的伙伴! 阅读(1725) 评论(0) 推荐(0) 编辑

tomcat 解决乱码
摘要:windows : catalina.bat 首行 set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 linux catalina.sh JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8" 阅读全文

posted @ 2020-12-17 17:24 正义的伙伴! 阅读(57) 评论(0) 推荐(0) 编辑

windows 创建文件夹 链接
摘要:mklink /j "G:\github\lvYouBaoBiao\ruoyi-admin\target\classes\static" "G:\github\lvYouBaoBiao\ruoyi-admin\src\main\resources\static" 创建链接后,spring boot 阅读全文

posted @ 2019-12-26 13:21 正义的伙伴! 阅读(798) 评论(0) 推荐(0) 编辑

spring boot logback 配置
摘要:pom 依赖 阅读全文

posted @ 2019-11-26 13:48 正义的伙伴! 阅读(200) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
//增加一段JS脚本,为目录生成使用
点击右上角即可分享
微信分享提示