![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
JavaAlpha
在日益强调“团队工作(Team Work)”的今天,尽管你技术水平再高,但不愿意与人有效的沟通,那么你就不可能成功。我每天都在努力的工作,为的是使所有爱我的人以我为荣.
展开
-
Cannot initialize context because there is already a root application context present
严重: StandardWrapper.Throwable java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* de原创 2010-02-02 20:40:00 · 7555 阅读 · 4 评论 -
Cannot create a session after the response has been committed
页面刷新出现异常信息:2012-05-03 13:15:45,791 ERROR [TokenHelper.java:76] : Error creating HttpSession due response is commited to client. You can use the CreateSessionInterceptor or create the HttpSession fro原创 2012-05-03 13:22:00 · 5306 阅读 · 2 评论 -
Spring 3 Hibernate 3.0 annotation proxool连接池配置
由于Hibernate自带的链接池效率低效,并且有很多bug.所以官方并不推荐使用,推荐使用诸如proxool的连接池来代替Hibernate。该配置方法是由Spring来接管proxool连接池,不用额外增加Hibernate配置文件,以及数据库与持久对象的映射文件(使用注解的方式)。PS: 不要忘记将Hibernate库的 lib/optional/proxool文件夹中的proxoo原创 2012-05-07 17:53:13 · 2567 阅读 · 0 评论 -
SSH配置时错误:Class 'org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean' not foun
如题:SSH配置时错误:Class 'org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean' not foun配置环境:myeclipse 8.5 ,mysql jar说明:struts2.1.8.1,spring3.2.0,hibernate3 错误解决方法:因为myeclip原创 2013-04-23 10:27:35 · 8927 阅读 · 0 评论 -
applicationContext.xml 配置文件的存放位置
web.xml中classpath:和classpath*: 有什么区别? classpath:只会到你的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找. 存放位置:1:src下面需要在web.xml中定义如下:contextConfigLocationclasspath:applicationCo转载 2013-04-24 11:15:26 · 29876 阅读 · 2 评论 -
如何使用多个Spring的xml配置文件
如何使用多个Spring的xml配置文件(多模块配置)在用Struts Spring Hibernate进行项目团队开发的时候,我们每个开发人员可能都会用到spring的配置文件,如果我们每个开放人员都用同一个的话,这样会给项目开发带来一定的影响,不过大家不用急,Spring为我们提供了很好的方法,我们可以写多个xml文件,然后将每个文件引入进来就行了,话不多说了,马上开始!!方法一、在web转载 2013-06-05 09:24:45 · 1088 阅读 · 0 评论 -
spring 使用classpath方式加载hibernate映射文件
spring 使用classpath方式加载hibernate映射文件对应的Spring的版本:spring3.0 classpath:com/alpha/bean/*.hbm.xml 下面是搜集的其他的方法加载映射文件,仅供参考,如有错误欢迎指正:在Spring的applicationContext.xml中配置映射文件,通常是在这个Bean实例原创 2013-06-22 15:05:38 · 5814 阅读 · 0 评论 -
Struts 2 拦截器中得到bean以及读取WEB-INF下的spring的xml文件
Struts 2 拦截器中得到bean以及读取WEB-INF下的spring的xml文件1.直接得到beanpublic class OperaLogInterceptor extends AbstractInterceptor { private static final long serialVersionUID = 1L; @SuppressWarnings("unchecke原创 2013-07-26 15:49:38 · 4462 阅读 · 1 评论 -
Write operations are not allowed in read-only mode (FlushMode.MANUAL): 解决方法
只读模式下(FlushMode.NEVER/MANUAL)写操作不被允许:把你的Session改成FlushMode.COMMIT/AUTO或者清除事务定义中的readOnly标记。原创 2014-03-26 10:58:37 · 3425 阅读 · 0 评论 -
Spring声明式事务配置管理方法
环境配置项目使用SSH架构,现在要添加Spring事务管理功能,针对当前环境,只需要添加Spring 2.0 AOP类库即可。添加方法:点击项目右键->Build Path->Add librarys: 打开Add Libraries对话框,然后选定 MyEclipse Li转载 2014-05-08 10:51:09 · 966 阅读 · 0 评论 -
Java 读取ClassPathXmlApplicationContext xml 文件里面的bean
srpingmvc 集成 ActiveMQ原创 2015-08-20 12:12:16 · 2832 阅读 · 0 评论 -
java 获取当然JDK版本信息
<br />使用spring下的JdkVersion.java文件获取当然jdk版本信息。<br /><br /><br />JdkVersion.java代码:<br />package org.springframework.core;/** * Internal helper class used to find the Java/JVM version * that Spring is operating on, to allow for automatically * adapti原创 2011-04-27 15:03:00 · 8836 阅读 · 0 评论 -
Spring 系列: Spring 框架简介- Spring AOP 和 IOC 容器入门
<br />Naveen Balani (naveenbalani@rediffmail.com), 技术架构师, Webify Solutions<br />简介: 在这由三部分组成的介绍 Spring 框架的系列文章的第一期中,将开始学习如何用 Spring 技术构建轻量级的、强壮的 J2EE 应用程序。developerWorks 的定期投稿人 Naveen Balani 通过介绍 Spring 框架开始了他由三部分组成的 Spring 系列,其中还将介绍 Spring 面向方面的编程转载 2011-04-27 13:59:00 · 1414 阅读 · 0 评论 -
Tomcat spring 初始化 特别的慢!!将近3分钟。 使用ant+iBATIS+spring
找的原因是:WebApplicationContext 来做ioc容器加载会更慢。因为他需要检查bean的关联关系。 2010-2-3 9:29:03 org.apache.catalina.core.AprLifecycleListener init信息: The APR based Apache Tomcat Native library which allows optimal原创 2010-02-03 09:30:00 · 4008 阅读 · 0 评论 -
异常:SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Error: executeQueryForObject returned too many resu原创 2010-02-07 23:07:00 · 14469 阅读 · 2 评论 -
初探spring applicationContext在web容器中加载过程
首先从WEB.XML入手==>web.xml webAppRootKey task.root contextConfigLocation /WEB-INF/taskContext*.xml log4jConfigLocation /WEB-INF/log4j.prope原创 2010-02-07 23:09:00 · 6880 阅读 · 0 评论 -
关于Hibernate的Session和SessionFactory
HibernateUtil这个类就是帮助你建一个SessionFactory,管理Session的 要用session的时候,从这个类里面拿就是了 --------------------------------------------------------好像Session不是线程安全的吧。 HibernateUtil.java其实就是把SessionFactory,C转载 2010-02-28 10:02:00 · 7212 阅读 · 0 评论 -
Spring工作原理
本文介绍Spring工作原理,以及IoC(Inversion of control): 控制反转和AOP(Aspect-Oriented Programming): 面向方面编程。 Spring IDE的2.0版的未来计划 Eclipse下spring配置的应用 在Spring中装配bean的基本xml配置 用Spring framework实现定时器功能 简单转载 2010-02-24 22:34:00 · 1008 阅读 · 0 评论 -
spring 2.0 jar包 详解
Spring压缩包目录说明 关键字: sring jar 1. Spring压缩包目录说明 aspectj目录下是在Spring框架下使用aspectj的源代码和测试程序文件。 Aspectj是java最早的提供AOP的应用框架。 dist 目录下是Spring 的发布包,关于发布包下面会详细进行说明。 docs 目录下是相关的文档,包括有Spring api 的jav转载 2010-02-25 22:04:00 · 1293 阅读 · 1 评论 -
关于spring包的详解
spring.jar是包含有完整发布的单个jar包,spring.jar 中包含除了 spring-mock.jar里所包含的内容外其它所有jar包的内容,因为只有在开发环境下才会用到spring-mock.jar来进行辅助测试, 正式应用系统中是用不得这些类的。 除了spring.jar文件,Spring还包括有其它13个独立的jar包,各自包含着对应的Spring组件,用户可以根据自己转载 2010-02-25 22:02:00 · 782 阅读 · 0 评论 -
spring生命周期管理-初始化与销毁
spring生命周期管理只涉及单例对象的管理一初始化与销毁1.通过设置bean的init-mothed属性指定初始化的方法,他的限制是方法无法接受任何参数,方法可以为static2.实现InitializingBean接口的afterPropertiesSet()方法3.最好的方法是在afterProptertiesSet()中调用自定义初始化方法4.销毁单例对象可以通过指定b转载 2010-03-06 13:37:00 · 6304 阅读 · 0 评论 -
for bean with name 'permisAddAction' defined in ServletContext resource
2010-3-26 10:40:32 org.apache.catalina.core.StandardContext listenerStart严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderLi原创 2010-03-26 10:47:00 · 2811 阅读 · 0 评论 -
There is already a statement named SysUser.getUserByOrganCode in this SqlMap. spring id相同
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error crea原创 2010-04-03 11:34:00 · 5673 阅读 · 0 评论 -
Java 工程师成神之路
Java 工程师转载 2015-12-18 09:41:44 · 3123 阅读 · 1 评论