
Spring
tobeno2
这个作者很懒,什么都没留下…
展开
-
070615 struts中spring载入小结
如果是在struts-config.xml中直接写为 <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"/> ,则是默认配置文件为在WEB-INF下的action-servlet.xml文件,可在action-servlet.xml中再截入各个action bean的配置,如<impor...2007-06-15 12:16:00 · 102 阅读 · 0 评论 -
spring mvc responsebody的单元测试方法
@Test public void hasPhotoInPhotoclass() throws Exception { int results = teamPhotoClassController.hasPhotoInPhotoclass( String.valueOf( TEAMPHOTOCLASSID ) ) ; assertTrue( results >= 1 ) ; as...原创 2011-05-13 08:47:11 · 255 阅读 · 0 评论 -
单元测试SpringMVC带文件上传的controller
@Test public void postUpdateTeamPhotoEditWithStringParameter() throws Exception { MockMultipartHttpServletRequest request = new MockMultipartHttpServletRequest() ; String strTEAMPHOTOCLASSID = Stri...原创 2011-05-05 16:33:14 · 285 阅读 · 0 评论 -
spring roo实体建立关联关系
many to oneentity --class ~.domain.Photo --testAutomaticallyfield set --fieldName photos --type ~.domain.Photofield reference --fieldName template --type ~.domain.Template Many to Many field...原创 2011-05-04 10:17:10 · 105 阅读 · 0 评论 -
spring中连接池的配置
在默认通过myeclipse生成的配置里,spring使用的是apache的dbcp连接池<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver">2008-03-19 12:09:00 · 193 阅读 · 0 评论 -
acegi step by step 2
在配置好acegi的那些filter之类什么的之后,建立index.jsp、login.jsp、order/authorizeOrder.jsp、order/createOrder.jsp文件,按照之前的配置,权限分配是: /index.jsp=ROLE_ADMIN,ROLE_TECHNICIAN /order/createOrder.jsp=ROLE_TECHNICIAN ...2008-03-05 15:52:00 · 176 阅读 · 0 评论 -
acegi step by step 1
一、环境设定:相关jar:acegi-security-1.0.5.jar - Main classes of the Acegi Security system cglib-2.1.3.jar - Code-generation library used by Spring commons-codec-1.3.jar - Encoders and decoders such as B...2008-02-28 17:54:00 · 129 阅读 · 0 评论 -
CharacterEncodingFilter
<filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <pa...2008-01-15 09:36:00 · 187 阅读 · 0 评论 -
spring+hibernate里session的管理
在spring+hibernate的时候,控制台提示“unclosed connection,forgot to call close() on your session?”或者是[org.hibernate.jdbc.ConnectionManager] - <finalizing with closed connection>那是因为有可能是你自己手动创建了session,比如...2008-01-10 18:41:00 · 391 阅读 · 0 评论 -
(转)spring中配置log4j
利用Spring框架编程,console打印出log4j:WARN Please initialize the log4j system properly? 说明你的log4j.properties没有配置。请把log4j.properties放到工程的classpath中,eclipse的classpath为bin目录,由于编译后src目录下的文件会拷贝到bin目录下,所以你可以把log4j.p...2006-09-26 10:54:00 · 82 阅读 · 0 评论 -
acegi 添加验证码
<bean id="authenticationProcessingFilter" class="com.pixel.hibernate.HomeAloneAuthenticationProcessingFilter"> <property name="authenticationManager"> ...2008-07-28 12:11:00 · 181 阅读 · 0 评论 -
070921 继续acegi
spring1 的acegi里,今天在启动的时候,tomcat没有报错。不过在请求受保护的注册页面时tomcat提示/j_acegi_security_check出错。然后检查了,发现没有在web.xml里配置这个路径,于是在web.xml加入:<filter> <filter-name>Acegi Filter Chain Proxy</filter-n...2007-09-21 09:11:00 · 89 阅读 · 0 评论 -
070920 acegi实践
使用spring1 AOP为acegi添加拦截器的时候,使用spring2的包是会报错的。把spring1的包再加进去就可以了。2007-09-20 10:08:00 · 112 阅读 · 0 评论 -
070807 HibernateTemplate删除数据小结
删除DAO代码: public void delete(Integer lid) { log.debug("deleting Login instance"); try { Login login=(Login)this.getHibernateTemplate().load(Login.class,lid); getHiberna...2007-08-07 10:57:00 · 158 阅读 · 0 评论 -
spring下jotm jta实现小结
需求是从sql2005读取数据,然后写到另外一个oracle库中,尝试过jotm和atomikos两种,很多人都说atomikos好些,但它对sql2005的支持好像不太好,配置后有些报错,官方文档所sql2005配置起来比较麻烦,需要在数据库端作配置的。所以使用jotm,使用的版本是xapool-1.5.0。过程中遇到了一些问题,由于需要数据库遇到断网、数据库重启等情况后能自动重连,所以...原创 2012-02-13 15:27:54 · 147 阅读 · 0 评论