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

浙公网安备 33010602011771号