杂项记录,待整理

    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),

你可能感兴趣的:(spring,linux,DWR,Excel,vb)