package ssh.spring; import java.io.IOException; import org.springframework.beans.factory.BeanFactory;import org.springframework.beans.factory.xml.XmlB...
分类:
编程语言 时间:
2014-11-04 17:08:45
阅读次数:
158
org.springframework.dao.DuplicateKeyException: a different object with the same identifier value was already associated with the session: [com.sinosof...
分类:
编程语言 时间:
2014-11-04 15:00:37
阅读次数:
169
Spring中ApplicationContext中事件机制比较简单,容器事件:ApplicationEvent ,监听器:ApplicationListener,当事件发生时,触发监听器中方法。
看一个实例:
package applicationContextEvent;
import org.springframework.context.ApplicationE...
分类:
移动开发 时间:
2014-11-03 22:42:42
阅读次数:
278
现在试试通过JMS,在应用程序之间发送消息。先看看spring提供的RPC方案(其实还有其他方案,只是没见过谁用)。需要使用到这两个类:·org.springframework.jms.remoting.JmsInvokerServiceExporter将bean导出为基于消息的服务·org.spr...
分类:
其他好文 时间:
2014-11-03 20:39:42
阅读次数:
258
添加spring支持,同前添加Hibernate支持,注意加上注解支持建包,并反向生成实体类,注意使用注解,去掉实体类映射文件添加struts支持找到applicationContext.xml文件,找到beans标签,在命名空间内,添加context,如下:xmlns:context=http://www.springframework.org/schema/co..
分类:
其他好文 时间:
2014-11-03 01:28:58
阅读次数:
186
ThreadLocal是为了使每个线程保存一份属于自己的数据。先看一个使用ThreadLocal的实例。package org.springframework.aop.framework;import org.springframework.core.NamedThreadLocal;public ...
分类:
其他好文 时间:
2014-11-02 23:45:21
阅读次数:
256
package com.sinosoft.base.util;import org.springframework.beans.BeansException;import org.springframework.beans.factory.NoSuchBeanDefinitionException;...
分类:
编程语言 时间:
2014-11-02 16:26:18
阅读次数:
247
在使用eclipse进行整合springmvc时经常会碰到这样的异常:java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener这时里的意思是说找不到jar包,如果使用的是maven管理...
分类:
编程语言 时间:
2014-11-01 20:29:00
阅读次数:
217
用Annotation的@Scope("prototype")实验两个对象还是相等的,用xml的scope="prototype"就不一样,代码如下:import org.springframework.context.annotation.Scope;import org.springframew...
分类:
其他好文 时间:
2014-11-01 17:36:48
阅读次数:
153
环境:spring-context-support-4.0.5.RELEASE.jar(需要此包的\org\springframework\scheduling\quartz\)<!--管理类可以使用多个触发器-->
<!--lazy-init=‘false‘容器启动就会执行调度程序-->
<beanid="taskManager"lazy-init="false"autowire="no"
class="org..
分类:
编程语言 时间:
2014-10-31 19:20:03
阅读次数:
203