随笔分类 -  SpringMVC

摘要:未与 -source 1.6 一起设置引导类路径没有处理程序要使用以下任何注释:javax.persistence.PersistenceContext在eclipse里将jre runtime library设置为1.7 阅读全文
posted @ 2014-10-23 16:31 LeonGo 阅读(3418) 评论(0) 推荐(0)
摘要:1 改为1 JTA 在jee环境下运行RESOURCE_LOCAL在jse环境下使用 阅读全文
posted @ 2014-10-14 15:07 LeonGo 阅读(3561) 评论(0) 推荐(0)
摘要:The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" ... 阅读全文
posted @ 2014-10-14 10:26 LeonGo 阅读(1161) 评论(0) 推荐(0)
摘要:ContextLoaderListener构建Root Context时序图DispatcherServlet创建context时序图: 阅读全文
posted @ 2014-10-10 23:14 LeonGo 阅读(194) 评论(0) 推荐(0)
摘要:一.读取xml配置文件(一)新建一个java bean(HelloBean.java) 1 package XX.XXX.XXX; 2 3 public class HelloBean { 4 private String helloWorld; 5 6 publi... 阅读全文
posted @ 2014-10-10 23:08 LeonGo 阅读(259) 评论(0) 推荐(0)
摘要:前段时间对Spring的事务配置做了比较深入的研究,在此之间对Spring的事务配置虽说也配置过,但是一直没有一个清楚的认识。通过这次的学习发觉Spring的事务配置只要把思路理清,还是比较好掌握的。总结如下: Spring配置文件中关于事务配置总是由三个组成部分,分别是DataSource、Tra... 阅读全文
posted @ 2014-09-30 13:08 LeonGo 阅读(250) 评论(0) 推荐(0)
摘要:Spring框架是一个分层架构,由 7 个定义良好的模块组成。Spring 模块构建在核心容器之上,核心容器定义了创建、配置和管理 bean 的方式。下面介绍Spring中接口注入的三种方式。Type1 接口注入我们常常借助接口来将调用者与实现者分离。如:public class ClassA { ... 阅读全文
posted @ 2014-09-29 17:52 LeonGo 阅读(370) 评论(0) 推荐(0)
摘要:使用接口注入,不能直接注入实现类型比如xxx.xxx.UserService应该为xxx.xxx.IUserService否则就会报but was actually of type [com.sun.proxy.$Proxy33]之类的错误 阅读全文
posted @ 2014-09-29 17:45 LeonGo 阅读(2906) 评论(1) 推荐(0)
摘要:1 2 3 4 7 8 9 10 11 12 org.hibernate.dialect.H2Dialect13 true14 true15 ... 阅读全文
posted @ 2014-09-27 17:14 LeonGo 阅读(601) 评论(0) 推荐(0)
摘要:INFO: Initializing Spring root WebApplicationContextINFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization ... 阅读全文
posted @ 2014-09-27 15:43 LeonGo 阅读(5965) 评论(0) 推荐(0)
摘要:在基于注解方式配置Spring的配置文件中,你可能会见到这样一条配置,他的作用是隐式地向Spring容器注册AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、PersistenceAnnotationBean... 阅读全文
posted @ 2014-09-26 09:08 LeonGo 阅读(215) 评论(0) 推荐(0)
摘要:在servlet-context中增加(有了就不用写这个了)还要增加xmlnsxmlns:tx="http://www.springframework.org/schema/tx"http://www.springframework.org/schema/tx http://www.springfr... 阅读全文
posted @ 2014-09-19 08:56 LeonGo 阅读(20640) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-09-16 16:02 LeonGo 阅读(202) 评论(0) 推荐(0)
摘要:classpath 和 classpath* 区别:classpath:只会到你指定的class路径中查找找文件;classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找. 阅读全文
posted @ 2014-09-16 14:02 LeonGo 阅读(150) 评论(0) 推荐(0)
摘要:配置过滤器在servlet前执行。 1 2 HiddenHttpMethodFilter 3 org.springframework.web.filter.HiddenHttpMethodFilter 4 ... 阅读全文
posted @ 2014-09-09 17:15 LeonGo 阅读(375) 评论(0) 推荐(0)
摘要:解释: 阅读全文
posted @ 2014-09-09 16:46 LeonGo 阅读(143) 评论(0) 推荐(0)