sqlserver版: 查询当前数据库下所有表名: select * from sys.tables; 查询当前库下,一张表的表名,字段名,字段类型,字段长度: select a.name 表名,b.name 字段名,c.name 字段类型,c.length 字段长度 from sysobjects a,syscolumns b,systypes c where a.id=b.idand a.name='DSE_SYS_DISTRICT' and a.xtype='U'and b.xtype=c…
需求:提交一个字符串到后端的java.sql.Time类型,就报错了: Failed to convert property value of type [java.lang.String] to required type [java.sql.Time] 正常提交到java.util.Date类型是没有问题的. 所以这里就需要扩展内置的springmvc的转换器 代码如下: WebConfig : 添加新的类型转换器 import javax.annotation.PostConstruct;…
一.类型转换器 1.在动作类action中,声明和表单中name属性的值同名的属性,提供get和set方法,struts2就可以通过反射机制,从页面中获取对应的内容 package com.kdyzm.convert; import com.opensymphony.xwork2.ActionSupport; public class TypeConvertAction extends ActionSupport{ private static final long serialVersionU…