
Spring
文章平均质量分 63
SAN_YUN
这个作者很懒,什么都没留下…
展开
-
spring 3.0.5.RELEASE版本的bug
启动报错:[code="java"]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbossServiceManager' defined in ServletContext resource [/WEB-INF/spring/app-context.xml...原创 2012-10-26 11:05:50 · 337 阅读 · 0 评论 -
Spring 创建bean的过程
BeanFacotryApplicationContext1. beans包提供了以编程方式管理和操作bean的基本功能,而context包增加了ApplicationContext,它以一种更加面向框架的方式增强了BeanFactory的功能。2. context包的基础是位于org.springframework.context包中的ApplicationConte...原创 2012-10-11 09:42:14 · 180 阅读 · 0 评论 -
Spring中ref local与ref bean区别:
Spring中ref local与ref bean区别: 今天在做SSH框架Demo实例时,在ApplicationResources.properties文件时对<ref bean>与<ref local>感到不解,经查找资料才弄明白,如下: <bean id="userDAOProxy" ...原创 2012-10-08 11:34:45 · 108 阅读 · 0 评论 -
Spring Resource接口总结
Spring 通过Resource接口对资源进行抽象,资源可以是:URLFILEInputStream 和Resource对应的是ResourceLoader,不同的Resource对应不同的实现。DefaultResourceLoader是一个最基本的实现。...原创 2013-01-17 11:52:26 · 116 阅读 · 0 评论 -
spring的类型转换机制(BeanWrapper)
spring作为一个beanFactory,免不了要做类型转化,这些工作都是委托给BeanWrapper 先来看一个简单的例子:Blog object = new Blog();BeanWrapper bean = new BeanWrapperImpl(object);bean.setPropertyValue("id", "1");bean.setPropertyVal...原创 2012-10-02 18:42:43 · 305 阅读 · 0 评论 -
spring mvc 快速启动
依赖: <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframe...原创 2012-12-30 00:33:52 · 254 阅读 · 0 评论 -
spring 框架快速启动
1. 通过maven新建工程 2. 添加依赖包<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://ma...原创 2012-12-18 18:36:23 · 242 阅读 · 0 评论 -
Spring Security授权 AccessDecisionManager
在前面那篇博客有一段配置:[code="xml"] [/code]pattern表示url,access表示url的权限,但这个isAuthenticated()具体在哪里执行呢?原来Spring提供授权...原创 2012-08-13 18:35:17 · 395 阅读 · 0 评论 -
Spring Security入门
参考官方文档(http://www.mossle.com/docs/springsecurity3/html/technical-overview.html)spring 是一个非常流行和成功的 Java 应用开发框架。Spring Security 基于 Spring 框架,提供了一套 Web 应用安全性的完整解决方案。一般来说,Web 应用的安全性包括用户认证(Authenticati...原创 2012-08-13 15:52:37 · 103 阅读 · 0 评论 -
spring mvc异常吃掉的问题
今天发现spring mvc把一个view参数匹配异常(org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'tagSet' is not present)吃掉了: 1.通过debug发现Exception 2.异常被processHand...原创 2012-11-21 16:21:33 · 365 阅读 · 0 评论 -
spring的FactoryBean机制
spring可以通过的FactoryBean的形式把一个Factory整合到spring中。比如solr的客户端CommonsHttpSolrServer: CommonsHttpSolrServer server = new CommonsHttpSolrServer("http://192.168.1.100:7100/solr/feed"); server.setSoTimeout...原创 2012-11-20 16:18:05 · 145 阅读 · 0 评论 -
Spring对Ibatis的封装
spring 对ibatis的封装通过SqlMapClientTemplate实现。通常如果我们直接使用ibatis的sqlMapClient进行insert操作或者queryForObject都会抛出sqlSQLException:[code="java"] try { cli.insert("MS-INSERT-UNREADCOUNT", unreadCount)...原创 2012-08-12 18:04:19 · 179 阅读 · 0 评论 -
servlet 整合freemarkder
Servlet与FreeMarker整合 http://oma1989.iteye.com/blog/1421804 SpringTemplateLoader public class SpringTemplateLoader implements TemplateLoader { protected final Log logger = LogFactor...原创 2013-04-18 15:51:46 · 157 阅读 · 0 评论 -
spring schema文档
spring schema 扩展基于Spring可扩展Schema提供自定义配置支持原创 2013-03-15 17:26:24 · 115 阅读 · 0 评论 -
三个类实现通过spring启动web容器
对于struts2这样的web框架,需要整合spring来管理所有的bean,spring本身也提供了ContextLoaderListener来初始化容器。可以通过扩展ContextLoaderListener来控制spring。[img]http://dl.iteye.com/upload/attachment/0063/8373/cffdd761-1b5e-3915-935c-1...原创 2012-02-27 17:29:57 · 2315 阅读 · 0 评论 -
PathMatchingResourcePatternResolver
PathMatchingResourcePatternResolver是一个通配符的Resource查找器,包括: /WEB-INF/*-context.xml com/mycompany/**/applicationContext.xml file:C:/some/path/*-context.xml classpath:com/mycompany/**/applicationC...原创 2012-02-27 16:40:36 · 266 阅读 · 0 评论 -
Spring 记录
MethodParameter BeansWrapper ResourcePatternResolver 获取参数名字。------------------------------------------------------------(FilterBean L73)PropertyAccessorFactoryServletContextResourc...原创 2012-02-27 16:12:12 · 108 阅读 · 0 评论 -
Spring JdbcTemplate执行过程分析
调用入口调用JdbcTemplate提供的API都会委托给execute(),代码如下:public <T> T execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action) throws DataAccessException { Assert.notNull...原创 2013-07-08 16:38:15 · 340 阅读 · 0 评论