杂项记录,待整理

comment on table "HNASIS_TEST"."TA_FLIGHT_V2" is '系统的航班基本信息表';
comment on column "HNASIS_TEST"."TA_FLIGHT_V2"."FLT_ALCDTW" is '航空公司两字代码';

1.exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of
又见这样的错误,原因是对于一些数字项由于从数据库里面取出的值为null

2.映射为bolean的字段,在建表时,如果没有设定字段的default值,会导致exception setting property value with CGLIB setter错误.设置好默认值问题就可以解决了


--------------------得到SPRING的BEAN-------------
1 .WebApplicationContextUtils .getRequiredWebApplicationContext(servlet.getServletContext());
public Object getBean(String name)
{
if (ctx == null)
{
ctx = WebApplicationContextUtils
.getRequiredWebApplicationContext(servlet.getServletContext());
}
return ctx.getBean(name);
}

2. public static void main(final String[] args) throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("context.xml", Boot.class); //必需放在WEB-INF/lib/class下面
FooService fooService = (FooService) ctx.getBean("fooService");
fooService.insertFoo (new Foo());
}


3. ApplicationContext ctx = new FileSystemXmlApplicationContext(new String[] { "src/cn/com/jbaptech/po/applicationContext.xml" });ctx.getBean("fooService");

-

-------------------struts copy对象-----------------------------------

BeanUtils.copyProperties(itemNew, itemOld);

------------------手型鼠标 页面上的------------------------------

style="cursor:pointer"

-----------------------下载时,设置response的参数----------------------

response.setContentType("APPLICATION/OCTET-STREAM");
response.setHeader("Content-Disposition","attachment; filename=\""+new String(fullName.getBytes("gb2312"),"ISO8859-1")+"\"");


------------------------查找路径方法-----------------------------------
在类中: this.getClass().getClassLoader().getResource("/").getPath(); -- 返回 "工程/web-inf/classes"路径,可以把“/”替换成 ××.xml 找文件

--------------------------linux 乱改显卡型号后-------------------------
cd /etc/Xll
cp xorg.conf.back xorg.conf //还原成以前的配置

----------web 项目在 JAVA中获得SESSION (配DWR)------------------

WebContext webCtx = WebContextFactory.get();
User o = (User)webCtx.getSession().getAttribute(AppConstants.SESSION_USER);

It's easy to use DWR and Reverse Ajax from a thread outside of DWR. You can't use WebContext though because that's only of use to threads under the control of DWR.In place of WebContext, you should use ServerContext, which has many of the same operations

--------------------excel-中的VB-----------------
Function fun(param,...)
fun = "return"
End Function
连接用 &,转化Int()

--------------------EXCEL 1列隔行填充色--------------------------------
先选中列,“格式”--“条件格式”--“公式”--“=MOD(ROW(),2)=0”--“格式”选成需要的


--------------------------EXCEL 级联下拉-------------------------------数据 有效性 公式:=INDIRECT(A1),
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值