3月

2月的总结太少了,

3-1

很全面的Spring mvchttp://www.cnblogs.com/sunniest/p/4555801.html

3-15

hibernate的级联,

在一的一方@OneToMany(mappedBy="question",cascade={CascadeType.ALL}),其中question 代表多的一方的属性名,并且一这边属性为多的集合,可以使set,也可以是list

在多的一方    @ManyToOne(cascade={CascadeType.ALL})public Question getQuestion() {}

包装类:

其实级联的配置就是一种包装类,操作question,其实就代表着和quesitonItem的数据了

ajax:

利用printWriter可以将数据返回给ajax的回调函数,如PrintWriter out=response.getWriter();  可以在out.print(“true”);直接输出数据,即回调中的data,也可以借助JSONObject来返回给data

spring的数据绑定:

可以利用1、实体类,2、request.getParameter(""),3、PathVarible绑定在路径中,4、利用数组String[],5、利用Map<String, String[]> map=request.getParameterMap();

3.17

hibernate3之后 uniqueResult返回的是Long,不可以直接转int,得先转成Number。然后再intValue,或者先转成String,在转int

 3-21

Spring quarts定时任务 http://blog.csdn.net/wilsonke/article/details/26590379

若修改了视图的原表的字段,例如增加字段,那么视图得重新生成,否则修改对于视图不起作用,但是修改了字段名称,视图会实时更新

3-23

返回按钮失效

history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
        })

3-28

修改插件的样式的话,一般不是很好的修改,那么可以利用别的按钮然后绑定一个事件document.getElementById("id").click() ,便可以使用自己的样式调用插件

@RequestParam 与request.getParameter的区别,若要传的值为复选框,使用request只能取到一个值,而RequestParam则可以取到P,s这样的值

 
原文地址:https://www.cnblogs.com/happy0120/p/6485494.html