自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 super和this的使用

super相当于一个弗雷对象的引用,this相当与当前对象的一个引用。 super的使用: 子类的构造方法中,调用父类的构造方法是,可以用super([父类构造方法中相应的参数列表]),在调用时,必须在子类构造方法的第一行。 子类方法中,子类复写了父类的方法,当调用该方法时,不想使用父类的方法,那么就用super.method(),调用父类的方法。 this的使用: 在同一个类中,非静态

2017-11-06 16:28:07 201

原创 获取运行时期的对象类型

getClass().getGenericSuperclass()返回表示此 Class 所表示的实体(类、接口、基本类型或 void)的直接超类的 Type然后将其转换ParameterizedTypegetActualTypeArguments()返回表示此类型实际类型参数的 Type 对象的数组。[0]就是这个数组中第一个了。。简而言之就是获得超类的泛型参数的实际类型。。比如:超类publi

2017-11-06 16:21:19 257

原创 hibernateTransactionManager的问题

org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type [org.springframework.orm.hibernate5.HibernateTemplate] to required type [org.springframework.transaction.Plat

2017-11-03 22:36:31 886

转载 一个web项目web.xml的配置中<context-param>配置作用

一个web项目web.xml的配置中配置作用 的作用: web.xml的配置中配置作用 1. 启动一个WEB项目的时候,容器(如:Tomcat)会去读它的配置文件web.xml.读两个节点: 和 2.紧接着,容器创建一个ServletContext(上下文),这个WEB项目所有部分都将共享这个上下文. 3.容器将转化为键值对,并交给ServletContext. 4

2017-10-28 10:28:11 139

转载 SpringMVC和Spring的配置文件扫描包详解

其实Spring和SpringMVC是有父子容器关系的,而且正是因为这个才往往会出现包扫描的问题,我们在此来分析和理解Spring和SpringMVC的父子容器关系并且给出Spring和SpringMVC配置文件中包扫描的官方推荐方式。   在Spring整体框架的核心概念中,容器是核心思想,就是用来管理Bean的整个生命周期的,而在一个项目中,容器不一定只有一个,Spring中可以包括多个

2017-10-28 09:57:35 349

转载 <context-param>与<init-param>的区别

读完本文,你将了解(1)的作用和用法,(2)配置和的区别 的作用和用法: 1.配置是是一组键值对,比如:           home-page         home.jsp     param-name是键,相当于就是参数名,param-value是值,相当于参数值 2.当服务器启动时,服务器会读取web.xml配置,当读到和这两个节点的时候,容器会将这

2017-10-27 18:10:01 254

原创 Manual commit is not allowed over a Spring managed SqlSession

java.lang.UnsupportedOperationException: Manual commit is not allowed over a Spring managed SqlSession at org.mybatis.spring.SqlSessionTemplate.commit(SqlSessionTemplate.java:282) at cn.itsun.spring

2017-10-27 12:28:43 1917

原创 springmvc和mybatis整合出现的问题

Invalid bound statement (not found): cn.itsun.springmvc.service.ItemService.findItemsList 在web.xml文件中 配置的顺序不清楚. 错误示范:目前还不清楚原因 springmvc org.springframework.web.servlet.DispatcherServle

2017-10-26 23:07:48 238

原创 Type interface cn.itsun.dao.UserDao is not known to the MapperRegistry.

org.apache.ibatis.binding.BindingException: Type interface cn.itsun.dao.UserDao is not known to the MapperRegistry. at org.apache.ibatis.binding.MapperRegistry.getMapper(MapperRegistry.java:47) at o

2017-10-25 12:18:12 2500

原创 在学习Mybatis时遇见的问题 org.apache.ibatis.exceptions.PersistenceException:

org.apache.ibatis.exceptions.PersistenceException:  ### Error building SqlSession. ### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org.xml.sax.SAXPar

2017-10-25 12:11:47 520

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除