mybatis分页查询之sql server--mysql

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29883591/article/details/78343181

         在习惯了使用mysql进行数据操作后,突然转到sql server,虽然说两者在mybatis中的语法基本相同,很容易替换,但是,这也是最容易出问题的地方,因为往往我们会被这些些微的“不同”坑害。

         今天这里就分享一下mysql和sql server在分页查询中的区别以及这里的“坑”。

首先看一下mysql中分页查询的代码:

select * from sys_dormitoryBuilding limit 1,2;

这句sql语句执行的效果是选择第一行后的两行作为结果,也就是选择2、3两行,从这个例子,我们就可以写出如下的xml语句了:

<select id="selectByOptions" parameterType="com.huan.common.SearchCondition" resultMap="BuildingResult">
		select * from sys_dormitoryBuilding 
		<where>
		    1=1
			<if test="searchBean.buildingNum != null and searchBean.buildingNum != ''">
				and building_number like CONCAT('%',#{searchBean.buildingNum,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.name != null and searchBean.name != ''">
				and name like CONCAT('%',#{searchBean.name,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.address != null and searchBean.address != ''">
				and address like CONCAT('%',#{searchBean.address,jdbcType=INTEGER},'%')
			</if>
		</where>
		limit #{searchBean.start},#{searchBean.rows};
	</select>

      解释一下上面的语句,parameterType中的值是一个类,SearchCondition存放的是查询的参数,where里面的我们也就不看了,这是根据参数进行信息筛选的,limit #{searchBean.start},#{searchBean.rows},这句话我们重点看一下,这就是我们mysql里的分页查询方法,可以使用limit进行查询,#{searchBean.start}代表起始位置,#{searchBean.rows}代表每页的数据行数。

       看到这里,一切都是没问题的。对于limit,可以说是很好用了,但是sql server中并没有提供limit这样的操作,所以想要直接进行分页是不可能的。下面我们来看一下sql server中top使用的一种情况:

select top 2 * from staffInfo
where cardNum not in (
  select top 1 cardNum from staffInfo
)
在上面的sql语句中,就可以实现mysql中同样的功能了,选取的是2、3行的数据,这个语句很好理解,当然,效率上是有点小小的瑕疵。

<select id="selectByOptions" parameterType="com.huan.common.SearchCondition" resultMap="StaffResult">
		select top #{searchBean.rows} * from staffInfo
		<where>
		    1=1
			<if test="searchBean.cardNum != null and searchBean.cardNum != ''">
				and cardNum like CONCAT('%',#{searchBean.cardNum,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.realname != null and searchBean.realname != ''">
				and realname like CONCAT('%',#{searchBean.realname,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.department != null and searchBean.department != ''">
				and department like CONCAT('%',#{searchBean.department,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.job != null and searchBean.job != ''">
				and job like CONCAT('%',#{searchBean.job,jdbcType=VARCHAR},'%')
			</if>
			<if test="searchBean.available != null and searchBean.available != ''">
				and available like CONCAT('%',#{searchBean.sssssavailable,jdbcType=VARCHAR},'%')
			</if>
			and cardNum not in (
               select top #{searchBean.start} cardNum from staffInfo
             )
		</where>
	</select>
        对于上面的代码,我们对照下sql server中的语法,感觉是不是没毛病?那应该就是可以运行的了。可是,现实是残酷的,这个代码是会报错的。特别是对于xml封装的sql语句,我们找错就更加难了。
错误的提示信息如下(信息有点多我,我就截取一部分):

         从上面我们可以看出,对于输出的sql语句部分,用“?”代替的,我们是看不见的,这就是问题的关键(说实话,处于mysql这个用多了,我排除了好多的原因,找到这个真不容易),这个问题就在于我们这里使用的“#”,这就会导致我们的查询语句出现了问题,#在mysql中的用法和sql server中确实有了差别,在sql server中,#括起来的变量在使用中会自动添加引号,这就是强制把我们的变量变成了字符串了啊,而我们这里显然要用的是整数值,这明显就是错误的,所以知道这个错误的我内心也是。。。,这里只需要将“#”替换为“$”就行了。

下面是我从网上搜到的关于“#”和“$”符号的解释:

1、#是把传入的数据当作字符串,如#field#传入的是id,则sql语句生成是这样,order by “id”,这当然会报错。 
2、$传入的数据直接生成在sql里,如#field#传入的是id,则sql语句生成是这样,order by id, 这就对了。 
3、#方式能够很大程度防止sql注入。 
4、$方式无法防止sql注入。 
5、$方式一般用于传入数据库对象,例如传入表名。 
6、一般能用#的就别用$。

        好了,这次就分享这么多,下面贴上错误的完整信息,以便于别人查询。

[ssmTest] 2017-10-26 11:51:45 freemarker.beans Key "location" was not found on instance of org.springframework.jdbc.UncategorizedSQLException. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), SQLException=java.beans.PropertyDescriptor[name=SQLException; propertyType=class java.sql.SQLException; readMethod=public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException()], getLocalizedMessage=public java.lang.String java.lang.Throwable.getLocalizedMessage(), cause=java.beans.PropertyDescriptor[name=cause; propertyType=class java.lang.Throwable; readMethod=public synchronized java.lang.Throwable java.lang.Throwable.getCause()], getCause=public synchronized java.lang.Throwable java.lang.Throwable.getCause(), sql=java.beans.PropertyDescriptor[name=sql; propertyType=class java.lang.String; readMethod=public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql()], getSql=public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql(), getStackTrace=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace(), addSuppressed=public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable), hashCode=public native int java.lang.Object.hashCode(), rootCause=java.beans.PropertyDescriptor[name=rootCause; propertyType=class java.lang.Throwable; readMethod=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause()], getSuppressed=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed(), suppressed=java.beans.PropertyDescriptor[name=suppressed; propertyType=class [Ljava.lang.Throwable;; readMethod=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()], stackTrace=java.beans.PropertyDescriptor[name=stackTrace; propertyType=class [Ljava.lang.StackTraceElement;; readMethod=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()], getRootCause=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause(), class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], localizedMessage=java.beans.PropertyDescriptor[name=localizedMessage; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getLocalizedMessage()], printStackTrace=freemarker.ext.beans.OverloadedMethods@729c3d8a, initCause=public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable), mostSpecificCause=java.beans.PropertyDescriptor[name=mostSpecificCause; propertyType=class java.lang.Throwable; readMethod=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause()], getMessage=public java.lang.String org.springframework.core.NestedRuntimeException.getMessage(), message=java.beans.PropertyDescriptor[name=message; propertyType=class java.lang.String; readMethod=public java.lang.String org.springframework.core.NestedRuntimeException.getMessage()], getMostSpecificCause=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause(), java.lang.Object@1642994=freemarker.ext.beans.SimpleMethod@26f627bb, contains=public boolean org.springframework.core.NestedRuntimeException.contains(java.lang.Class), setStackTrace=public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]), java.lang.Object@492ab35d={public java.lang.String java.lang.Throwable.getLocalizedMessage()=[Ljava.lang.Class;@72f2cc03, public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)=[Ljava.lang.Class;@608ea13e, public java.lang.String org.springframework.core.NestedRuntimeException.getMessage()=[Ljava.lang.Class;@73eda0c8, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@64318af1, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@c7d0a0, public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause()=[Ljava.lang.Class;@15d516d7, public synchronized java.lang.Throwable java.lang.Throwable.getCause()=[Ljava.lang.Class;@ba01f45, public boolean org.springframework.core.NestedRuntimeException.contains(java.lang.Class)=[Ljava.lang.Class;@63ae6ac2, public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException()=[Ljava.lang.Class;@5d52e4c7, public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])=[Ljava.lang.Class;@608c2214, public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()=[Ljava.lang.Class;@6b5d5377, public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)=[Ljava.lang.Class;@7b35dca4, public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql()=[Ljava.lang.Class;@318b6bd9, public java.lang.String java.lang.Throwable.toString()=[Ljava.lang.Class;@3096737e, public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()=[Ljava.lang.Class;@31d148f0, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@64546292, public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause()=[Ljava.lang.Class;@eeb1862, public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()=[Ljava.lang.Class;@de59742}, equals=public boolean java.lang.Object.equals(java.lang.Object), toString=public java.lang.String java.lang.Throwable.toString(), getSQLException=public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException(), fillInStackTrace=public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()}
[ssmTest] 2017-10-26 11:51:45 freemarker.beans Key "location" was not found on instance of org.springframework.jdbc.UncategorizedSQLException. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), SQLException=java.beans.PropertyDescriptor[name=SQLException; propertyType=class java.sql.SQLException; readMethod=public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException()], getLocalizedMessage=public java.lang.String java.lang.Throwable.getLocalizedMessage(), cause=java.beans.PropertyDescriptor[name=cause; propertyType=class java.lang.Throwable; readMethod=public synchronized java.lang.Throwable java.lang.Throwable.getCause()], getCause=public synchronized java.lang.Throwable java.lang.Throwable.getCause(), sql=java.beans.PropertyDescriptor[name=sql; propertyType=class java.lang.String; readMethod=public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql()], getSql=public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql(), getStackTrace=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace(), addSuppressed=public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable), hashCode=public native int java.lang.Object.hashCode(), rootCause=java.beans.PropertyDescriptor[name=rootCause; propertyType=class java.lang.Throwable; readMethod=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause()], getSuppressed=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed(), suppressed=java.beans.PropertyDescriptor[name=suppressed; propertyType=class [Ljava.lang.Throwable;; readMethod=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()], stackTrace=java.beans.PropertyDescriptor[name=stackTrace; propertyType=class [Ljava.lang.StackTraceElement;; readMethod=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()], getRootCause=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause(), class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], localizedMessage=java.beans.PropertyDescriptor[name=localizedMessage; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getLocalizedMessage()], printStackTrace=freemarker.ext.beans.OverloadedMethods@729c3d8a, initCause=public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable), mostSpecificCause=java.beans.PropertyDescriptor[name=mostSpecificCause; propertyType=class java.lang.Throwable; readMethod=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause()], getMessage=public java.lang.String org.springframework.core.NestedRuntimeException.getMessage(), message=java.beans.PropertyDescriptor[name=message; propertyType=class java.lang.String; readMethod=public java.lang.String org.springframework.core.NestedRuntimeException.getMessage()], getMostSpecificCause=public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause(), java.lang.Object@1642994=freemarker.ext.beans.SimpleMethod@26f627bb, contains=public boolean org.springframework.core.NestedRuntimeException.contains(java.lang.Class), setStackTrace=public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]), java.lang.Object@492ab35d={public java.lang.String java.lang.Throwable.getLocalizedMessage()=[Ljava.lang.Class;@72f2cc03, public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)=[Ljava.lang.Class;@608ea13e, public java.lang.String org.springframework.core.NestedRuntimeException.getMessage()=[Ljava.lang.Class;@73eda0c8, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@64318af1, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@c7d0a0, public java.lang.Throwable org.springframework.core.NestedRuntimeException.getMostSpecificCause()=[Ljava.lang.Class;@15d516d7, public synchronized java.lang.Throwable java.lang.Throwable.getCause()=[Ljava.lang.Class;@ba01f45, public boolean org.springframework.core.NestedRuntimeException.contains(java.lang.Class)=[Ljava.lang.Class;@63ae6ac2, public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException()=[Ljava.lang.Class;@5d52e4c7, public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])=[Ljava.lang.Class;@608c2214, public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()=[Ljava.lang.Class;@6b5d5377, public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)=[Ljava.lang.Class;@7b35dca4, public java.lang.String org.springframework.jdbc.UncategorizedSQLException.getSql()=[Ljava.lang.Class;@318b6bd9, public java.lang.String java.lang.Throwable.toString()=[Ljava.lang.Class;@3096737e, public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()=[Ljava.lang.Class;@31d148f0, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@64546292, public java.lang.Throwable org.springframework.core.NestedRuntimeException.getRootCause()=[Ljava.lang.Class;@eeb1862, public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()=[Ljava.lang.Class;@de59742}, equals=public boolean java.lang.Object.equals(java.lang.Object), toString=public java.lang.String java.lang.Throwable.toString(), getSQLException=public java.sql.SQLException org.springframework.jdbc.UncategorizedSQLException.getSQLException(), fillInStackTrace=public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()}
[ssmTest] 2017-10-26 11:51:45 freemarker.beans Key "location" was not found on instance of com.microsoft.sqlserver.jdbc.SQLServerException. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), getLocalizedMessage=public java.lang.String java.lang.Throwable.getLocalizedMessage(), errorCode=java.beans.PropertyDescriptor[name=errorCode; propertyType=int; readMethod=public int java.sql.SQLException.getErrorCode()], cause=java.beans.PropertyDescriptor[name=cause; propertyType=class java.lang.Throwable; readMethod=public synchronized java.lang.Throwable java.lang.Throwable.getCause()], getSQLState=public java.lang.String java.sql.SQLException.getSQLState(), setNextException=public void java.sql.SQLException.setNextException(java.sql.SQLException), getCause=public synchronized java.lang.Throwable java.lang.Throwable.getCause(), SQLState=java.beans.PropertyDescriptor[name=SQLState; propertyType=class java.lang.String; readMethod=public java.lang.String java.sql.SQLException.getSQLState()], iterator=public java.util.Iterator java.sql.SQLException.iterator(), getStackTrace=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace(), addSuppressed=public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable), getErrorCode=public int java.sql.SQLException.getErrorCode(), hashCode=public native int java.lang.Object.hashCode(), getNextException=public java.sql.SQLException java.sql.SQLException.getNextException(), getSuppressed=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed(), suppressed=java.beans.PropertyDescriptor[name=suppressed; propertyType=class [Ljava.lang.Throwable;; readMethod=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()], stackTrace=java.beans.PropertyDescriptor[name=stackTrace; propertyType=class [Ljava.lang.StackTraceElement;; readMethod=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()], class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], localizedMessage=java.beans.PropertyDescriptor[name=localizedMessage; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getLocalizedMessage()], printStackTrace=freemarker.ext.beans.OverloadedMethods@7631e8e8, initCause=public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable), getMessage=public java.lang.String java.lang.Throwable.getMessage(), message=java.beans.PropertyDescriptor[name=message; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getMessage()], setStackTrace=public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]), java.lang.Object@492ab35d={public java.util.Iterator java.sql.SQLException.iterator()=[Ljava.lang.Class;@7c174ec5, public java.lang.String java.lang.Throwable.getLocalizedMessage()=[Ljava.lang.Class;@519ad3d9, public int java.sql.SQLException.getErrorCode()=[Ljava.lang.Class;@2b5f0093, public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)=[Ljava.lang.Class;@5250dbb8, public java.lang.String java.lang.Throwable.getMessage()=[Ljava.lang.Class;@1477d651, public java.sql.SQLException java.sql.SQLException.getNextException()=[Ljava.lang.Class;@13f4cb1d, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@407c1a68, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@142584c4, public synchronized java.lang.Throwable java.lang.Throwable.getCause()=[Ljava.lang.Class;@3e4a0d4f, public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])=[Ljava.lang.Class;@bd385b8, public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()=[Ljava.lang.Class;@2bdc71f0, public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)=[Ljava.lang.Class;@1367c3eb, public java.lang.String java.sql.SQLException.getSQLState()=[Ljava.lang.Class;@7d2994bd, public java.lang.String java.lang.Throwable.toString()=[Ljava.lang.Class;@6a4020e5, public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()=[Ljava.lang.Class;@225b9fac, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@f0e6897, public void java.sql.SQLException.setNextException(java.sql.SQLException)=[Ljava.lang.Class;@3eb389b7, public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()=[Ljava.lang.Class;@551fd18c}, equals=public boolean java.lang.Object.equals(java.lang.Object), toString=public java.lang.String java.lang.Throwable.toString(), nextException=java.beans.PropertyDescriptor[name=nextException; propertyType=class java.sql.SQLException; readMethod=public java.sql.SQLException java.sql.SQLException.getNextException()], fillInStackTrace=public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()}
[ssmTest] 2017-10-26 11:51:45 freemarker.beans Key "location" was not found on instance of com.microsoft.sqlserver.jdbc.SQLServerException. Introspection information for the class is: {getClass=public final native java.lang.Class java.lang.Object.getClass(), getLocalizedMessage=public java.lang.String java.lang.Throwable.getLocalizedMessage(), errorCode=java.beans.PropertyDescriptor[name=errorCode; propertyType=int; readMethod=public int java.sql.SQLException.getErrorCode()], cause=java.beans.PropertyDescriptor[name=cause; propertyType=class java.lang.Throwable; readMethod=public synchronized java.lang.Throwable java.lang.Throwable.getCause()], getSQLState=public java.lang.String java.sql.SQLException.getSQLState(), setNextException=public void java.sql.SQLException.setNextException(java.sql.SQLException), getCause=public synchronized java.lang.Throwable java.lang.Throwable.getCause(), SQLState=java.beans.PropertyDescriptor[name=SQLState; propertyType=class java.lang.String; readMethod=public java.lang.String java.sql.SQLException.getSQLState()], iterator=public java.util.Iterator java.sql.SQLException.iterator(), getStackTrace=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace(), addSuppressed=public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable), getErrorCode=public int java.sql.SQLException.getErrorCode(), hashCode=public native int java.lang.Object.hashCode(), getNextException=public java.sql.SQLException java.sql.SQLException.getNextException(), getSuppressed=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed(), suppressed=java.beans.PropertyDescriptor[name=suppressed; propertyType=class [Ljava.lang.Throwable;; readMethod=public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()], stackTrace=java.beans.PropertyDescriptor[name=stackTrace; propertyType=class [Ljava.lang.StackTraceElement;; readMethod=public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()], class=java.beans.PropertyDescriptor[name=class; propertyType=class java.lang.Class; readMethod=public final native java.lang.Class java.lang.Object.getClass()], localizedMessage=java.beans.PropertyDescriptor[name=localizedMessage; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getLocalizedMessage()], printStackTrace=freemarker.ext.beans.OverloadedMethods@7631e8e8, initCause=public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable), getMessage=public java.lang.String java.lang.Throwable.getMessage(), message=java.beans.PropertyDescriptor[name=message; propertyType=class java.lang.String; readMethod=public java.lang.String java.lang.Throwable.getMessage()], setStackTrace=public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]), java.lang.Object@492ab35d={public java.util.Iterator java.sql.SQLException.iterator()=[Ljava.lang.Class;@7c174ec5, public java.lang.String java.lang.Throwable.getLocalizedMessage()=[Ljava.lang.Class;@519ad3d9, public int java.sql.SQLException.getErrorCode()=[Ljava.lang.Class;@2b5f0093, public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)=[Ljava.lang.Class;@5250dbb8, public java.lang.String java.lang.Throwable.getMessage()=[Ljava.lang.Class;@1477d651, public java.sql.SQLException java.sql.SQLException.getNextException()=[Ljava.lang.Class;@13f4cb1d, public native int java.lang.Object.hashCode()=[Ljava.lang.Class;@407c1a68, public boolean java.lang.Object.equals(java.lang.Object)=[Ljava.lang.Class;@142584c4, public synchronized java.lang.Throwable java.lang.Throwable.getCause()=[Ljava.lang.Class;@3e4a0d4f, public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])=[Ljava.lang.Class;@bd385b8, public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()=[Ljava.lang.Class;@2bdc71f0, public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)=[Ljava.lang.Class;@1367c3eb, public java.lang.String java.sql.SQLException.getSQLState()=[Ljava.lang.Class;@7d2994bd, public java.lang.String java.lang.Throwable.toString()=[Ljava.lang.Class;@6a4020e5, public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()=[Ljava.lang.Class;@225b9fac, public final native java.lang.Class java.lang.Object.getClass()=[Ljava.lang.Class;@f0e6897, public void java.sql.SQLException.setNextException(java.sql.SQLException)=[Ljava.lang.Class;@3eb389b7, public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()=[Ljava.lang.Class;@551fd18c}, equals=public boolean java.lang.Object.equals(java.lang.Object), toString=public java.lang.String java.lang.Throwable.toString(), nextException=java.beans.PropertyDescriptor[name=nextException; propertyType=class java.sql.SQLException; readMethod=public java.sql.SQLException java.sql.SQLException.getNextException()], fillInStackTrace=public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()}


猜你喜欢

转载自blog.csdn.net/qq_29883591/article/details/78343181