├── src
└── main
│ ├── webapp
│ ├── .gitkeep
│ ├── favicon.ico
│ ├── images
│ │ ├── forie.png
│ │ ├── qrcode_alipay_nq.png
│ │ ├── qrcode_weibo_nnbwq.png
│ │ ├── qrcode_weixin_qjzd.jpg
│ │ ├── webpack.svg
│ │ └── jsp.svg
│ ├── WEB-INF
│ │ ├── jsp
│ │ │ ├── include
│ │ │ │ ├── footer.jsp
│ │ │ │ ├── init.jsp
│ │ │ │ ├── common_script.jsp
│ │ │ │ ├── meta.jsp
│ │ │ │ ├── header.jsp
│ │ │ │ └── lowie.jsp
│ │ │ ├── contact
│ │ │ │ └── index.jsp
│ │ │ ├── index
│ │ │ │ └── index.jsp
│ │ │ └── start
│ │ │ │ └── index.jsp
│ │ ├── tld
│ │ │ └── elfunc.tld
│ │ └── web.xml
│ └── static
│ │ ├── fonts
│ │ ├── glyphicons-halflings-regular.e18bbf6.ttf
│ │ ├── glyphicons-halflings-regular.f4769f9.eot
│ │ ├── glyphicons-halflings-regular.fa27723.woff
│ │ └── glyphicons-halflings-regular.448c34a.woff2
│ │ └── js
│ │ ├── index.f9d8e14098eb453538be.js
│ │ ├── contact.ae1113387e1befd7ff8b.js
│ │ ├── manifest.f93839dfcf180f0b2afc.js
│ │ ├── start.d7ebb5145fef16460537.js
│ │ ├── index.f9d8e14098eb453538be.js.map
│ │ ├── contact.ae1113387e1befd7ff8b.js.map
│ │ ├── manifest.f93839dfcf180f0b2afc.js.map
│ │ └── start.d7ebb5145fef16460537.js.map
│ ├── js
│ ├── src
│ │ ├── static
│ │ │ ├── .gitkeep
│ │ │ ├── favicon.ico
│ │ │ ├── images
│ │ │ │ ├── forie.png
│ │ │ │ ├── qrcode_alipay_nq.png
│ │ │ │ ├── qrcode_weibo_nnbwq.png
│ │ │ │ ├── qrcode_weixin_qjzd.jpg
│ │ │ │ ├── webpack.svg
│ │ │ │ └── jsp.svg
│ │ │ └── WEB-INF
│ │ │ │ ├── tld
│ │ │ │ └── elfunc.tld
│ │ │ │ └── web.xml
│ │ ├── shares
│ │ │ └── page
│ │ │ │ └── index.js
│ │ ├── pages
│ │ │ ├── contact
│ │ │ │ ├── index.js
│ │ │ │ ├── index.css
│ │ │ │ └── index.jsp
│ │ │ ├── index
│ │ │ │ ├── index.js
│ │ │ │ └── index.jsp
│ │ │ ├── include
│ │ │ │ ├── footer.jsp
│ │ │ │ ├── init.jsp
│ │ │ │ ├── common_script.jsp
│ │ │ │ ├── meta.jsp
│ │ │ │ ├── header.jsp
│ │ │ │ └── lowie.jsp
│ │ │ └── start
│ │ │ │ ├── my-component.vue
│ │ │ │ ├── index.js
│ │ │ │ ├── dashboard.css
│ │ │ │ └── index.jsp
│ │ ├── polyfills
│ │ │ ├── promise.js
│ │ │ ├── index.js
│ │ │ └── console.js
│ │ └── styles
│ │ │ ├── bootstrap
│ │ │ └── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ │ └── glyphicons-halflings-regular.woff2
│ │ │ └── index.css
│ ├── .gitignore
│ ├── .eslintignore
│ ├── build
│ │ ├── logo.png
│ │ ├── clean.js
│ │ ├── vue-loader.conf.js
│ │ ├── build.js
│ │ ├── check-versions.js
│ │ ├── webpack.dev.conf.js
│ │ ├── utils.js
│ │ ├── webpack.base.conf.js
│ │ └── webpack.prod.conf.js
│ ├── config
│ │ ├── prod.env.js
│ │ ├── dev.env.js
│ │ ├── js-jsp-map.js
│ │ └── index.js
│ ├── .editorconfig
│ ├── .babelrc
│ ├── .postcssrc.js
│ ├── .eslintrc.js
│ └── package.json
│ ├── resources
│ ├── product
│ │ ├── app.properties
│ │ └── log4j.properties
│ └── development
│ │ ├── app.properties
│ │ └── log4j.properties
│ └── java
│ └── net
│ └── qjzd
│ ├── wjsp
│ ├── el
│ │ └── ElUtil.java
│ ├── common
│ │ ├── Config.java
│ │ ├── ConfigServlet.java
│ │ └── StartServlet.java
│ ├── config
│ │ ├── BeanConfig.java
│ │ ├── I18nConfig.java
│ │ ├── FileUploadConfig.java
│ │ ├── GlobalInterceptor.java
│ │ ├── CorsFilter.java
│ │ ├── ViewResolverConfig.java
│ │ ├── MvcConfig.java
│ │ └── WebAppConfig.java
│ ├── exception
│ │ ├── ErrorCode.java
│ │ ├── ErrorMessage.java
│ │ └── GlobalControllerAdvice.java
│ └── controller
│ │ └── MainController.java
│ ├── base
│ └── BaseController.java
│ └── utils
│ ├── I18nUtil.java
│ ├── SpringUtil.java
│ ├── ReflectUtils.java
│ ├── LogUtil.java
│ └── RequestUtils.java
├── .gitignore
├── README.md
└── pom.xml
/src/main/webapp/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/js/src/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/main/js/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/src/main/resources/product/app.properties:
--------------------------------------------------------------------------------
1 | #APP
--------------------------------------------------------------------------------
/src/main/resources/development/app.properties:
--------------------------------------------------------------------------------
1 | #APP
--------------------------------------------------------------------------------
/src/main/js/.eslintignore:
--------------------------------------------------------------------------------
1 | /build/
2 | /config/
3 | /*.js
4 |
5 |
--------------------------------------------------------------------------------
/src/main/js/src/shares/page/index.js:
--------------------------------------------------------------------------------
1 | import '@/styles/index.css'
2 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/contact/index.js:
--------------------------------------------------------------------------------
1 | import '@/shares/page'
2 | import './index.css'
3 |
--------------------------------------------------------------------------------
/src/main/js/build/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/build/logo.png
--------------------------------------------------------------------------------
/src/main/js/src/pages/index/index.js:
--------------------------------------------------------------------------------
1 | import '@/shares/page'
2 |
3 | console.log('hello world')
4 |
--------------------------------------------------------------------------------
/src/main/js/src/polyfills/promise.js:
--------------------------------------------------------------------------------
1 | import Promise from 'nuo'
2 |
3 | window.Promise = Promise
4 |
--------------------------------------------------------------------------------
/src/main/webapp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/favicon.ico
--------------------------------------------------------------------------------
/src/main/js/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"'
4 | }
5 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/el/ElUtil.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.el;
2 |
3 | public class ElUtil {
4 | }
5 |
--------------------------------------------------------------------------------
/src/main/webapp/images/forie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/images/forie.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | *.iml
3 | /target
4 | .settings
5 | .project
6 | .classpath
7 | .externalToolBuilders
8 | /classes
--------------------------------------------------------------------------------
/src/main/js/src/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/static/favicon.ico
--------------------------------------------------------------------------------
/src/main/js/src/static/images/forie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/static/images/forie.png
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/footer.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/footer.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
--------------------------------------------------------------------------------
/src/main/webapp/images/qrcode_alipay_nq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/images/qrcode_alipay_nq.png
--------------------------------------------------------------------------------
/src/main/webapp/images/qrcode_weibo_nnbwq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/images/qrcode_weibo_nnbwq.png
--------------------------------------------------------------------------------
/src/main/webapp/images/qrcode_weixin_qjzd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/images/qrcode_weixin_qjzd.jpg
--------------------------------------------------------------------------------
/src/main/js/src/static/images/qrcode_alipay_nq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/static/images/qrcode_alipay_nq.png
--------------------------------------------------------------------------------
/src/main/js/src/static/images/qrcode_weibo_nnbwq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/static/images/qrcode_weibo_nnbwq.png
--------------------------------------------------------------------------------
/src/main/js/src/static/images/qrcode_weixin_qjzd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/static/images/qrcode_weixin_qjzd.jpg
--------------------------------------------------------------------------------
/src/main/webapp/static/fonts/glyphicons-halflings-regular.e18bbf6.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/static/fonts/glyphicons-halflings-regular.e18bbf6.ttf
--------------------------------------------------------------------------------
/src/main/webapp/static/fonts/glyphicons-halflings-regular.f4769f9.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/static/fonts/glyphicons-halflings-regular.f4769f9.eot
--------------------------------------------------------------------------------
/src/main/webapp/static/fonts/glyphicons-halflings-regular.fa27723.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/static/fonts/glyphicons-halflings-regular.fa27723.woff
--------------------------------------------------------------------------------
/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/main/webapp/static/fonts/glyphicons-halflings-regular.448c34a.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/webapp/static/fonts/glyphicons-halflings-regular.448c34a.woff2
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/common/Config.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.common;
2 |
3 | public class Config {
4 | public static final String WEB_ACCEPT = "Accept=application/json";
5 | }
6 |
--------------------------------------------------------------------------------
/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nqdy666/wjsp/HEAD/src/main/js/src/styles/bootstrap/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/src/main/js/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"'
7 | })
8 |
--------------------------------------------------------------------------------
/src/main/js/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/src/main/js/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false
5 | }],
6 | "stage-2"
7 | ],
8 | "plugins": ["transform-runtime"],
9 | "env": {
10 | "test": {
11 | "presets": ["env", "stage-2"] }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/js/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserslist" field in package.json
6 | "postcss-import": {},
7 | "postcss-url": {},
8 | 'postcss-nested': {},
9 | "autoprefixer": {}
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/js/build/clean.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | const ora = require('ora')
4 | const rm = require('rimraf')
5 | const path = require('path')
6 | const config = require('../config')
7 |
8 | const spinner = ora('cleaning...')
9 | spinner.start()
10 |
11 | rm(path.join(config.build.assetsRoot), err => {
12 | if (err) throw err
13 | })
14 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/BeanConfig.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.context.annotation.PropertySource;
5 |
6 | @Configuration
7 | @PropertySource(value = {"classpath:app.properties"})
8 | public class BeanConfig {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/contact/index.css:
--------------------------------------------------------------------------------
1 | .contact-main {
2 | margin-top: 100px;
3 | margin-bottom: 10px;
4 |
5 | .placeholder {
6 | h4 {
7 | text-align: center;
8 | }
9 | .text-muted {
10 | display: block;
11 | text-align: center;
12 | }
13 | }
14 | }
15 |
16 | @media (max-width: 700px) {
17 | .contact-main {
18 | margin-top: 10px;
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/start/my-component.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{message}}
4 |
5 | - 您可以给idea添加vue.js插件,这样也可以直接使用.vue文件。
6 | - js和css的语法转换在.vue文件中同样适用。
7 |
8 |
9 |
10 |
19 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/common/ConfigServlet.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.common;
2 |
3 | import javax.servlet.ServletException;
4 | import javax.servlet.http.HttpServlet;
5 |
6 | public class ConfigServlet extends HttpServlet {
7 |
8 | private static final long serialVersionUID = 6794852229635296067L;
9 |
10 | @Override
11 | public void init() throws ServletException {
12 | // TODO Auto-generated method stub
13 | super.init();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/js/src/polyfills/index.js:
--------------------------------------------------------------------------------
1 | import './promise'
2 | import './console'
3 | import 'core-js/es6/array'
4 | import 'core-js/fn/array/of'
5 | import 'core-js/fn/array/find'
6 | import 'core-js/fn/array/find-index'
7 | import 'core-js/fn/object/assign'
8 | import 'core-js/fn/array/includes'
9 | import 'core-js/fn/array/iterator'
10 | import 'core-js/es6/string'
11 | import 'core-js/es6/map'
12 | import 'core-js/es6/symbol'
13 | import 'regenerator-runtime/runtime'
14 | import 'whatwg-fetch'
15 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/init.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
4 | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
5 | <%@ taglib prefix="elf" uri="/WEB-INF/tld/elfunc.tld" %>
6 |
7 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/init.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
4 | <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
5 | <%@ taglib prefix="elf" uri="/WEB-INF/tld/elfunc.tld" %>
6 |
7 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/common_script.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/meta.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/common_script.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
13 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/meta.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/common/StartServlet.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.common;
2 |
3 | import net.qjzd.utils.SpringUtil;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.http.HttpServlet;
7 |
8 | public class StartServlet extends HttpServlet {
9 |
10 | private static final long serialVersionUID = -6562937892680056788L;
11 |
12 | @Override
13 | public void init() throws ServletException {
14 | // TODO Auto-generated method stub
15 | SpringUtil.getInstance(this.getServletContext());
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/js/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 |
10 | module.exports = {
11 | loaders: utils.cssLoaders({
12 | sourceMap: sourceMapEnabled,
13 | extract: isProduction
14 | }),
15 | cssSourceMap: sourceMapEnabled,
16 | transformToRequire: {
17 | video: 'src',
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/js/src/polyfills/console.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | var method
3 | var noop = function () {}
4 | var methods = [
5 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
6 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
7 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
8 | 'timeStamp', 'trace', 'warn'
9 | ]
10 | var length = methods.length
11 | var console = (window.console = window.console || {})
12 |
13 | while (length--) {
14 | method = methods[length]
15 |
16 | // Only stub undefined methods.
17 | if (!console[method]) {
18 | console[method] = noop
19 | }
20 | }
21 | }())
22 |
--------------------------------------------------------------------------------
/src/main/webapp/images/webpack.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/main/js/src/static/images/webpack.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/main/js/config/js-jsp-map.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('../build/utils')
3 |
4 | const pathResolve = utils.pathResolve
5 |
6 | function jsPathResolve(path) {
7 | return pathResolve.src('pages', path)
8 | }
9 |
10 | function jspPathResolve(path) {
11 | return pathResolve.dist('WEB-INF/jsp', path)
12 | }
13 |
14 | const jsJspMap = [
15 | { name: 'index', jsPath: jsPathResolve('index/index.js'), jspPath: jspPathResolve('index/index.jsp') },
16 | { name: 'start', jsPath: jsPathResolve('start/index.js'), jspPath: jspPathResolve('start/index.jsp') },
17 | { name: 'contact', jsPath: jsPathResolve('contact/index.js'), jspPath: jspPathResolve('contact/index.jsp') }
18 | ]
19 |
20 | module.exports = jsJspMap
21 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/base/BaseController.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.base;
2 |
3 | import org.slf4j.Logger;
4 | import org.slf4j.LoggerFactory;
5 | import org.springframework.web.servlet.ModelAndView;
6 | import org.springframework.web.servlet.mvc.Controller;
7 |
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | /**
12 | * Created by NQLDY on 2017/6/10.
13 | */
14 | public class BaseController implements Controller {
15 |
16 | protected Logger logger = LoggerFactory.getLogger(BaseController.class);
17 |
18 | @Override
19 | public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
20 | return null;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/I18nConfig.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import org.apache.log4j.Logger;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.context.support.ResourceBundleMessageSource;
7 |
8 | @Configuration
9 | public class I18nConfig {
10 | private static final Logger logger = Logger.getLogger(I18nConfig.class);
11 |
12 | @Bean
13 | public ResourceBundleMessageSource messageSource() {
14 | ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
15 | messageSource.setBasename("i18n");
16 | messageSource.setUseCodeAsDefaultMessage(true);
17 | messageSource.setDefaultEncoding("UTF-8");
18 | return messageSource;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/js/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // https://eslint.org/docs/user-guide/configuring
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | sourceType: 'module'
8 | },
9 | env: {
10 | browser: true,
11 | },
12 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md
13 | extends: 'standard',
14 | globals: {
15 | '$': false
16 | },
17 | // required to lint *.vue files
18 | plugins: [
19 | 'html'
20 | ],
21 | // add your custom rules here
22 | 'rules': {
23 | // allow paren-less arrow functions
24 | 'arrow-parens': 0,
25 | // allow async-await
26 | 'generator-star-spacing': 0,
27 | // allow debugger during development
28 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
29 | "no-new": 0
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/utils/I18nUtil.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.utils;
2 |
3 | import org.springframework.web.servlet.support.RequestContext;
4 |
5 | /**
6 | *
Title: I18nUtil
7 | * Description: 国际化转换message
8 | * Copyright: Copyright (c) 2015
9 | * Company: ND Websoft Inc.
10 | * Create Time: 2017年06月16日
11 | * @author lianggz
12 | */
13 | public class I18nUtil {
14 |
15 | public static String getMessage(String key) {
16 | RequestContext requestContext = new RequestContext(SpringUtil.getRequest());
17 | return requestContext.getMessage(key);
18 | }
19 |
20 | public static String getMessage(String key, Object... objects) {
21 | RequestContext requestContext = new RequestContext(SpringUtil.getRequest());
22 | return requestContext.getMessage(key, objects);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/exception/ErrorCode.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.exception;
2 |
3 | /**
4 | * Title: ErrorCode
5 | * Description: 错误码枚举
6 | * Copyright: Copyright (c) 2015
7 | * Company: ND Websoft Inc.
8 | * Create Time: 2015年07月14日
9 | * @author lianggz
10 | */
11 | public enum ErrorCode {
12 | //无效请求
13 | URI_NOT_FOUND(400, "URI_NOT_FOUND"),
14 | //服务器错误
15 | INTERNAL_SERVER_ERROR(500, "INTERNAL_SERVER_ERROR"),
16 | ;
17 | protected String PROVIDER = "WJSP/";
18 |
19 | private final int value;
20 | private final String code;
21 |
22 | ErrorCode(int value, String code) {
23 | this.value = value;
24 | this.code = code;
25 | }
26 |
27 | public int getValue() {
28 | return this.value;
29 | }
30 |
31 | public String getCode() {
32 | return this.PROVIDER + this.code;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/main/webapp/static/js/index.f9d8e14098eb453538be.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([3],{0:function(e,o,n){n("cZNe"),e.exports=n("U67u")},"Pp/C":function(e,o){!function(){for(var e,o=function(){},n=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],i=n.length,r=window.console=window.console||{};i--;)e=n[i],r[e]||(r[e]=o)}()},U67u:function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});n("i5Z1");console.log("hello world")},cZNe:function(e,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var i=n("SbJX"),r=n.n(i);window.Promise=r.a;n("Pp/C"),n("cUYv"),n("PPkL"),n("0K64"),n("X8hh"),n("kLF+"),n("fB7P"),n("mBqO"),n("oFcf"),n("7N90"),n("wu3h"),n("SldL"),n("rplX")},h2zT:function(e,o){},i5Z1:function(e,o,n){"use strict";var i=n("h2zT");n.n(i)}},[0]);
2 | //# sourceMappingURL=index.f9d8e14098eb453538be.js.map
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/FileUploadConfig.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import org.apache.log4j.Logger;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.web.multipart.commons.CommonsMultipartResolver;
7 |
8 | @Configuration
9 | public class FileUploadConfig {
10 | private static final Logger logger = Logger.getLogger(FileUploadConfig.class);
11 |
12 | private static final String DEFAULT_ENCODING = "UTF-8";
13 | private static final Integer MAX_UPLOAD_SIZE = 2 * 1024 * 1024;
14 |
15 | @Bean
16 | public CommonsMultipartResolver multipartResolver() {
17 | CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver();
18 | commonsMultipartResolver.setDefaultEncoding(DEFAULT_ENCODING);
19 | commonsMultipartResolver.setMaxUploadSize(MAX_UPLOAD_SIZE);
20 | return commonsMultipartResolver;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/webapp/static/js/contact.ae1113387e1befd7ff8b.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([2],{2:function(e,n,o){o("cZNe"),e.exports=o("CNGw")},CNGw:function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=(o("i5Z1"),o("rv4b"));o.n(r)},"Pp/C":function(e,n){!function(){for(var e,n=function(){},o=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],r=o.length,i=window.console=window.console||{};r--;)e=o[r],i[e]||(i[e]=n)}()},cZNe:function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=o("SbJX"),i=o.n(r);window.Promise=i.a;o("Pp/C"),o("cUYv"),o("PPkL"),o("0K64"),o("X8hh"),o("kLF+"),o("fB7P"),o("mBqO"),o("oFcf"),o("7N90"),o("wu3h"),o("SldL"),o("rplX")},h2zT:function(e,n){},i5Z1:function(e,n,o){"use strict";var r=o("h2zT");o.n(r)},rv4b:function(e,n){}},[2]);
2 | //# sourceMappingURL=contact.ae1113387e1befd7ff8b.js.map
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/header.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
23 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/header.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
23 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/utils/SpringUtil.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.utils;
2 |
3 | import org.springframework.web.context.WebApplicationContext;
4 | import org.springframework.web.context.request.RequestContextHolder;
5 | import org.springframework.web.context.request.ServletRequestAttributes;
6 |
7 | import javax.servlet.ServletContext;
8 | import javax.servlet.http.HttpServletRequest;
9 |
10 | /**
11 | * spring工具
12 | *
13 | * @author nianqin
14 | */
15 | public class SpringUtil {
16 |
17 | public static WebApplicationContext context = null;
18 |
19 | public static void getInstance(ServletContext sc) {
20 | context = (WebApplicationContext) sc
21 | .getAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.springWebDispatcherServlet");
22 | }
23 |
24 | public static Object getBean(String beanName) {
25 | if (context == null) {
26 | return null;
27 | }
28 | return context.getBean(beanName);
29 | }
30 |
31 | public static HttpServletRequest getRequest() {
32 | return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/resources/product/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=debug,console,logfile
2 | # Console
3 | log4j.appender.console=org.apache.log4j.ConsoleAppender
4 | log4j.appender.console.Threshold=debug
5 | log4j.appender.console.Target=System.out
6 | log4j.appender.console.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.console.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%c] %m%n
8 |
9 | # File (day a file)
10 | log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
11 | log4j.appender.logfile.Threshold=debug
12 | log4j.appender.logfile.File=${catalina.home}/logs/log.log
13 | log4j.appender.logfile.DatePattern = '.'yyyy-MM-dd
14 | log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
15 | #[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%F] %m%n
16 | log4j.appender.logfile.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%c] %m%n
17 |
18 | log4j.logger.org.apache.axis.ConfigurationException=INFO
19 | log4j.logger.com.mchange.v2=ERROR
20 | log4j.logger.org.springframework=INFO
21 | log4j.logger.org.apache.commons=ERROR
22 | log4j.logger.httpclient.wire.content=ERROR
23 | log4j.logger.httpclient.wire.header=ERROR
24 |
--------------------------------------------------------------------------------
/src/main/resources/development/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=debug,console,logfile
2 | # Console
3 | log4j.appender.console=org.apache.log4j.ConsoleAppender
4 | log4j.appender.console.Threshold=debug
5 | log4j.appender.console.Target=System.out
6 | log4j.appender.console.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.console.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%c] %m%n
8 |
9 | # File (day a file)
10 | log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
11 | log4j.appender.logfile.Threshold=debug
12 | log4j.appender.logfile.File=${catalina.home}/logs/log.log
13 | log4j.appender.logfile.DatePattern = '.'yyyy-MM-dd
14 | log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
15 | #[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%F] %m%n
16 | log4j.appender.logfile.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss\:SSS}][%c] %m%n
17 |
18 | log4j.logger.org.apache.axis.ConfigurationException=INFO
19 | log4j.logger.com.mchange.v2=ERROR
20 | log4j.logger.org.springframework=INFO
21 | log4j.logger.org.apache.commons=ERROR
22 | log4j.logger.httpclient.wire.content=ERROR
23 | log4j.logger.httpclient.wire.header=ERROR
24 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/GlobalInterceptor.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import lombok.extern.apachecommons.CommonsLog;
4 | import org.springframework.stereotype.Component;
5 | import org.springframework.web.servlet.HandlerInterceptor;
6 | import org.springframework.web.servlet.ModelAndView;
7 |
8 | import javax.servlet.http.HttpServletRequest;
9 | import javax.servlet.http.HttpServletResponse;
10 |
11 | @Component
12 | public class GlobalInterceptor implements HandlerInterceptor {
13 |
14 | @Override
15 | public boolean preHandle(HttpServletRequest request, HttpServletResponse arg1,
16 | Object arg2) throws Exception {
17 | // TODO Auto-generated method stub
18 | return true;
19 | }
20 |
21 | @Override
22 | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
23 | Object arg2, ModelAndView arg3) throws Exception {
24 | // TODO Auto-generated method stub
25 | }
26 |
27 | @Override
28 | public void afterCompletion(HttpServletRequest arg0,
29 | HttpServletResponse arg1, Object arg2, Exception arg3)
30 | throws Exception {
31 | // TODO Auto-generated method stub
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/controller/MainController.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestMethod;
7 |
8 | @Controller
9 | @RequestMapping("")
10 | public class MainController {
11 |
12 | @Autowired
13 | @RequestMapping(value="/", method=RequestMethod.GET)
14 | public String index() throws Exception {
15 | return "index/index";
16 | }
17 |
18 | @RequestMapping(value="/start", method=RequestMethod.GET)
19 | public String start() throws Exception {
20 | return "start/index";
21 | }
22 |
23 | @RequestMapping(value="/contact", method=RequestMethod.GET)
24 | public String contact() throws Exception {
25 | return "contact/index";
26 | }
27 |
28 | @RequestMapping(value="/404", method=RequestMethod.GET)
29 | public String notFound() throws Exception {
30 | return "index/index";
31 | }
32 |
33 | @RequestMapping(value="/error", method=RequestMethod.GET)
34 | public String error() throws Exception {
35 | return "index/index";
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/start/index.js:
--------------------------------------------------------------------------------
1 | import '@/shares/page'
2 | import './dashboard.css'
3 | import $ from 'jquery'
4 | import Vue from 'vue'
5 | import myComponent from './my-component'
6 |
7 | // Smooth scrolling using jQuery easing
8 | $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function () {
9 | console.log(location.pathname, this.pathname)
10 | if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
11 | console.log(this.hash)
12 | var target = $(this.hash)
13 | target = target.length ? target : $('[name=' + this.hash.slice(1) + ']')
14 | if (target.length) {
15 | $('html, body').animate({
16 | scrollTop: (target.offset().top - 60)
17 | }, 300)
18 | return false
19 | }
20 | }
21 | })
22 |
23 | // Closes responsive menu when a scroll trigger link is clicked
24 | $('.js-scroll-trigger').click(function () {
25 | $('.navbar-collapse').collapse('hide')
26 | })
27 |
28 | // Activate scrollspy to add active class to navbar items on scroll
29 | $('body').scrollspy({
30 | target: '#sideNav',
31 | offset: 80
32 | })
33 |
34 | new Vue({
35 | el: '#vue-app',
36 | components: {
37 | myComponent
38 | }
39 | })
40 |
--------------------------------------------------------------------------------
/src/main/js/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, function (err, stats) {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false,
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/include/lowie.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
44 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/include/lowie.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
44 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/exception/ErrorMessage.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.exception;
2 |
3 |
4 | import java.io.Serializable;
5 |
6 | /**
7 | * 错误信息封装类
8 | */
9 | public class ErrorMessage implements Serializable {
10 | private static final long serialVersionUID = -5401402542472113075L;
11 |
12 | private String code;
13 | private String message;
14 | private String detail;
15 |
16 | public ErrorMessage() {
17 | }
18 |
19 | public ErrorMessage(String code) {
20 | this(code, "", "");
21 | }
22 |
23 | public ErrorMessage(String code, String message) {
24 | this(code, message, "");
25 | }
26 |
27 | public ErrorMessage(String code, String message, String detail) {
28 | this.message = message;
29 | this.code = code;
30 | this.detail = detail;
31 | }
32 |
33 |
34 | public String getCode() {
35 | return code;
36 | }
37 |
38 | public void setCode(String code) {
39 | this.code = code;
40 | }
41 |
42 | public String getMessage() {
43 | return message;
44 | }
45 |
46 | public void setMessage(String message) {
47 | this.message = message;
48 | }
49 |
50 | public String getDetail() {
51 | return detail;
52 | }
53 |
54 | public void setDetail(String detail) {
55 | this.detail = detail;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/main/js/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 | function exec (cmd) {
7 | return require('child_process').execSync(cmd).toString().trim()
8 | }
9 |
10 | const versionRequirements = [
11 | {
12 | name: 'node',
13 | currentVersion: semver.clean(process.version),
14 | versionRequirement: packageConfig.engines.node
15 | }
16 | ]
17 |
18 | if (shell.which('npm')) {
19 | versionRequirements.push({
20 | name: 'npm',
21 | currentVersion: exec('npm --version'),
22 | versionRequirement: packageConfig.engines.npm
23 | })
24 | }
25 |
26 | module.exports = function () {
27 | const warnings = []
28 | for (let i = 0; i < versionRequirements.length; i++) {
29 | const mod = versionRequirements[i]
30 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
31 | warnings.push(mod.name + ': ' +
32 | chalk.red(mod.currentVersion) + ' should be ' +
33 | chalk.green(mod.versionRequirement)
34 | )
35 | }
36 | }
37 |
38 | if (warnings.length) {
39 | console.log('')
40 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
41 | console.log()
42 | for (let i = 0; i < warnings.length; i++) {
43 | const warning = warnings[i]
44 | console.log(' ' + warning)
45 | }
46 | console.log()
47 | process.exit(1)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/webapp/static/js/manifest.f93839dfcf180f0b2afc.js:
--------------------------------------------------------------------------------
1 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,a){for(var u,i,f,s=0,l=[];sTitle:
9 | * Description:
10 | * Copyright: Copyright (c) 2016
11 | * Company:ND Co., Ltd.
12 | * Create Time: 2017/6/19
13 | *
14 | * @author nianqin
15 | */
16 | public class CorsFilter implements Filter {
17 |
18 | @Override
19 | public void init(FilterConfig filterConfig) throws ServletException {
20 | }
21 |
22 | @Override
23 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
24 | HttpServletResponse servletResponse = (HttpServletResponse) response;
25 | servletResponse.setHeader("Access-Control-Allow-Origin", "*");
26 | servletResponse.setHeader("Access-Control-Allow-Methods", "GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, PATCH");
27 | servletResponse.setHeader("Access-Control-Max-Age", "3600");
28 | // Authorization是做了oauth2登录响应所必须的
29 | servletResponse.setHeader("Access-Control-Allow-Headers", "Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization, Cache-control, Orgname");
30 | // 表示允许cookies
31 | servletResponse.setHeader("Access-Control-Allow-Credentials","true");
32 | chain.doFilter(request, servletResponse);
33 | }
34 |
35 | @Override
36 | public void destroy() {
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/contact/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@include file="../include/init.jsp"%>
3 |
4 |
5 |
6 | WEBPACK-JSP
7 |
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 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/tld/elfunc.tld:
--------------------------------------------------------------------------------
1 |
2 |
5 | 1.0
6 | elf
7 |
8 | 字节数转成人可以读的形式,代码G,M,KB后缀
9 | byteCountToDisplaySize
10 | com.nd.ppt101.utils.ElFuncUtil
11 |
12 | java.lang.String byteCountToDisplaySize(java.lang.Long)
13 | ${elf:byteCountToDisplaySize(size)}
14 |
15 |
16 |
17 | 从map中获取第一个值,并转成string类型
18 | getFirstValueFromMap
19 | com.nd.ppt101.utils.ElFuncUtil
20 |
21 | java.lang.String getFirstValueFromMap(java.util.Map)
22 | ${elf:getFirstValueFromMap(map)}
23 |
24 |
25 |
26 | java正则表达式去除html标签
27 | htmlRemoveTag
28 | com.nd.ppt101.utils.ElFuncUtil
29 |
30 | java.lang.String htmlRemoveTag(java.lang.String)
31 | ${elf:htmlRemoveTag(htmlStr)}
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/main/js/src/static/WEB-INF/tld/elfunc.tld:
--------------------------------------------------------------------------------
1 |
2 |
5 | 1.0
6 | elf
7 |
8 | 字节数转成人可以读的形式,代码G,M,KB后缀
9 | byteCountToDisplaySize
10 | com.nd.ppt101.utils.ElFuncUtil
11 |
12 | java.lang.String byteCountToDisplaySize(java.lang.Long)
13 | ${elf:byteCountToDisplaySize(size)}
14 |
15 |
16 |
17 | 从map中获取第一个值,并转成string类型
18 | getFirstValueFromMap
19 | com.nd.ppt101.utils.ElFuncUtil
20 |
21 | java.lang.String getFirstValueFromMap(java.util.Map)
22 | ${elf:getFirstValueFromMap(map)}
23 |
24 |
25 |
26 | java正则表达式去除html标签
27 | htmlRemoveTag
28 | com.nd.ppt101.utils.ElFuncUtil
29 |
30 | java.lang.String htmlRemoveTag(java.lang.String)
31 | ${elf:htmlRemoveTag(htmlStr)}
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/index/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@include file="../include/init.jsp"%>
3 |
4 |
5 |
6 | WEBPACK-JSP
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |

19 |

20 |
WEBPACK + JSP 构建多页应用
21 |
传统的JSP页面应用无法有效的使用ES6语法特性,项目打包压缩困难,无法热更新。传统的单页应用在Tomcat等容器下无法进行服务端渲染从而达到SEO的效果。本项目工程很好融合的传统JSP页面服务端渲染的特点和单页应用开发特性且极易上手使用!
22 |
开始使用
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
WEBPACK
32 |
语法转换,打包,压缩,热更新
33 |
34 |
35 |
JSP
36 |
热部署,服务端渲染SEO
37 |
38 |
39 |
鱼与熊掌兼得
40 |
吸收WEBPACK和JSP优点,使用简单
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/ViewResolverConfig.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import org.apache.log4j.Logger;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.web.servlet.View;
7 | import org.springframework.web.servlet.view.ContentNegotiatingViewResolver;
8 | import org.springframework.web.servlet.view.InternalResourceViewResolver;
9 | import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | @Configuration
15 | public class ViewResolverConfig {
16 | private static final Logger logger = Logger.getLogger(ViewResolverConfig.class);
17 |
18 | private static final String VIEW_RESOLVER_PREFIX = "/WEB-INF/jsp/";
19 | private static final String VIEW_RESOLVER_SUFFIX = ".jsp";
20 |
21 | @Bean
22 | public ContentNegotiatingViewResolver contentNegotiatingViewResolver() {
23 | ContentNegotiatingViewResolver contentNegotiatingViewResolver = new ContentNegotiatingViewResolver();
24 | contentNegotiatingViewResolver.setOrder(1);
25 | List listView = new ArrayList<>();
26 | listView.add(new MappingJackson2JsonView());
27 | contentNegotiatingViewResolver.setDefaultViews(listView);
28 | return contentNegotiatingViewResolver;
29 | }
30 |
31 | @Bean
32 | public InternalResourceViewResolver internalResourceViewResolver() {
33 | InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
34 | viewResolver.setOrder(2);
35 | viewResolver.setPrefix(VIEW_RESOLVER_PREFIX);
36 | viewResolver.setSuffix(VIEW_RESOLVER_SUFFIX);
37 | return viewResolver;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/js/src/pages/start/dashboard.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Sidebar
3 | */
4 |
5 | /* Hide for mobile, show later */
6 | .sidebar {
7 | display: none;
8 | }
9 | @media (min-width: 768px) {
10 | .sidebar {
11 | position: fixed;
12 | top: 51px;
13 | bottom: 0;
14 | z-index: 1000;
15 | display: block;
16 | padding: 20px;
17 | overflow-x: hidden;
18 | overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
19 | background-color: #F8F8FF;
20 | border-right: 1px solid #eee;
21 | }
22 | }
23 |
24 | @media (min-width: 1170px) {
25 | .sidebar {
26 | width: 12%;
27 | }
28 | }
29 |
30 | /* Sidebar navigation */
31 | .nav-sidebar {
32 | margin-right: -21px; /* 20px padding + 1px border */
33 | margin-bottom: 20px;
34 | margin-left: -20px;
35 | }
36 | .nav-sidebar > li > a {
37 | padding-right: 20px;
38 | padding-left: 20px;
39 | color: #8A2BE2;
40 | }
41 | .nav-sidebar > .active > a,
42 | .nav-sidebar > .active > a:hover,
43 | .nav-sidebar > .active > a:focus {
44 | color: #fff;
45 | background-color: #8A2BE2;
46 | }
47 |
48 | /*
49 | * Main content
50 | */
51 |
52 | .main {
53 | padding: 20px;
54 | }
55 | @media (min-width: 768px) {
56 | .main {
57 | padding-left: 60px;
58 | }
59 | }
60 | .main .page-header {
61 | margin-top: 0;
62 | }
63 | .main .section {
64 | margin-bottom: 20px;
65 | }
66 |
67 |
68 | /*
69 | * Placeholder dashboard ideas
70 | */
71 |
72 | .placeholders {
73 | margin-bottom: 30px;
74 | text-align: center;
75 | }
76 | .placeholders h4 {
77 | margin-bottom: 0;
78 | }
79 | .placeholder {
80 | margin-bottom: 20px;
81 | }
82 | .placeholder img {
83 | display: inline-block;
84 | border-radius: 50%;
85 | }
86 |
87 | .dir-desc pre span {
88 | color: blue;
89 | }
90 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/contact/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@include file="../include/init.jsp"%>
3 |
4 |
5 |
6 | WEBPACK-JSP
7 |
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 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/index/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false" %>
2 | <%@include file="../include/init.jsp"%>
3 |
4 |
5 |
6 | WEBPACK-JSP
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |

19 |

20 |
WEBPACK + JSP 构建多页应用
21 |
传统的JSP页面应用无法有效的使用ES6语法特性,项目打包压缩困难,无法热更新。传统的单页应用在Tomcat等容器下无法进行服务端渲染从而达到SEO的效果。本项目工程很好融合的传统JSP页面服务端渲染的特点和单页应用开发特性且极易上手使用!
22 |
开始使用
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
WEBPACK
32 |
语法转换,打包,压缩,热更新
33 |
34 |
35 |
JSP
36 |
热部署,服务端渲染SEO
37 |
38 |
39 |
鱼与熊掌兼得
40 |
吸收WEBPACK和JSP优点,使用简单
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/main/webapp/static/js/start.d7ebb5145fef16460537.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([1],{"0iPh":function(e,n){e.exports=window.$},1:function(e,n,t){t("cZNe"),e.exports=t("IHve")},IHve:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=(t("i5Z1"),t("a2c4"),t("0iPh")),i=t.n(o),r=t("4bK6"),s=t.n(r),a={data:function(){return{message:"该项目已经默认支持Vue。这一章节也是用VUE编写的,你可以尽情的享受VUE带来的编码的快乐。"}}},l=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[t("p",[e._v(e._s(e.message))]),e._v(" "),e._m(0)])},c=[function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("ul",[t("li",[e._v("您可以给idea添加vue.js插件,这样也可以直接使用.vue文件。")]),e._v(" "),t("li",[e._v("js和css的语法转换在.vue文件中同样适用。")])])}],u={render:l,staticRenderFns:c},h=u,p=t("VU/8"),f=p(a,h,!1,null,null,null),m=f.exports;i()('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function(){if(console.log(location.pathname,this.pathname),location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname){console.log(this.hash);var e=i()(this.hash);if(e=e.length?e:i()("[name="+this.hash.slice(1)+"]"),e.length)return i()("html, body").animate({scrollTop:e.offset().top-60},300),!1}}),i()(".js-scroll-trigger").click(function(){i()(".navbar-collapse").collapse("hide")}),i()("body").scrollspy({target:"#sideNav",offset:80}),new s.a({el:"#vue-app",components:{myComponent:m}})},"Pp/C":function(e,n){!function(){for(var e,n=function(){},t=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeStamp","trace","warn"],o=t.length,i=window.console=window.console||{};o--;)e=t[o],i[e]||(i[e]=n)}()},a2c4:function(e,n){},cZNe:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("SbJX"),i=t.n(o);window.Promise=i.a;t("Pp/C"),t("cUYv"),t("PPkL"),t("0K64"),t("X8hh"),t("kLF+"),t("fB7P"),t("mBqO"),t("oFcf"),t("7N90"),t("wu3h"),t("SldL"),t("rplX")},h2zT:function(e,n){},i5Z1:function(e,n,t){"use strict";var o=t("h2zT");t.n(o)}},[1]);
2 | //# sourceMappingURL=start.d7ebb5145fef16460537.js.map
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | encodingFilter
10 |
11 | org.springframework.web.filter.CharacterEncodingFilter
12 |
13 |
14 | encoding
15 | utf-8
16 |
17 |
18 | forceEncoding
19 | true
20 |
21 |
22 |
23 |
24 | encodingFilter
25 | /*
26 |
27 |
28 |
29 | default
30 | *.css
31 | *.js
32 | *.html
33 | *.gif
34 | *.jpg
35 | *.jpeg
36 | *.png
37 | *.svg
38 | *.mp4
39 | *.mp3
40 | *.txt
41 | *.ico
42 | *.woff
43 | *.woff2
44 | *.ttf
45 | *.eot
46 | *.map
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.config;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.ComponentScan;
6 | import org.springframework.context.annotation.ComponentScan.Filter;
7 | import org.springframework.context.annotation.Configuration;
8 | import org.springframework.context.annotation.FilterType;
9 | import org.springframework.stereotype.Component;
10 | import org.springframework.stereotype.Controller;
11 | import org.springframework.stereotype.Repository;
12 | import org.springframework.stereotype.Service;
13 | import org.springframework.web.servlet.config.annotation.EnableWebMvc;
14 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
15 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
16 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
17 |
18 | /**
19 | * Title:
20 | * Description:
21 | * Copyright: Copyright (c) 2016
22 | * Company:ND Co., Ltd.
23 | * Create Time: 2017/6/13
24 | *
25 | * @author nianqin
26 | */
27 | @Configuration
28 | @EnableWebMvc
29 | @ComponentScan(basePackages = "net.qjzd.*", includeFilters = {
30 | @Filter(type= FilterType.ANNOTATION, value=Repository.class),
31 | @Filter(type= FilterType.ANNOTATION, value=Controller.class),
32 | @Filter(type= FilterType.ANNOTATION, value=Service.class),
33 | @Filter(type= FilterType.ANNOTATION, value=Component.class)
34 | })
35 | public class MvcConfig extends WebMvcConfigurerAdapter {
36 |
37 | @Autowired
38 | private GlobalInterceptor globalInterceptor;
39 |
40 | @Override
41 | public void addResourceHandlers(ResourceHandlerRegistry registry) {
42 | super.addResourceHandlers(registry);
43 | }
44 |
45 | @Override
46 | public void addInterceptors(InterceptorRegistry registry) {
47 | registry.addInterceptor(globalInterceptor)
48 | .addPathPatterns("/**");
49 | super.addInterceptors(registry);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/js/src/static/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 | encodingFilter
10 |
11 | org.springframework.web.filter.CharacterEncodingFilter
12 |
13 |
14 | encoding
15 | utf-8
16 |
17 |
18 | forceEncoding
19 | true
20 |
21 |
22 |
23 |
24 | encodingFilter
25 | /*
26 |
27 |
28 |
29 | default
30 | *.css
31 | *.js
32 | *.html
33 | *.gif
34 | *.jpg
35 | *.jpeg
36 | *.png
37 | *.svg
38 | *.mp4
39 | *.mp3
40 | *.txt
41 | *.ico
42 | *.woff
43 | *.woff2
44 | *.ttf
45 | *.eot
46 | *.map
47 | *.json
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/utils/ReflectUtils.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.utils;
2 |
3 | import org.springframework.util.Assert;
4 |
5 | import java.lang.annotation.Annotation;
6 | import java.lang.reflect.Method;
7 |
8 | /**
9 | * Title:
10 | * Description:
11 | * Copyright: Copyright (c) 2016
12 | * Company:ND Co., Ltd.
13 | * Create Time: 2017/6/21
14 | *
15 | * @author nianqin
16 | */
17 | public class ReflectUtils {
18 |
19 | /**
20 | * 查找方法,方法需要包含特定的注解
21 | * @param clazz
22 | * @param name
23 | * @param annotationType
24 | * @return
25 | */
26 | public static Method findMethod(Class> clazz, String name, Class extends Annotation> annotationType) {
27 | Assert.notNull(clazz, "Class must not be null");
28 | Assert.notNull(name, "Method name must not be null");
29 | Class> searchType = clazz;
30 | while (searchType != null) {
31 | Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());
32 | for (Method method : methods) {
33 | if (name.equals(method.getName()) && annotationType != null) {
34 | Annotation[] annotations = method.getDeclaredAnnotations();
35 | for (int i = 0; i < annotations.length; i++) {
36 | if (annotations[i].annotationType() == annotationType) {
37 | return method;
38 | }
39 | }
40 | }
41 | }
42 | searchType = searchType.getSuperclass();
43 | }
44 | return null;
45 | }
46 |
47 | /**
48 | * 类是否包含某一个注解
49 | * @param clazz
50 | * @param annotationType
51 | * @return
52 | */
53 | public static Boolean hasAnnotatioin(Class> clazz, Class extends Annotation> annotationType) {
54 | Assert.notNull(clazz, "Class must not be null");
55 | Class> searchType = clazz;
56 | while (searchType != null) {
57 | Annotation[] annotations = searchType.getAnnotations();
58 | for (int i = 0; i < annotations.length; i++) {
59 | if (annotations[i].annotationType() == annotationType) {
60 | return true;
61 | }
62 | }
63 | searchType = searchType.getSuperclass();
64 | }
65 | return false;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/wjsp/exception/GlobalControllerAdvice.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.wjsp.exception;
2 |
3 | import net.qjzd.utils.RequestUtils;
4 | import net.qjzd.utils.I18nUtil;
5 | import org.springframework.http.HttpStatus;
6 | import org.springframework.http.ResponseEntity;
7 | import org.springframework.web.bind.annotation.ControllerAdvice;
8 | import org.springframework.web.bind.annotation.ExceptionHandler;
9 | import org.springframework.web.bind.annotation.ResponseStatus;
10 | import org.springframework.web.context.request.WebRequest;
11 | import org.springframework.web.servlet.NoHandlerFoundException;
12 |
13 | import javax.servlet.http.HttpServletResponse;
14 |
15 |
16 | /**
17 | * Title:
18 | * Description:
19 | * Copyright: Copyright (c) 2016
20 | * Company:ND Co., Ltd.
21 | * Create Time: 2017/6/12
22 | *
23 | * @author nianqin
24 | */
25 | @ControllerAdvice
26 | public class GlobalControllerAdvice {
27 |
28 | @ExceptionHandler(NoHandlerFoundException.class)
29 | @ResponseStatus(HttpStatus.NOT_FOUND)
30 | public String notFoundExceptionHandler(NoHandlerFoundException e, WebRequest request, HttpServletResponse response) {
31 | if (RequestUtils.isTextHtmlRequest(request)
32 | && !RequestUtils.isControllerReturnJsonAction(e.getStackTrace())) {
33 | return "index/index";
34 | }
35 | ResponseEntity entity = new ResponseEntity<>(
36 | new ErrorMessage(ErrorCode.URI_NOT_FOUND.getCode(),
37 | I18nUtil.getMessage(ErrorCode.URI_NOT_FOUND.getCode()),
38 | e.getMessage()),
39 | HttpStatus.NOT_FOUND);
40 | RequestUtils.write(response, entity);
41 | return null;
42 | }
43 |
44 | @ExceptionHandler()
45 | public String defaultErrorHandler(Exception e, WebRequest request, HttpServletResponse response) {
46 | if (RequestUtils.isTextHtmlRequest(request)
47 | && !RequestUtils.isControllerReturnJsonAction(e.getStackTrace())) {
48 | return "error";
49 | }
50 | ResponseEntity entity = new ResponseEntity<>(
51 | new ErrorMessage(ErrorCode.INTERNAL_SERVER_ERROR.getCode(),
52 | I18nUtil.getMessage(ErrorCode.INTERNAL_SERVER_ERROR.getCode()),
53 | e.getMessage()),
54 | HttpStatus.INTERNAL_SERVER_ERROR);
55 | RequestUtils.write(response, entity);
56 | return null;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/main/java/net/qjzd/utils/LogUtil.java:
--------------------------------------------------------------------------------
1 | package net.qjzd.utils;
2 |
3 | import org.apache.commons.logging.LogFactory;
4 | import org.apache.log4j.Logger;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * 系统业务日志
10 | */
11 | public final class LogUtil {
12 |
13 | public static void exceptionLog(Logger log,Exception e){
14 | if(e==null)
15 | return;
16 | StringBuffer str = new StringBuffer(e.getClass().getName());
17 | str.append(":").append(e.getMessage());
18 | StackTraceElement[] stack = e.getStackTrace();
19 | for(StackTraceElement ee:stack){
20 | str.append("\n").append(ee.toString());
21 | }
22 | log.error(str.toString());
23 | e.printStackTrace();
24 | }
25 |
26 | public static String exceptionLog(Throwable t) {
27 | if(t == null)
28 | return "";
29 | StringBuffer str = new StringBuffer(t.getClass().getName());
30 | str.append(":").append(t.getMessage());
31 | StackTraceElement[] stack = t.getStackTrace();
32 | for(StackTraceElement ee:stack){
33 | str.append("\n").append(ee.toString());
34 | }
35 | Logger.getRootLogger().error(str.toString());
36 | return str.toString();
37 | }
38 |
39 | public static String exceptionLog(Exception e) {
40 | if(e == null)
41 | return "";
42 | StringBuffer str = new StringBuffer(e.getClass().getName());
43 | str.append(":").append(e.getMessage());
44 | StackTraceElement[] stack = e.getStackTrace();
45 | for(StackTraceElement ee:stack){
46 | str.append("\n").append(ee.toString());
47 | }
48 | Logger.getRootLogger().error(str.toString());
49 | return str.toString();
50 | }
51 |
52 | public static void debugLog(String info) {
53 | Logger.getRootLogger().debug(info);
54 | }
55 |
56 | /*******网上营业厅新增********/
57 |
58 | public static void infoLog(Class> theme, String info) {
59 | LogFactory.getLog(theme).info(info);
60 | }
61 |
62 | public static void infoLog(Class> theme, Object[] infos) {
63 | for (int i = 0; i < infos.length; i++) {
64 | LogFactory.getLog(theme).info(infos[i]);
65 | }
66 | }
67 |
68 | public static void infoLog(Class> theme, List