摘要: 1 2 8 9 10 11 13 14 1 package wjf.maven; 2 3 import java.lang.annotation.Documented; 4 import java.lang.annotation.ElementType; 5 import java.lang.anno... 阅读全文
posted @ 2016-04-01 09:38 wujf 阅读(415) 评论(0) 推荐(0)
摘要: package com.my.proper; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component("configInfo") public class ConfigInfo { @Value("${p... 阅读全文
posted @ 2016-03-17 16:26 wujf 阅读(346) 评论(0) 推荐(0)
摘要: ... 阅读全文
posted @ 2016-03-17 16:15 wujf 阅读(384) 评论(0) 推荐(0)
摘要: 向原作者致敬,原文地址http://www.cnblogs.com/linjiqin/p/3388298.html FreeMarker的插值有如下两种类型:1,通用插值${expr};2,数字格式化插值:#{expr}或#{expr;format} ${book.name?if_exists } 阅读全文
posted @ 2016-03-11 16:39 wujf 阅读(473) 评论(0) 推荐(0)
摘要: 拦截器作用:可以用于用户操作的安全检查,如:登录、权限等 package com.tool; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServ 阅读全文
posted @ 2016-03-11 11:13 wujf 阅读(351) 评论(0) 推荐(0)
摘要: package com.tool; public class MyException extends Exception{ public String Msg; public String ErrCode; public MyException(String msg,String code) { s 阅读全文
posted @ 2016-03-11 11:11 wujf 阅读(256) 评论(0) 推荐(0)
摘要: <!-- jsp视图解析器--> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass"> <value 阅读全文
posted @ 2016-03-11 10:44 wujf 阅读(1025) 评论(0) 推荐(0)
摘要: 接口定义 接口实现类 service接口注入 要么使用限制名,要么使用Resource注入并指定名字,否则会报错 错误描述的意思就是有两个接口实现 阅读全文
posted @ 2016-03-10 12:45 wujf 阅读(218) 评论(0) 推荐(0)
摘要: @Transactional spring 事务注解 默认遇到throw new RuntimeException("...");会回滚需要捕获的throw new Exception("...");不会回滚// 指定回滚@Transactional(rollbackFor=Exception.cl 阅读全文
posted @ 2016-03-05 18:21 wujf 阅读(539) 评论(0) 推荐(0)
摘要: 场景:一个人有多个手机号,一个手机号对应一个人 CREATE TABLE test.mobile ( mid INT NOT NULL auto_increment, tel VARCHAR (50), pid INT, PRIMARY KEY (mid) ); CREATE TABLE test. 阅读全文
posted @ 2016-03-04 16:36 wujf 阅读(239) 评论(0) 推荐(0)