├── .gitignore ├── README.md ├── pom.xml └── src └── main ├── java └── com │ └── github │ └── miemiedev │ └── smt │ ├── entity │ └── User.java │ ├── repository │ ├── MyBatisRepository.java │ ├── UserDao.java │ └── UserDao.mbts.xml │ ├── service │ └── AuthService.java │ ├── support │ ├── ErrorMessage.java │ └── ResponseBodyHandlerExceptionResolver.java │ └── web │ ├── UserController.java │ └── util │ └── PageForm.java ├── resources ├── application.properties ├── applicationContext.xml ├── logback.xml └── mybatis-config.xml └── webapp ├── WEB-INF ├── spring-mvc.xml ├── views │ ├── account │ │ ├── jstl.jsp │ │ └── userList.jsp │ ├── error │ │ ├── 404.jsp │ │ └── 500.jsp │ └── template.jsp └── web.xml ├── css ├── main.css └── normalize.css ├── img └── .gitignore ├── index.html └── js ├── account └── userList.js ├── main.js ├── plugins.js └── vendor ├── jquery-1.9.0.min.js └── modernizr-2.6.2.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Spring+MyBatis含分页的基本配置 -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.github.miemiedev 8 | spring-mybaits-template 9 | 0.1 10 | war 11 | 12 | 13 | UTF-8 14 | 15 | 16 | 17 | 18 | 19 | org.apache.maven.plugins 20 | maven-compiler-plugin 21 | 3.0 22 | 23 | 1.5 24 | 1.5 25 | 26 | 27 | 28 | 29 | 30 | src/main/java 31 | 32 | **/*.properties 33 | **/*.xml 34 | 35 | 36 | 37 | src/main/resources 38 | 39 | **/*.* 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | javax.servlet 48 | servlet-api 49 | 2.5 50 | provided 51 | 52 | 53 | javax.servlet 54 | jstl 55 | 1.2 56 | 57 | 58 | 59 | org.springframework 60 | spring-webmvc 61 | 3.2.2.RELEASE 62 | 63 | 64 | com.fasterxml.jackson.core 65 | jackson-core 66 | 2.1.4 67 | 68 | 69 | com.fasterxml.jackson.core 70 | jackson-databind 71 | 2.1.4 72 | 73 | 74 | org.springframework 75 | spring-tx 76 | 3.2.2.RELEASE 77 | 78 | 79 | org.springframework 80 | spring-jdbc 81 | 3.2.2.RELEASE 82 | 83 | 84 | org.mybatis 85 | mybatis 86 | 3.2.7 87 | 88 | 89 | org.mybatis 90 | mybatis-spring 91 | 1.2.2 92 | 93 | 94 | com.github.miemiedev 95 | mybatis-paginator 96 | 1.2.15 97 | 98 | 99 | com.mchange 100 | c3p0 101 | 0.9.2-pre8 102 | 103 | 104 | com.oracle 105 | ojdbc6 106 | 11.2.0.2.0 107 | 108 | 109 | org.slf4j 110 | slf4j-api 111 | 1.7.4 112 | 113 | 114 | ch.qos.logback 115 | logback-classic 116 | 1.0.10 117 | 118 | 119 | commons-logging 120 | commons-logging 121 | 1.1.1 122 | 123 | 124 | 125 | 126 | cglib 127 | cglib-nodep 128 | 2.2.2 129 | 130 | 131 | com.google.guava 132 | guava 133 | 14.0.1 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | /** 7 | * 用户 8 | * FP_USER_BASIC_INFO 9 | * User: miemiebw 10 | */ 11 | public class User implements Serializable { 12 | private Long id; 13 | private String name; 14 | private String realName; 15 | private String email; 16 | private String type; 17 | private String state; 18 | private Date createDate; 19 | 20 | public Long getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Long id) { 25 | this.id = id; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | 36 | public String getRealName() { 37 | return realName; 38 | } 39 | 40 | public void setRealName(String realName) { 41 | this.realName = realName; 42 | } 43 | 44 | public String getEmail() { 45 | return email; 46 | } 47 | 48 | public void setEmail(String email) { 49 | this.email = email; 50 | } 51 | 52 | public String getType() { 53 | return type; 54 | } 55 | 56 | public void setType(String type) { 57 | this.type = type; 58 | } 59 | 60 | public String getState() { 61 | return state; 62 | } 63 | 64 | public void setState(String state) { 65 | this.state = state; 66 | } 67 | 68 | public Date getCreateDate() { 69 | return createDate; 70 | } 71 | 72 | public void setCreateDate(Date createDate) { 73 | this.createDate = createDate; 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | final StringBuilder sb = new StringBuilder(); 79 | sb.append("User"); 80 | sb.append("{id=").append(id); 81 | sb.append(", name='").append(name).append('\''); 82 | sb.append(", realName='").append(realName).append('\''); 83 | sb.append(", email='").append(email).append('\''); 84 | sb.append(", type='").append(type).append('\''); 85 | sb.append(", state='").append(state).append('\''); 86 | sb.append(", createDate=").append(createDate); 87 | sb.append('}'); 88 | return sb.toString(); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/repository/MyBatisRepository.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.repository; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import java.lang.annotation.*; 6 | 7 | @Retention(RetentionPolicy.RUNTIME) 8 | @Target(ElementType.TYPE) 9 | @Documented 10 | @Component 11 | public @interface MyBatisRepository { 12 | String value() default ""; 13 | } -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/repository/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.repository; 2 | 3 | import com.github.miemiedev.mybatis.paginator.domain.PageBounds; 4 | import com.github.miemiedev.smt.entity.User; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.Date; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | @MyBatisRepository 12 | public interface UserDao { 13 | 14 | public User get(Long id); 15 | 16 | public List queryByDeptCode(@Param("deptCode")String deptCode, 17 | @Param("createDate")Date createDate, 18 | PageBounds pageBounds); 19 | 20 | public List> search(Map params ,PageBounds pageBounds); 21 | 22 | public List> find(PageBounds pageBounds); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/repository/UserDao.mbts.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 32 | 33 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/service/AuthService.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.service; 2 | 3 | 4 | import com.github.miemiedev.mybatis.paginator.domain.PageBounds; 5 | import com.github.miemiedev.smt.entity.User; 6 | import com.github.miemiedev.smt.repository.UserDao; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import java.text.ParseException; 12 | import java.text.SimpleDateFormat; 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | @Service 17 | @Transactional(readOnly = true) 18 | public class AuthService { 19 | 20 | private UserDao userDao; 21 | 22 | 23 | public User getUserById(Long id){ 24 | return userDao.get(id); 25 | } 26 | 27 | public List queryByDeptCode(String deptCode, PageBounds pageBounds) throws ParseException { 28 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 29 | return userDao.queryByDeptCode(deptCode, sdf.parse("2010-03-02"), pageBounds); 30 | } 31 | 32 | public List> search(Map params ,PageBounds pageBounds){ 33 | return userDao.search(params, pageBounds); 34 | } 35 | 36 | public List> find(PageBounds pageBounds){ 37 | return userDao.find(pageBounds); 38 | } 39 | 40 | @Autowired 41 | public void setUserDao(UserDao userDao) { 42 | this.userDao = userDao; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/support/ErrorMessage.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.support; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | 8 | public class ErrorMessage { 9 | 10 | private String error = "unknown error"; 11 | 12 | public ErrorMessage() { 13 | } 14 | 15 | public ErrorMessage(String error) { 16 | this.error = error; 17 | } 18 | 19 | public String getError() { 20 | return error; 21 | } 22 | 23 | public void setError(String error) { 24 | this.error = error; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "ErrorMessage{" + 30 | "error='" + error + '\'' + 31 | '}'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/support/ResponseBodyHandlerExceptionResolver.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.support; 2 | 3 | import org.springframework.http.HttpInputMessage; 4 | import org.springframework.http.HttpOutputMessage; 5 | import org.springframework.http.MediaType; 6 | import org.springframework.http.converter.HttpMessageConverter; 7 | import org.springframework.http.server.ServletServerHttpRequest; 8 | import org.springframework.http.server.ServletServerHttpResponse; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | import org.springframework.web.method.HandlerMethod; 11 | import org.springframework.web.servlet.ModelAndView; 12 | import org.springframework.web.servlet.handler.AbstractHandlerMethodExceptionResolver; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | import java.io.IOException; 17 | import java.util.*; 18 | 19 | /** 20 | *凡是方法标识@ResponseBody的遇到异常都返回为JSON格式 21 | */ 22 | public class ResponseBodyHandlerExceptionResolver extends AbstractHandlerMethodExceptionResolver { 23 | 24 | private HttpMessageConverter messageConverter; 25 | 26 | @Override 27 | protected ModelAndView doResolveHandlerMethodException(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod, Exception ex) { 28 | logger.error(request.getRequestURI(),ex); 29 | if(handlerMethod.getMethodAnnotation(ResponseBody.class) != null){ 30 | try { 31 | response.setStatus(500); 32 | return writeJson(request, response, new ErrorMessage(ex.getMessage())); 33 | } catch (IOException e) { 34 | logger.error(ex.getMessage(),e); 35 | } 36 | } 37 | return null; 38 | } 39 | 40 | private ModelAndView writeJson(HttpServletRequest request, HttpServletResponse response, Object value) throws IOException { 41 | HttpInputMessage inputMessage = new ServletServerHttpRequest(request); 42 | List acceptedMediaTypes = inputMessage.getHeaders().getAccept(); 43 | if (acceptedMediaTypes.isEmpty()) { 44 | acceptedMediaTypes = Collections.singletonList(MediaType.ALL); 45 | } 46 | MediaType.sortByQualityValue(acceptedMediaTypes); 47 | HttpOutputMessage outputMessage = new ServletServerHttpResponse(response); 48 | Class returnValueType = value.getClass(); 49 | for (MediaType acceptedMediaType : acceptedMediaTypes) { 50 | if (messageConverter.canWrite(returnValueType, acceptedMediaType)) { 51 | messageConverter.write(value, acceptedMediaType, outputMessage); 52 | return new ModelAndView(); 53 | } 54 | } 55 | return null; 56 | } 57 | 58 | public void setMessageConverter(HttpMessageConverter messageConverter) { 59 | this.messageConverter = messageConverter; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/web/UserController.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.web; 2 | 3 | import com.github.miemiedev.mybatis.paginator.domain.PageList; 4 | import com.github.miemiedev.mybatis.paginator.domain.Paginator; 5 | import com.github.miemiedev.smt.entity.User; 6 | import com.github.miemiedev.smt.service.AuthService; 7 | import com.github.miemiedev.smt.web.util.PageForm; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | import org.springframework.web.servlet.ModelAndView; 13 | 14 | import javax.servlet.http.HttpServletRequest; 15 | import java.io.Serializable; 16 | import java.text.ParseException; 17 | import java.util.ArrayList; 18 | import java.util.Collection; 19 | import java.util.List; 20 | 21 | @Controller 22 | @RequestMapping("/account/user") 23 | public class UserController{ 24 | @Autowired 25 | private AuthService authService; 26 | 27 | @RequestMapping(value = "") 28 | public String listView() { 29 | return "account/userList"; 30 | } 31 | 32 | @ResponseBody 33 | @RequestMapping(value = "/list.json") 34 | public List list(PageForm pageForm) throws ParseException { 35 | pageForm.addOrderExpr("REAL_NAME", "nlssort(? ,'NLS_SORT=SCHINESE_PINYIN_M') ? nulls last"); 36 | return authService.queryByDeptCode("", pageForm.toPageBounds()); 37 | } 38 | 39 | 40 | @RequestMapping(value = "/jstl.action") 41 | public Object usersView(PageForm pageForm, HttpServletRequest request) throws ParseException { 42 | List users = list(pageForm); 43 | return new ModelAndView( "account/jstl","users", users); 44 | } 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/github/miemiedev/smt/web/util/PageForm.java: -------------------------------------------------------------------------------- 1 | package com.github.miemiedev.smt.web.util; 2 | 3 | import com.github.miemiedev.mybatis.paginator.domain.Order; 4 | import com.github.miemiedev.mybatis.paginator.domain.PageBounds; 5 | 6 | import java.util.HashMap; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | */ 12 | public class PageForm { 13 | 14 | public static final String CHINESE_PINYIN = "nlssort(? ,'NLS_SORT=SCHINESE_PINYIN_M')"; 15 | 16 | private int page = 1; 17 | private int limit = 30; 18 | private String sort; 19 | 20 | private Map orderExprs = new HashMap(); 21 | 22 | public int getPage() { 23 | return page; 24 | } 25 | 26 | public void setPage(int page) { 27 | this.page = page; 28 | } 29 | 30 | public int getLimit() { 31 | return limit; 32 | } 33 | 34 | public void setLimit(int limit) { 35 | this.limit = limit; 36 | } 37 | 38 | public String getSort() { 39 | return sort; 40 | } 41 | 42 | public void setSort(String sort) { 43 | this.sort = sort; 44 | } 45 | 46 | public void addOrderExpr(String property, String expr){ 47 | this.orderExprs.put(property,expr); 48 | } 49 | 50 | public PageBounds toPageBounds(){ 51 | List orders = Order.formString(sort); 52 | for (int i = 0; i < orders.size(); i++) { 53 | Order order = orders.get(i); 54 | if(orderExprs.get(order.getProperty()) != null){ 55 | orders.set(i, new Order( 56 | order.getProperty(), 57 | order.getDirection(), 58 | orderExprs.get(order.getProperty())) 59 | ); 60 | } 61 | } 62 | return new PageBounds(page, limit, orders); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #h2 database settings 2 | jdbc.driver=oracle.jdbc.OracleDriver 3 | jdbc.url=jdbc:oracle:thin:@10.29.20.209:1521:orcl 4 | jdbc.username=financial_product 5 | jdbc.password=fpadmin -------------------------------------------------------------------------------- /src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | Spring公共配置 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | logs/quickstart.log 13 | 14 | logs/smt.%d{yyyy-MM-dd}.log 15 | 16 | 17 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 18 | 19 | 20 | 21 | 22 | 23 | 24 | logs/smt-%d{yyyy-MM-dd_HH}.%i.zip 25 | 26 | 10MB 27 | 28 | 29 | 30 | 31 | %d{HH:mm:ss.SSS},%msg%n 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/account/jstl.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
${user.name}${user.realName}${user.email}
22 | 23 | 上一页: ${usersPaginator.prePage}
24 | 当前页: ${usersPaginator.page}
25 | 下一页: ${usersPaginator.nextPage}
26 | 总页数: ${usersPaginator.totalPages}
27 | 总条数: ${usersPaginator.totalCount}
28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/account/userList.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/error/404.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | 4 | <%response.setStatus(404);%> 5 | 6 | 7 | 8 | 9 | 10 | 404 - 页面不存在 11 | 12 | 13 | 14 |

404 - 页面不存在.

15 |

">返回首页

16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/error/500.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" isErrorPage="true" %> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | <%@ page import="org.slf4j.Logger,org.slf4j.LoggerFactory" %> 4 | 5 | 6 | <% 7 | Throwable ex = null; 8 | if (exception != null) 9 | ex = exception; 10 | if (request.getAttribute("javax.servlet.error.exception") != null) 11 | ex = (Throwable) request.getAttribute("javax.servlet.error.exception"); 12 | 13 | //记录日志 14 | Logger logger = LoggerFactory.getLogger("500.jsp"); 15 | logger.error(ex.getMessage(), ex); 16 | %> 17 | 18 | 19 | 20 | 21 | 22 | 500 - 系统内部错误 23 | 24 | 25 | 26 |

500 - 系统发生内部错误.

27 |

">返回首页

28 |
29 | 	<% 
30 | 		exception.printStackTrace(new java.io.PrintWriter(out));
31 | 	%>
32 | 	
33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/template.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |

Hello world!

22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | smt 8 | 9 | 10 | 11 | contextConfigLocation 12 | 13 | classpath*:/applicationContext.xml 14 | 15 | 16 | 17 | 18 | 19 | spring.profiles.default 20 | production 21 | 22 | 23 | 24 | 25 | org.springframework.web.context.ContextLoaderListener 26 | 27 | 28 | 29 | 30 | springServlet 31 | org.springframework.web.servlet.DispatcherServlet 32 | 33 | contextConfigLocation 34 | /WEB-INF/spring-mvc.xml 35 | 36 | 1 37 | 38 | 39 | springServlet 40 | / 41 | 42 | 43 | 44 | 45 | 46 | 47 | encodingFilter 48 | org.springframework.web.filter.CharacterEncodingFilter 49 | 50 | encoding 51 | UTF-8 52 | 53 | 54 | forceEncoding 55 | true 56 | 57 | 58 | 59 | encodingFilter 60 | /* 61 | REQUEST 62 | FORWARD 63 | 64 | 65 | 66 | org.springframework.web.util.NestedServletException 67 | /WEB-INF/views/error/500.jsp 68 | 69 | 70 | 71 | 72 | java.lang.Throwable 73 | /WEB-INF/views/error/500.jsp 74 | 75 | 76 | 500 77 | /WEB-INF/views/error/500.jsp 78 | 79 | 80 | 81 | 82 | index.html 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/main/webapp/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * HTML5 Boilerplate 3 | * 4 | * What follows is the result of much research on cross-browser styling. 5 | * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, 6 | * Kroc Camen, and the H5BP dev community and team. 7 | */ 8 | 9 | /* ========================================================================== 10 | Base styles: opinionated defaults 11 | ========================================================================== */ 12 | 13 | html, 14 | button, 15 | input, 16 | select, 17 | textarea { 18 | color: #222; 19 | } 20 | 21 | body { 22 | font-size: 1em; 23 | line-height: 1.4; 24 | } 25 | 26 | /* 27 | * Remove text-shadow in selection highlight: h5bp.com/i 28 | * These selection declarations have to be separate. 29 | * Customize the background color to match your design. 30 | */ 31 | 32 | ::-moz-selection { 33 | background: #b3d4fc; 34 | text-shadow: none; 35 | } 36 | 37 | ::selection { 38 | background: #b3d4fc; 39 | text-shadow: none; 40 | } 41 | 42 | /* 43 | * A better looking default horizontal rule 44 | */ 45 | 46 | hr { 47 | display: block; 48 | height: 1px; 49 | border: 0; 50 | border-top: 1px solid #ccc; 51 | margin: 1em 0; 52 | padding: 0; 53 | } 54 | 55 | /* 56 | * Remove the gap between images and the bottom of their containers: h5bp.com/i/440 57 | */ 58 | 59 | img { 60 | vertical-align: middle; 61 | } 62 | 63 | /* 64 | * Remove default fieldset styles. 65 | */ 66 | 67 | fieldset { 68 | border: 0; 69 | margin: 0; 70 | padding: 0; 71 | } 72 | 73 | /* 74 | * Allow only vertical resizing of textareas. 75 | */ 76 | 77 | textarea { 78 | resize: vertical; 79 | } 80 | 81 | /* ========================================================================== 82 | Chrome Frame prompt 83 | ========================================================================== */ 84 | 85 | .chromeframe { 86 | margin: 0.2em 0; 87 | background: #ccc; 88 | color: #000; 89 | padding: 0.2em 0; 90 | } 91 | 92 | /* ========================================================================== 93 | Author's custom styles 94 | ========================================================================== */ 95 | 96 | body { 97 | font-size: 12px; 98 | line-height: 1.4; 99 | } 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | /* ========================================================================== 117 | Helper classes 118 | ========================================================================== */ 119 | 120 | /* 121 | * Image replacement 122 | */ 123 | 124 | .ir { 125 | background-color: transparent; 126 | border: 0; 127 | overflow: hidden; 128 | /* IE 6/7 fallback */ 129 | *text-indent: -9999px; 130 | } 131 | 132 | .ir:before { 133 | content: ""; 134 | display: block; 135 | width: 0; 136 | height: 150%; 137 | } 138 | 139 | /* 140 | * Hide from both screenreaders and browsers: h5bp.com/u 141 | */ 142 | 143 | .hidden { 144 | display: none !important; 145 | visibility: hidden; 146 | } 147 | 148 | /* 149 | * Hide only visually, but have it available for screenreaders: h5bp.com/v 150 | */ 151 | 152 | .visuallyhidden { 153 | border: 0; 154 | clip: rect(0 0 0 0); 155 | height: 1px; 156 | margin: -1px; 157 | overflow: hidden; 158 | padding: 0; 159 | position: absolute; 160 | width: 1px; 161 | } 162 | 163 | /* 164 | * Extends the .visuallyhidden class to allow the element to be focusable 165 | * when navigated to via the keyboard: h5bp.com/p 166 | */ 167 | 168 | .visuallyhidden.focusable:active, 169 | .visuallyhidden.focusable:focus { 170 | clip: auto; 171 | height: auto; 172 | margin: 0; 173 | overflow: visible; 174 | position: static; 175 | width: auto; 176 | } 177 | 178 | /* 179 | * Hide visually and from screenreaders, but maintain layout 180 | */ 181 | 182 | .invisible { 183 | visibility: hidden; 184 | } 185 | 186 | /* 187 | * Clearfix: contain floats 188 | * 189 | * For modern browsers 190 | * 1. The space content is one way to avoid an Opera bug when the 191 | * `contenteditable` attribute is included anywhere else in the document. 192 | * Otherwise it causes space to appear at the top and bottom of elements 193 | * that receive the `clearfix` class. 194 | * 2. The use of `table` rather than `block` is only necessary if using 195 | * `:before` to contain the top-margins of child elements. 196 | */ 197 | 198 | .clearfix:before, 199 | .clearfix:after { 200 | content: " "; /* 1 */ 201 | display: table; /* 2 */ 202 | } 203 | 204 | .clearfix:after { 205 | clear: both; 206 | } 207 | 208 | /* 209 | * For IE 6/7 only 210 | * Include this rule to trigger hasLayout and contain floats. 211 | */ 212 | 213 | .clearfix { 214 | *zoom: 1; 215 | } 216 | 217 | /* ========================================================================== 218 | EXAMPLE Media Queries for Responsive Design. 219 | Theses examples override the primary ('mobile first') styles. 220 | Modify as content requires. 221 | ========================================================================== */ 222 | 223 | @media only screen and (min-width: 35em) { 224 | /* Style adjustments for viewports that meet the condition */ 225 | } 226 | 227 | @media print, 228 | (-o-min-device-pixel-ratio: 5/4), 229 | (-webkit-min-device-pixel-ratio: 1.25), 230 | (min-resolution: 120dpi) { 231 | /* Style adjustments for high resolution devices */ 232 | } 233 | 234 | /* ========================================================================== 235 | Print styles. 236 | Inlined to avoid required HTTP connection: h5bp.com/r 237 | ========================================================================== */ 238 | 239 | @media print { 240 | * { 241 | background: transparent !important; 242 | color: #000 !important; /* Black prints faster: h5bp.com/s */ 243 | box-shadow: none !important; 244 | text-shadow: none !important; 245 | } 246 | 247 | a, 248 | a:visited { 249 | text-decoration: underline; 250 | } 251 | 252 | a[href]:after { 253 | content: " (" attr(href) ")"; 254 | } 255 | 256 | abbr[title]:after { 257 | content: " (" attr(title) ")"; 258 | } 259 | 260 | /* 261 | * Don't show links for images, or javascript/internal links 262 | */ 263 | 264 | .ir a:after, 265 | a[href^="javascript:"]:after, 266 | a[href^="#"]:after { 267 | content: ""; 268 | } 269 | 270 | pre, 271 | blockquote { 272 | border: 1px solid #999; 273 | page-break-inside: avoid; 274 | } 275 | 276 | thead { 277 | display: table-header-group; /* h5bp.com/t */ 278 | } 279 | 280 | tr, 281 | img { 282 | page-break-inside: avoid; 283 | } 284 | 285 | img { 286 | max-width: 100% !important; 287 | } 288 | 289 | @page { 290 | margin: 0.5cm; 291 | } 292 | 293 | p, 294 | h2, 295 | h3 { 296 | orphans: 3; 297 | widows: 3; 298 | } 299 | 300 | h2, 301 | h3 { 302 | page-break-after: avoid; 303 | } 304 | } 305 | -------------------------------------------------------------------------------- /src/main/webapp/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v1.1.0 | MIT License | git.io/normalize */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /** 8 | * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | main, 20 | nav, 21 | section, 22 | summary { 23 | display: block; 24 | } 25 | 26 | /** 27 | * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. 28 | */ 29 | 30 | audio, 31 | canvas, 32 | video { 33 | display: inline-block; 34 | *display: inline; 35 | *zoom: 1; 36 | } 37 | 38 | /** 39 | * Prevent modern browsers from displaying `audio` without controls. 40 | * Remove excess height in iOS 5 devices. 41 | */ 42 | 43 | audio:not([controls]) { 44 | display: none; 45 | height: 0; 46 | } 47 | 48 | /** 49 | * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. 50 | * Known issue: no IE 6 support. 51 | */ 52 | 53 | [hidden] { 54 | display: none; 55 | } 56 | 57 | /* ========================================================================== 58 | Base 59 | ========================================================================== */ 60 | 61 | /** 62 | * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using 63 | * `em` units. 64 | * 2. Prevent iOS text size adjust after orientation change, without disabling 65 | * user zoom. 66 | */ 67 | 68 | html { 69 | font-size: 100%; /* 1 */ 70 | -webkit-text-size-adjust: 100%; /* 2 */ 71 | -ms-text-size-adjust: 100%; /* 2 */ 72 | } 73 | 74 | /** 75 | * Address `font-family` inconsistency between `textarea` and other form 76 | * elements. 77 | */ 78 | 79 | html, 80 | button, 81 | input, 82 | select, 83 | textarea { 84 | font-family: sans-serif; 85 | } 86 | 87 | /** 88 | * Address margins handled incorrectly in IE 6/7. 89 | */ 90 | 91 | body { 92 | margin: 0; 93 | } 94 | 95 | /* ========================================================================== 96 | Links 97 | ========================================================================== */ 98 | 99 | /** 100 | * Address `outline` inconsistency between Chrome and other browsers. 101 | */ 102 | 103 | a:focus { 104 | outline: thin dotted; 105 | } 106 | 107 | /** 108 | * Improve readability when focused and also mouse hovered in all browsers. 109 | */ 110 | 111 | a:active, 112 | a:hover { 113 | outline: 0; 114 | } 115 | 116 | /* ========================================================================== 117 | Typography 118 | ========================================================================== */ 119 | 120 | /** 121 | * Address font sizes and margins set differently in IE 6/7. 122 | * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, 123 | * and Chrome. 124 | */ 125 | 126 | h1 { 127 | font-size: 2em; 128 | margin: 0.67em 0; 129 | } 130 | 131 | h2 { 132 | font-size: 1.5em; 133 | margin: 0.83em 0; 134 | } 135 | 136 | h3 { 137 | font-size: 1.17em; 138 | margin: 1em 0; 139 | } 140 | 141 | h4 { 142 | font-size: 1em; 143 | margin: 1.33em 0; 144 | } 145 | 146 | h5 { 147 | font-size: 0.83em; 148 | margin: 1.67em 0; 149 | } 150 | 151 | h6 { 152 | font-size: 0.67em; 153 | margin: 2.33em 0; 154 | } 155 | 156 | /** 157 | * Address styling not present in IE 7/8/9, Safari 5, and Chrome. 158 | */ 159 | 160 | abbr[title] { 161 | border-bottom: 1px dotted; 162 | } 163 | 164 | /** 165 | * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. 166 | */ 167 | 168 | b, 169 | strong { 170 | font-weight: bold; 171 | } 172 | 173 | blockquote { 174 | margin: 1em 40px; 175 | } 176 | 177 | /** 178 | * Address styling not present in Safari 5 and Chrome. 179 | */ 180 | 181 | dfn { 182 | font-style: italic; 183 | } 184 | 185 | /** 186 | * Address differences between Firefox and other browsers. 187 | * Known issue: no IE 6/7 normalization. 188 | */ 189 | 190 | hr { 191 | -moz-box-sizing: content-box; 192 | box-sizing: content-box; 193 | height: 0; 194 | } 195 | 196 | /** 197 | * Address styling not present in IE 6/7/8/9. 198 | */ 199 | 200 | mark { 201 | background: #ff0; 202 | color: #000; 203 | } 204 | 205 | /** 206 | * Address margins set differently in IE 6/7. 207 | */ 208 | 209 | p, 210 | pre { 211 | margin: 1em 0; 212 | } 213 | 214 | /** 215 | * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. 216 | */ 217 | 218 | code, 219 | kbd, 220 | pre, 221 | samp { 222 | font-family: monospace, serif; 223 | _font-family: 'courier new', monospace; 224 | font-size: 1em; 225 | } 226 | 227 | /** 228 | * Improve readability of pre-formatted text in all browsers. 229 | */ 230 | 231 | pre { 232 | white-space: pre; 233 | white-space: pre-wrap; 234 | word-wrap: break-word; 235 | } 236 | 237 | /** 238 | * Address CSS quotes not supported in IE 6/7. 239 | */ 240 | 241 | q { 242 | quotes: none; 243 | } 244 | 245 | /** 246 | * Address `quotes` property not supported in Safari 4. 247 | */ 248 | 249 | q:before, 250 | q:after { 251 | content: ''; 252 | content: none; 253 | } 254 | 255 | /** 256 | * Address inconsistent and variable font size in all browsers. 257 | */ 258 | 259 | small { 260 | font-size: 80%; 261 | } 262 | 263 | /** 264 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 265 | */ 266 | 267 | sub, 268 | sup { 269 | font-size: 75%; 270 | line-height: 0; 271 | position: relative; 272 | vertical-align: baseline; 273 | } 274 | 275 | sup { 276 | top: -0.5em; 277 | } 278 | 279 | sub { 280 | bottom: -0.25em; 281 | } 282 | 283 | /* ========================================================================== 284 | Lists 285 | ========================================================================== */ 286 | 287 | /** 288 | * Address margins set differently in IE 6/7. 289 | */ 290 | 291 | dl, 292 | menu, 293 | ol, 294 | ul { 295 | margin: 1em 0; 296 | } 297 | 298 | dd { 299 | margin: 0 0 0 40px; 300 | } 301 | 302 | /** 303 | * Address paddings set differently in IE 6/7. 304 | */ 305 | 306 | menu, 307 | ol, 308 | ul { 309 | padding: 0 0 0 40px; 310 | } 311 | 312 | /** 313 | * Correct list images handled incorrectly in IE 7. 314 | */ 315 | 316 | nav ul, 317 | nav ol { 318 | list-style: none; 319 | list-style-image: none; 320 | } 321 | 322 | /* ========================================================================== 323 | Embedded content 324 | ========================================================================== */ 325 | 326 | /** 327 | * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. 328 | * 2. Improve image quality when scaled in IE 7. 329 | */ 330 | 331 | img { 332 | border: 0; /* 1 */ 333 | -ms-interpolation-mode: bicubic; /* 2 */ 334 | } 335 | 336 | /** 337 | * Correct overflow displayed oddly in IE 9. 338 | */ 339 | 340 | svg:not(:root) { 341 | overflow: hidden; 342 | } 343 | 344 | /* ========================================================================== 345 | Figures 346 | ========================================================================== */ 347 | 348 | /** 349 | * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. 350 | */ 351 | 352 | figure { 353 | margin: 0; 354 | } 355 | 356 | /* ========================================================================== 357 | Forms 358 | ========================================================================== */ 359 | 360 | /** 361 | * Correct margin displayed oddly in IE 6/7. 362 | */ 363 | 364 | form { 365 | margin: 0; 366 | } 367 | 368 | /** 369 | * Define consistent border, margin, and padding. 370 | */ 371 | 372 | fieldset { 373 | border: 1px solid #c0c0c0; 374 | margin: 0 2px; 375 | padding: 0.35em 0.625em 0.75em; 376 | } 377 | 378 | /** 379 | * 1. Correct color not being inherited in IE 6/7/8/9. 380 | * 2. Correct text not wrapping in Firefox 3. 381 | * 3. Correct alignment displayed oddly in IE 6/7. 382 | */ 383 | 384 | legend { 385 | border: 0; /* 1 */ 386 | padding: 0; 387 | white-space: normal; /* 2 */ 388 | *margin-left: -7px; /* 3 */ 389 | } 390 | 391 | /** 392 | * 1. Correct font size not being inherited in all browsers. 393 | * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, 394 | * and Chrome. 395 | * 3. Improve appearance and consistency in all browsers. 396 | */ 397 | 398 | button, 399 | input, 400 | select, 401 | textarea { 402 | font-size: 100%; /* 1 */ 403 | margin: 0; /* 2 */ 404 | vertical-align: baseline; /* 3 */ 405 | *vertical-align: middle; /* 3 */ 406 | } 407 | 408 | /** 409 | * Address Firefox 3+ setting `line-height` on `input` using `!important` in 410 | * the UA stylesheet. 411 | */ 412 | 413 | button, 414 | input { 415 | line-height: normal; 416 | } 417 | 418 | /** 419 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 420 | * All other form control elements do not inherit `text-transform` values. 421 | * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. 422 | * Correct `select` style inheritance in Firefox 4+ and Opera. 423 | */ 424 | 425 | button, 426 | select { 427 | text-transform: none; 428 | } 429 | 430 | /** 431 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 432 | * and `video` controls. 433 | * 2. Correct inability to style clickable `input` types in iOS. 434 | * 3. Improve usability and consistency of cursor style between image-type 435 | * `input` and others. 436 | * 4. Remove inner spacing in IE 7 without affecting normal text inputs. 437 | * Known issue: inner spacing remains in IE 6. 438 | */ 439 | 440 | button, 441 | html input[type="button"], /* 1 */ 442 | input[type="reset"], 443 | input[type="submit"] { 444 | -webkit-appearance: button; /* 2 */ 445 | cursor: pointer; /* 3 */ 446 | *overflow: visible; /* 4 */ 447 | } 448 | 449 | /** 450 | * Re-set default cursor for disabled elements. 451 | */ 452 | 453 | button[disabled], 454 | html input[disabled] { 455 | cursor: default; 456 | } 457 | 458 | /** 459 | * 1. Address box sizing set to content-box in IE 8/9. 460 | * 2. Remove excess padding in IE 8/9. 461 | * 3. Remove excess padding in IE 7. 462 | * Known issue: excess padding remains in IE 6. 463 | */ 464 | 465 | input[type="checkbox"], 466 | input[type="radio"] { 467 | box-sizing: border-box; /* 1 */ 468 | padding: 0; /* 2 */ 469 | *height: 13px; /* 3 */ 470 | *width: 13px; /* 3 */ 471 | } 472 | 473 | /** 474 | * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. 475 | * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome 476 | * (include `-moz` to future-proof). 477 | */ 478 | 479 | input[type="search"] { 480 | -webkit-appearance: textfield; /* 1 */ 481 | -moz-box-sizing: content-box; 482 | -webkit-box-sizing: content-box; /* 2 */ 483 | box-sizing: content-box; 484 | } 485 | 486 | /** 487 | * Remove inner padding and search cancel button in Safari 5 and Chrome 488 | * on OS X. 489 | */ 490 | 491 | input[type="search"]::-webkit-search-cancel-button, 492 | input[type="search"]::-webkit-search-decoration { 493 | -webkit-appearance: none; 494 | } 495 | 496 | /** 497 | * Remove inner padding and border in Firefox 3+. 498 | */ 499 | 500 | button::-moz-focus-inner, 501 | input::-moz-focus-inner { 502 | border: 0; 503 | padding: 0; 504 | } 505 | 506 | /** 507 | * 1. Remove default vertical scrollbar in IE 6/7/8/9. 508 | * 2. Improve readability and alignment in all browsers. 509 | */ 510 | 511 | textarea { 512 | overflow: auto; /* 1 */ 513 | vertical-align: top; /* 2 */ 514 | } 515 | 516 | /* ========================================================================== 517 | Tables 518 | ========================================================================== */ 519 | 520 | /** 521 | * Remove most spacing between table cells. 522 | */ 523 | 524 | table { 525 | border-collapse: collapse; 526 | border-spacing: 0; 527 | } 528 | -------------------------------------------------------------------------------- /src/main/webapp/img/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lidatui/spring-mybaits-template/00c71378e42cd5a65940f69b9b05f6fc77653813/src/main/webapp/img/.gitignore -------------------------------------------------------------------------------- /src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Redirect 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/webapp/js/account/userList.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | var dataFormat = function(val){ 4 | return new Date(val).toString('yyyy-MM-dd'); 5 | } 6 | 7 | var cols = [ 8 | { title:'用户名', name:'realName', sortName:'REAL_NAME' ,width:100, sortable: true, align:'center' ,lockDisplay: true }, 9 | { title:'登录名', name:'name', sortName:'USER_NAME' ,width:100, sortable: true, align:'center' }, 10 | { title:'EMAIL', name:'email', sortName:'EMAIL' ,width:150, sortable: true, align:'center' }, 11 | { title:'建立时间', name:'createDate', sortName:'CREATE_DATE' ,width:100, sortable: true, align:'center', renderer: dataFormat}, 12 | { title:'账户持有人', name:'state', sortName:'ACC_NAME' ,width:100, sortable: true, align:'center' }, 13 | { title:'用户类型', name:'type', sortName:'USER_TYPE' ,width:100, sortable: true, align:'center' } 14 | 15 | ]; 16 | 17 | 18 | var mmg = $('.mmg').mmGrid({ 19 | height: '100%' 20 | , cols: cols 21 | , url: 'user/list.json' 22 | , method: 'get' 23 | , remoteSort:true 24 | , sortName: 'REAL_NAME' 25 | , sortStatus: 'asc' 26 | , fullWidthRows: true 27 | , indexCol: true 28 | , plugins: [ 29 | $('#pg').mmPaginator({ 30 | limit: 30 31 | }) 32 | ] 33 | }); 34 | }) 35 | -------------------------------------------------------------------------------- /src/main/webapp/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | 3 | }) 4 | -------------------------------------------------------------------------------- /src/main/webapp/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /src/main/webapp/js/vendor/jquery-1.9.0.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("