
spring
探路者001
我年轻,我骄傲
展开
-
tomcat 内存泄漏 threadlocals
项目运行中日志打印org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xxx] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4b0c8383]) and a value of type [com.xx.xxxx.Comm原创 2020-05-21 15:59:20 · 11005 阅读 · 0 评论 -
日志自定义注解(AOP实现)
自定义日志标签YfLog日志注解:以日志自定义注解+AOP实现####1、引入AOP Maven依赖<!--springBoot 的aop--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-star...原创 2019-12-12 14:46:36 · 262 阅读 · 0 评论 -
spring线程池配置及使用
1,先来上配置 Xml代码 ThreadPoolExecutor构造方法:public ThreadPoolExecutor(int corePoolSize,原创 2017-04-12 15:23:55 · 6502 阅读 · 0 评论 -
使用@Controller注解为什么要配置<mvc:annotation-driven />
相当于注册了DefaultAnnotationHandlerMapping和AnnotationMethodHandlerAdapter两个bean,配置一些messageconverter。即解决了@Controller注解的使用前提配置。是对包进行扫描,实现注释驱动Bean定义,同时将bean自动注入容器中使用。即解决了@Controller标识的类的bean的注入和使用。一开转载 2017-04-12 15:55:25 · 424 阅读 · 0 评论 -
Spring注解配置定时任务<task:annotation-driven/>
首先在配置文件头部的必须要有:xmlns:task="http://www.springframework.org/schema/task"其次xsi:schemaLocation必须为其添加:http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd然原创 2017-04-12 16:00:30 · 1523 阅读 · 0 评论 -
Hibernate与Jpa的关系, Spring JpaTransactionManager事务管理
Jpa是一种规范,而Hibernate是它的一种实现jpa中有Entity, Table,hibernate中也有,但是内容不同jpa中有Column,OneToMany等,Hibernate中没有,也没有替代品jpa的注解已经是hibernate的核心,hibernate只提供了一些补充,而不是两套注解。要是这样,hibernate对jpa的支持还真够足量,我们要使用hibernat原创 2017-04-12 21:38:02 · 9699 阅读 · 0 评论