• 国内较快速的软件源:

    1
    2
    3
    4
    5
    6
    src/gz chaos_calmer_base http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/base
    src/gz chaos_calmer_luci http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/luci
    src/gz chaos_calmer_packages http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/packages
    src/gz chaos_calmer_routing http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/routing
    src/gz chaos_calmer_telephony http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/telephony
    src/gz chaos_calmer_management http://openwrt.mirrors.ustc.edu.cn/chaos_calmer/15.05.1/ar71xx/nand/packages/management
  • openwrt降级安装ipk

    1
    opkg install ipkname.ipk --force-downgrade


applicationContext-security.xml命名空间配置,官方提供了两种配置方案

  • 第一种、命名空间用beans开头,但是在配置中一直需要用来配置。
1
2
3
4
5
6
7
8
9
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd">

...
</beans>
阅读全文 »

根据前端设计原则html->内容,css->样式,js->动作一般会将按钮点击事件在js中绑定,但是button元素type属性默认值在不同浏览器有差异,故在除IE以外浏览器中会造成多次提交或提交表单后页面又刷新的问题,故记录button元素用法如下:

阅读全文 »

在Java中取用户信息的代码:

1
2
3
4
5
6
7
8
9
10
11
Object principal = SecurityContextHolder.getContext()
.getAuthentication().getPrincipal();
if (principal instanceof UserDetails) {
username = ((UserDetails) principal).getUsername();
Iterator it = ((UserDetails) principal).getAuthorities().iterator();
String authority = "";
while (it.hasNext()) {
authority = ((GrantedAuthority) it.next()).getAuthority();
System.out.println("Authority:" + authority);
}
}
阅读全文 »

easyui deleteRow方法批量执行出错

easyui的datatgrid表格组件deleteRow(rowIndex)删除行方法中,删除一行后会立即调用opts.view.deleteRow.call(opts.view,_4d2,_4d3),刷新页面上剩余行的rowIndex,rowIndex发生改变后,原来rows的数据也会发生改变,删除会出错,故把这个rows复制给另外一个数组,每次删除再重新查找rowIndex。

阅读全文 »