青烟

小燕归园花正语,水清不问旧消息。

摘要: /** * 一个单例bean的依赖注入和查找 */ public class SingletonBeanInjectLock { public static void main(String[] args) { // 创建Ioc容器 DefaultListableBeanFactory beanFa 阅读全文
posted @ 2021-09-06 10:50 今后 阅读(304) 评论(1) 推荐(0) 编辑
摘要: Java实现源码 上一节我们提到了Java动态代理的使用,接下来我们看一下他的具体实现。 HelloInterface proxyHello = (HelloInterface) Proxy.newProxyInstance(helloInterface.getClass().getClassLoa 阅读全文
posted @ 2021-09-06 10:29 今后 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 静态代理 我们定义一个接口,并且使用代理模式,想要做到的就是在调用这个接口的实现类时在此方法上添加功能。 public interface HelloInterface { void sayHello(); } 接下来就是这个接口的实现类,我们在调用sayHello时输出一句话: public cl 阅读全文
posted @ 2021-09-06 10:28 今后 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 首先,我们需要定义一个Bean的class类: package framework.spring; import org.springframework.beans.BeansException; import org.springframework.beans.factory.*; public 阅读全文
posted @ 2021-09-04 18:29 今后 阅读(507) 评论(0) 推荐(0) 编辑
摘要: CountDownLatch能不能在多个线程上添加await? countDownLatch出现错误,这究竟是任性的沦丧还是社会的沉沦.... 阅读全文
posted @ 2021-08-25 16:47 今后 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 线程池 线程池从功能上来看,就是一个任务管理器。在Java中,Executor接口是线程池的根接口,其中只包含一个方法: Executor void execute(Runnable command); // 执行任务 ExecutorService继承了Executor接口,提供了一些线程池的基础 阅读全文
posted @ 2021-08-24 15:52 今后 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 再见了妈妈,今晚我就要远航 ~~ 阅读全文
posted @ 2021-08-21 00:41 今后 阅读(29) 评论(4) 推荐(0) 编辑
摘要: 将freemaker替换成thymeleaf时出现以下问题: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: " {field:'id', title:'编号'}, {field 阅读全文
posted @ 2021-08-20 19:45 今后 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 问题 在处理DataTable的render进行列表渲染的时候发现通过ajax发送请求,返回的值并不正确。 {"data":"id","render":function ( data, type, full, meta ) { var skill="" $.ajax({ type: 'POST', 阅读全文
posted @ 2021-08-20 19:41 今后 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 设置返回result类型为json格式 <package name="cn.konngo.action" namespace="/" extends="json-default"> <action name="users_*" class="cn.konngo.action.UsersAction" 阅读全文
posted @ 2021-08-20 19:38 今后 阅读(322) 评论(0) 推荐(0) 编辑