diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index fcb6b4da..36de67a3 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,12 +1,12 @@ # These are supported funding model platforms -github: #houko -patreon: hupeng +github: houko +patreon: #hupeng open_collective: SpringBootUnity -ko_fi: hupeng +ko_fi: #hupeng tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry liberapay: # Replace with a single Liberapay username -issuehunt: houko/SpringBootUnity +issuehunt: #houko/SpringBootUnity otechie: # Replace with a single Otechie username -custom: https:blog.xiaomo.info +custom: #https:blog.xiaomo.info diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..1620e2e5 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '24 7 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # i️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.travis.yml b/.travis.yml index dff5f3a5..34d145f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +1,4 @@ language: java +jdk: + - oraclejdk11 +dist: trusty \ No newline at end of file diff --git a/Readme.md b/Readme.md index daf14300..6f137c59 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/houko/SpringBootUnity.svg?branch=master)](https://travis-ci.org/houko/SpringBootUnity) -[![Backers on Open Collective](https://opencollective.com/SpringBootUnity/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/SpringBootUnity/sponsors/badge.svg)](#sponsors) [![GitHub issues](https://img.shields.io/github/issues/xiaomoinfo/SpringBootUnity.svg)](https://github.com/xiaomoinfo/SpringBootUnity/issues) -[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/xiaomoinfo/MysqlBlobToJsonTool/master/LICENSE) +[![Backers on Open Collective](https://opencollective.com/SpringBootUnity/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/SpringBootUnity/sponsors/badge.svg)](#sponsors) [![GitHub issues](https://img.shields.io/github/issues/houko/SpringBootUnity.svg)](https://github.com/houko/SpringBootUnity/issues) +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/houko/SpringBootUnity/master/LICENSE) [![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven/apache-maven.svg)]() ### 项目简介 @@ -8,16 +8,15 @@ ### 环境 - `maven` latest -- `jdk1.8` -- `spring boot 1.5.8 release`(目前最新版) -- 个人推荐`idea`来代替eclipse(希望不要被说成异教徒必须死) -- mysql5.5+ +- `jdk11` +- `spring boot 2.x release` +- 个人推荐`idea`来代替eclipse - git: 版本管理 - nginx: 反向代理服务器 ### 注意事项 -- 本项目代码托管在[github](https://github.com/xiaomoinfo/SpringBootUnity)和[码云](http://git.oschina.net/hupeng/SpringBootUnity)两个地方,最新代码会先推送在github上,码云上会在github上更新完之后进行同步。 +- 本项目代码托管在[github](https://github.com/houko/SpringBootUnity)和[码云](http://git.oschina.net/hupeng_admin/SpringBootUnity)两个地方,最新代码会先推送在github上,码云上会在github上更新完之后进行同步。 - 本项目多数数据库都用到了`hibernate`,如果没有提供`sql`文件。则启动时会根据代码映射自动生成数据库表,请在启动前修改`application.properties`中的数据库连接信息 @@ -60,12 +59,19 @@ http://localhost:808/doc.html bootstrap-ui - 2017年09月08日 crawler模块(网络爬虫):修复本地文件目录不存在会报错的bug。处理方式为:不存在则自动创建 - 2017年11月02日 开源协议从apache更换到MIT - 2017年11月02日 添加本地运行方式的说明 -- 2017年11月02日 版本更新到2017.2 +- 2017年11月02日 版本更新到2020.1 - 2017年11月02日 spring boot版本更新到1.5.8 - 2017年11月03日 添加kotlin环境配置 - 2017年11月03日 按照阿里巴巴编程规范插件P3C优化代码 - 2017年11月03日 合并`api`和`website`模块,访问`localhost:8080`会显示网站主页,访问`localhost:8080/api`会显示api管理界面 - 2018年04月09日 将整个项目升级到spring boot2.0 release版本,api有较大变动 +- 2019年08月06日 travis-ci指定jdk版本 +- 2020年10月09日 升级版本到2020.2 +- 2020年10月09日 升级jdk版本到11 +- 2020年10月09日 升级mysql connector到8 +- 2020年10月09日 升级spring boot到2.3.0 +- 2020年10月09日 修复了升级后API的破坏性变动,修复了一些了编辑器警告 + @@ -112,7 +118,7 @@ http://localhost:808/doc.html bootstrap-ui ### 问题反馈 -1. 欢迎提[issue](https://github.com/xiaomoinfo/SpringBootUnity/issues)一起完善这个项目。 +1. 欢迎提[issue](https://github.com/houko/SpringBootUnity/issues)一起完善这个项目。 2. QQ: 83387856 4. 个人主站: https://xiaomo.info @@ -121,7 +127,7 @@ http://localhost:808/doc.html bootstrap-ui MIT License - Copyright (c) 2017 Peng Hu + Copyright (c) 2022 Peng Hu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..034e8480 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. diff --git a/async/pom.xml b/async/pom.xml index ae7c1344..60d54b74 100644 --- a/async/pom.xml +++ b/async/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -14,7 +14,7 @@ info.xiaomo core - 2017.2 + 2020.1 diff --git a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java index e875271b..79e1fce0 100644 --- a/async/src/main/java/info/xiaomo/anysc/AsyncMain.java +++ b/async/src/main/java/info/xiaomo/anysc/AsyncMain.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java index 065daeaa..0817a3a8 100644 --- a/async/src/main/java/info/xiaomo/anysc/controller/TestController.java +++ b/async/src/main/java/info/xiaomo/anysc/controller/TestController.java @@ -14,10 +14,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:12 diff --git a/async/src/main/resources/config/application.properties b/async/src/main/resources/config/application.properties index 464af148..79ef9397 100644 --- a/async/src/main/resources/config/application.properties +++ b/async/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 diff --git a/core/pom.xml b/core/pom.xml index 18a51db4..8e3af9eb 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ info.xiaomo xiaomo - 2017.2 + 2020.1 4.0.0 @@ -84,4 +84,18 @@ poi + + + + + org.springframework.boot + spring-boot-maven-plugin + + + none + + + + + \ No newline at end of file diff --git a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java index 2200c6ca..76889389 100644 --- a/core/src/main/java/info/xiaomo/core/base/AuthOperate.java +++ b/core/src/main/java/info/xiaomo/core/base/AuthOperate.java @@ -5,7 +5,7 @@ import java.util.Date; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @version : 2017年1月13日 9:51 */ public interface AuthOperate { diff --git a/core/src/main/java/info/xiaomo/core/base/BaseController.java b/core/src/main/java/info/xiaomo/core/base/BaseController.java index df64f107..b2f5d2c8 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseController.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseController.java @@ -10,7 +10,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @version : 2017年1月11日 16:41 */ @RestController diff --git a/core/src/main/java/info/xiaomo/core/base/BaseDao.java b/core/src/main/java/info/xiaomo/core/base/BaseDao.java index 09067f32..d9c6941a 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseDao.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseDao.java @@ -4,7 +4,7 @@ import org.springframework.stereotype.Repository; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @version : 2017年1月13日 11:23 */ @Repository diff --git a/core/src/main/java/info/xiaomo/core/base/BaseModel.java b/core/src/main/java/info/xiaomo/core/base/BaseModel.java index 731043d5..37d18bbe 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseModel.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseModel.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 20:37 diff --git a/core/src/main/java/info/xiaomo/core/base/BaseService.java b/core/src/main/java/info/xiaomo/core/base/BaseService.java index 276bc04f..4ff3a02f 100644 --- a/core/src/main/java/info/xiaomo/core/base/BaseService.java +++ b/core/src/main/java/info/xiaomo/core/base/BaseService.java @@ -6,7 +6,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @version : 2017年1月11日 16:42 */ @Service diff --git a/core/src/main/java/info/xiaomo/core/base/Result.java b/core/src/main/java/info/xiaomo/core/base/Result.java index 9b10b437..4ec1cb45 100644 --- a/core/src/main/java/info/xiaomo/core/base/Result.java +++ b/core/src/main/java/info/xiaomo/core/base/Result.java @@ -6,10 +6,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年10月31日 15:25 diff --git a/core/src/main/java/info/xiaomo/core/constant/CodeConst.java b/core/src/main/java/info/xiaomo/core/constant/CodeConst.java index 840bfdca..9b411ca5 100644 --- a/core/src/main/java/info/xiaomo/core/constant/CodeConst.java +++ b/core/src/main/java/info/xiaomo/core/constant/CodeConst.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年10月29日 10:59 diff --git a/core/src/main/java/info/xiaomo/core/constant/GenderConst.java b/core/src/main/java/info/xiaomo/core/constant/GenderConst.java index 821e9bc6..05694372 100644 --- a/core/src/main/java/info/xiaomo/core/constant/GenderConst.java +++ b/core/src/main/java/info/xiaomo/core/constant/GenderConst.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年1月12日 16:37 diff --git a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java index df1a120c..ee06bc04 100644 --- a/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java +++ b/core/src/main/java/info/xiaomo/core/exception/UserNotFoundException.java @@ -12,10 +12,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/3 11:08 diff --git a/core/src/main/java/info/xiaomo/core/field/LoginField.java b/core/src/main/java/info/xiaomo/core/field/LoginField.java index 2317485b..e6ea5173 100644 --- a/core/src/main/java/info/xiaomo/core/field/LoginField.java +++ b/core/src/main/java/info/xiaomo/core/field/LoginField.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info(83387856) * Date: 2016年1月8日 13:16 * Description: QQ登录常量类 diff --git a/core/src/main/java/info/xiaomo/core/filter/CorsFilter.java b/core/src/main/java/info/xiaomo/core/filter/CorsFilter.java index ca97c7d8..75ccacf3 100644 --- a/core/src/main/java/info/xiaomo/core/filter/CorsFilter.java +++ b/core/src/main/java/info/xiaomo/core/filter/CorsFilter.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1516:25 diff --git a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java index 5536f10a..670f0d70 100644 --- a/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/AuthUtil.java @@ -6,10 +6,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * @email: xiaomo@xiaomo.info *

* Date: 20161131 9:50 diff --git a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java index 99ff90aa..a3c19f4c 100644 --- a/core/src/main/java/info/xiaomo/core/untils/CastUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/CastUtil.java @@ -2,6 +2,7 @@ import java.io.*; import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; @@ -10,10 +11,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月22日 14:55 @@ -162,7 +163,7 @@ public static String objectToString(Object obj) { ObjectOutputStream e = new ObjectOutputStream(out); e.writeObject(obj); byte[] bytes = out.toByteArray(); - return new String(bytes, "ISO-8859-1"); + return new String(bytes, StandardCharsets.ISO_8859_1); } catch (IOException var4) { var4.printStackTrace(); return null; @@ -172,7 +173,7 @@ public static String objectToString(Object obj) { public static Object stringToObject(String string) { try { - byte[] e = string.getBytes("ISO-8859-1"); + byte[] e = string.getBytes(StandardCharsets.ISO_8859_1); ByteArrayInputStream in = new ByteArrayInputStream(e); ObjectInputStream ois = new ObjectInputStream(in); return ois.readObject(); @@ -290,7 +291,7 @@ public static int[] stringToInts(String str, String regex) { } public static String bytesToHexString(byte[] src) { - StringBuilder stringBuilder = new StringBuilder(""); + StringBuilder stringBuilder = new StringBuilder(); if (src != null && src.length> 0) { for (byte aSrc : src) { int v = aSrc & 255; diff --git a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java index 380d7fcd..3f6d64e0 100644 --- a/core/src/main/java/info/xiaomo/core/untils/DownUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/DownUtil.java @@ -10,7 +10,7 @@ import java.net.URLConnection; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月26日 13:25 */ @Slf4j diff --git a/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java b/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java index 4e8157a7..975e56ac 100644 --- a/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/HtmlUtil.java @@ -7,7 +7,6 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. *

* * @author : xiaomo diff --git a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java index b8ed9fc1..5a30f3af 100644 --- a/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/LunarCalendarUtil.java @@ -5,7 +5,7 @@ import java.util.GregorianCalendar; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @version : 2017年1月14日 9:59 */ diff --git a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java index e45a2b55..d4c36da7 100644 --- a/core/src/main/java/info/xiaomo/core/untils/MailUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/MailUtil.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/511:00 diff --git a/core/src/main/java/info/xiaomo/core/untils/Md5Util.java b/core/src/main/java/info/xiaomo/core/untils/Md5Util.java index acd52178..3a14c314 100644 --- a/core/src/main/java/info/xiaomo/core/untils/Md5Util.java +++ b/core/src/main/java/info/xiaomo/core/untils/Md5Util.java @@ -14,10 +14,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/3 10:03 diff --git a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java index 15d6512d..f6be3ed2 100644 --- a/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/SerializeUtil.java @@ -1,6 +1,7 @@ package info.xiaomo.core.untils; import java.io.*; +import java.nio.charset.StandardCharsets; /** * │\__╭╭╭╭╭__/│ @@ -14,10 +15,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 15/9/6 16:05 @@ -40,7 +41,7 @@ public static String serialize(Object object) { oos = new ObjectOutputStream(baos); oos.writeObject(object); byte[] bytes = baos.toByteArray(); - return new String(bytes, "utf-8"); + return new String(bytes, StandardCharsets.UTF_8); } catch (Exception e) { e.printStackTrace(); } @@ -51,7 +52,7 @@ public static String serialize(Object object) { * 反序列化 */ public static Object unserialize(String s) throws UnsupportedEncodingException { - byte[] bytes = s.getBytes("utf-8"); + byte[] bytes = s.getBytes(StandardCharsets.UTF_8); ByteArrayInputStream bais; try { //反序列化 diff --git a/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java b/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java index c81ed3c5..7e69e630 100644 --- a/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java +++ b/core/src/main/java/info/xiaomo/core/untils/SqlUtil.java @@ -9,7 +9,6 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. *

* * @author : xiaomo diff --git a/crawler/pom.xml b/crawler/pom.xml index d8cde5a4..157ff6a3 100644 --- a/crawler/pom.xml +++ b/crawler/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java index 2e336982..4f960904 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java +++ b/crawler/src/main/java/info/xiaomo/crawler/CrawlerMain.java @@ -12,11 +12,11 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + *

* * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java index 3ff5c549..6f3078fc 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java +++ b/crawler/src/main/java/info/xiaomo/crawler/dao/ShikigamaDao.java @@ -5,7 +5,7 @@ import org.springframework.stereotype.Repository; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:55 */ @Repository diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java index 7e9d1343..4eb5ad72 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/MitamaModel.java @@ -4,7 +4,7 @@ import info.xiaomo.core.base.BaseModel; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 18:06 * 御魂模型 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java index e7fbfe7f..b208fea5 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java +++ b/crawler/src/main/java/info/xiaomo/crawler/model/ShikigamiModel.java @@ -7,7 +7,7 @@ import javax.persistence.Table; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:09 */ diff --git a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java index fff4fbe5..1d43fcbe 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java +++ b/crawler/src/main/java/info/xiaomo/crawler/schedule/ScheduledTasks.java @@ -15,7 +15,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:59 */ @Component diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java index 6197f03d..6f3f6b01 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/ShikigamaService.java @@ -5,7 +5,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:54 */ public interface ShikigamaService { diff --git a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java index 730566dc..0a5bfe42 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java +++ b/crawler/src/main/java/info/xiaomo/crawler/service/impl/ShikigamaServiceImpl.java @@ -11,7 +11,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:54 */ @Service diff --git a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java index ffae8cda..2423e44a 100644 --- a/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java +++ b/crawler/src/main/java/info/xiaomo/crawler/spider/OnnmyoujiSpider.java @@ -11,7 +11,7 @@ import java.util.List; /** - * @author : xiaomo (https://xiaomo.info) (https://github.com/xiaomoinfo) + * @author : xiaomo (https://xiaomo.info) (https://github.com/houko) * @created : 2016年12月24日 15:05 * 阴阳师获取数据 */ diff --git a/crawler/src/main/resources/config/application.properties b/crawler/src/main/resources/config/application.properties index 1a4a1da6..8d5bd3e7 100644 --- a/crawler/src/main/resources/config/application.properties +++ b/crawler/src/main/resources/config/application.properties @@ -1,6 +1,5 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 server.max-http-header-size=20971520 #datasource @@ -8,7 +7,7 @@ spring.datasource.url=jdbc:mysql://ip/db?characterEncoding=utf8&useSSL=true # ?useUnicode=true&characterEncoding=UTF-8 spring.datasource.username=username spring.datasource.password=password -spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 #spring.jackson.date-format=yyyy-MM-dd HH:mm:ss #spring.jackson.time-zone=GMT+8 diff --git a/freemarker/pom.xml b/freemarker/pom.xml index 856c083f..d866ff82 100644 --- a/freemarker/pom.xml +++ b/freemarker/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -14,7 +14,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java index d6bcfd05..d1e9d83c 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/FreemarkerMain.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java index 03fc51b8..78a3a90e 100644 --- a/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java +++ b/freemarker/src/main/java/info/xiaomo/freemarker/controller/FreemarkerController.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月16日 10:19 diff --git a/freemarker/src/main/resources/config/application.properties b/freemarker/src/main/resources/config/application.properties index 8ac071cd..ae76e147 100644 --- a/freemarker/src/main/resources/config/application.properties +++ b/freemarker/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss diff --git a/javase/pom.xml b/javase/pom.xml index 14560de4..e3a3c480 100644 --- a/javase/pom.xml +++ b/javase/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/javase/src/main/java/info/xiaomo/javase/QuestionMain.java b/javase/src/main/java/info/xiaomo/javase/QuestionMain.java index 6704c6c4..7cda0422 100644 --- a/javase/src/main/java/info/xiaomo/javase/QuestionMain.java +++ b/javase/src/main/java/info/xiaomo/javase/QuestionMain.java @@ -26,10 +26,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/javase/src/main/java/info/xiaomo/javase/controller/QuestionController.java b/javase/src/main/java/info/xiaomo/javase/controller/QuestionController.java index 47dc8d42..d76c4876 100644 --- a/javase/src/main/java/info/xiaomo/javase/controller/QuestionController.java +++ b/javase/src/main/java/info/xiaomo/javase/controller/QuestionController.java @@ -18,7 +18,7 @@ * Today the best performance as tomorrow newest starter! * * @author : xiaomo - * github : https://github.com/xiaomoinfo + * github : https://github.com/houko * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017年11月20日 19:00 @@ -44,7 +44,7 @@ public QuestionController(QuestionService service) { * @param id id * @return result */ - @ApiOperation(value = "查找问题", notes = "查找问题", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "查找问题", notes = "查找问题", httpMethod = "GET") @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), @@ -52,7 +52,7 @@ public QuestionController(QuestionService service) { public Result findUserById(@PathVariable("id") Long id) { QuestionModel questionModel = service.findById(id); if (questionModel == null) { - return new Result(CodeConst.NOT_FOUNT.getResultCode(), CodeConst.NOT_FOUNT.getMessage()); + return new Result(CodeConst.NOT_FOUNT.getResultCode(), CodeConst.NOT_FOUNT.getMessage()); } return new Result(questionModel); } @@ -62,7 +62,7 @@ public Result findUserById(@PathVariable("id") Long id) { * * @return result */ - @ApiOperation(value = "添加", notes = "添加", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加", notes = "添加", httpMethod = "POST") @RequestMapping(value = "findById/{id}", method = RequestMethod.POST) public Result addQuestion(@RequestBody QuestionModel questionModel) { boolean add = service.add(questionModel); diff --git a/javase/src/main/java/info/xiaomo/javase/dao/QuestionDao.java b/javase/src/main/java/info/xiaomo/javase/dao/QuestionDao.java index c66bf5f5..489e8c07 100644 --- a/javase/src/main/java/info/xiaomo/javase/dao/QuestionDao.java +++ b/javase/src/main/java/info/xiaomo/javase/dao/QuestionDao.java @@ -10,7 +10,7 @@ * Today the best performance as tomorrow newest starter! * * @author : xiaomo - * github : https://github.com/xiaomoinfo + * github : https://github.com/houko * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017年11月20日 19:00 diff --git a/javase/src/main/java/info/xiaomo/javase/model/QuestionModel.java b/javase/src/main/java/info/xiaomo/javase/model/QuestionModel.java index e3fb3ed7..39954ae5 100644 --- a/javase/src/main/java/info/xiaomo/javase/model/QuestionModel.java +++ b/javase/src/main/java/info/xiaomo/javase/model/QuestionModel.java @@ -14,7 +14,7 @@ * Today the best performance as tomorrow newest starter! * * @author : xiaomo - * github : https://github.com/xiaomoinfo + * github : https://github.com/houko * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017年11月20日 18:57 diff --git a/javase/src/main/java/info/xiaomo/javase/service/QuestionService.java b/javase/src/main/java/info/xiaomo/javase/service/QuestionService.java index 317caa00..f83da182 100644 --- a/javase/src/main/java/info/xiaomo/javase/service/QuestionService.java +++ b/javase/src/main/java/info/xiaomo/javase/service/QuestionService.java @@ -8,7 +8,7 @@ * Today the best performance as tomorrow newest starter! * * @author : xiaomo - * github : https://github.com/xiaomoinfo + * github : https://github.com/houko * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017年11月20日 19:00 diff --git a/javase/src/main/java/info/xiaomo/javase/service/impl/QuestionServiceImpl.java b/javase/src/main/java/info/xiaomo/javase/service/impl/QuestionServiceImpl.java index e3d09c51..246a8c07 100644 --- a/javase/src/main/java/info/xiaomo/javase/service/impl/QuestionServiceImpl.java +++ b/javase/src/main/java/info/xiaomo/javase/service/impl/QuestionServiceImpl.java @@ -14,7 +14,7 @@ * Today the best performance as tomorrow newest starter! * * @author : xiaomo - * github : https://github.com/xiaomoinfo + * github : https://github.com/houko * email : xiaomo@xiaomo.info * QQ : 83387856 * Date : 2017年11月20日 19:01 diff --git a/javase/src/main/resources/config/application.properties b/javase/src/main/resources/config/application.properties index d83fc3f2..34b74282 100644 --- a/javase/src/main/resources/config/application.properties +++ b/javase/src/main/resources/config/application.properties @@ -1,13 +1,12 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 server.max-http-header-size=20971520 #datasource spring.datasource.url=jdbc:mysql://ip/db?characterEncoding=utf8&useSSL=true # ?useUnicode=true&characterEncoding=UTF-8 spring.datasource.username=xiaomo spring.datasource.password=password -spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 #spring.jackson.date-format=yyyy-MM-dd HH:mm:ss #spring.jackson.time-zone=GMT+8 @@ -23,12 +22,12 @@ spring.redis.host=ip spring.redis.port=6379 spring.redis.password= # \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-active=8 -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 -spring.redis.pool.max-wait=-1 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.max-idle=8 -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 -spring.redis.pool.min-idle=0 +#spring.redis.pool.max-active=8 +## \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 +#spring.redis.pool.max-wait=-1 +## \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 +#spring.redis.pool.max-idle=8 +## \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 +#spring.redis.pool.min-idle=0 # \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 spring.redis.timeout=0 diff --git a/mongodb/pom.xml b/mongodb/pom.xml index 5a17eca2..f3ade783 100644 --- a/mongodb/pom.xml +++ b/mongodb/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -14,7 +14,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java index c916ee3c..0f6c1c2e 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/MongodbMain.java @@ -27,10 +27,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java index 1c5bd457..a7056409 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/controller/MongoUserController.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:49 @@ -54,7 +54,7 @@ public Result add(@RequestBody MongoUser user) { @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) public Result delete(@PathVariable("id") Long id) { service.delete(id); - return new Result(CodeConst.SUCCESS.getResultCode(), CodeConst.SUCCESS.getMessage()); + return new Result(CodeConst.SUCCESS.getResultCode(), CodeConst.SUCCESS.getMessage()); } } diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java index c4b9c6e3..d86d4de0 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/dao/MongoUserDao.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:42 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java index 2363c875..12095176 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/model/MongoUser.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:39 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java index 5bf3b63d..1eccb9f3 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/MongoUserService.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:45 diff --git a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java index 9b0f0a60..1827c1a3 100644 --- a/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java +++ b/mongodb/src/main/java/info/xiaomo/mongodb/service/impl/MongoUserServiceImpl.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月15日 15:45 diff --git a/mongodb/src/main/resources/config/application.properties b/mongodb/src/main/resources/config/application.properties index 8676bc6c..192ebb13 100644 --- a/mongodb/src/main/resources/config/application.properties +++ b/mongodb/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 #mongodb diff --git a/multipleSource/pom.xml b/multipleSource/pom.xml index dced9ad7..52e3b92d 100644 --- a/multipleSource/pom.xml +++ b/multipleSource/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/multipleSource/src/main/java/info/xiaomo/multiplesource/MultipleSourceMain.java b/multipleSource/src/main/java/info/xiaomo/multiplesource/MultipleSourceMain.java index fafbf0db..bcf2eb5e 100644 --- a/multipleSource/src/main/java/info/xiaomo/multiplesource/MultipleSourceMain.java +++ b/multipleSource/src/main/java/info/xiaomo/multiplesource/MultipleSourceMain.java @@ -15,10 +15,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info * Date: 2016年11月16日 10:34 diff --git a/multipleSource/src/main/java/info/xiaomo/multiplesource/controller/MultipleSourceController.java b/multipleSource/src/main/java/info/xiaomo/multiplesource/controller/MultipleSourceController.java index ea142d5a..d2b05caf 100644 --- a/multipleSource/src/main/java/info/xiaomo/multiplesource/controller/MultipleSourceController.java +++ b/multipleSource/src/main/java/info/xiaomo/multiplesource/controller/MultipleSourceController.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月16日 10:45 diff --git a/multipleSource/src/main/java/info/xiaomo/multiplesource/sql/Sql.java b/multipleSource/src/main/java/info/xiaomo/multiplesource/sql/Sql.java index 43dbc1cf..1185d127 100644 --- a/multipleSource/src/main/java/info/xiaomo/multiplesource/sql/Sql.java +++ b/multipleSource/src/main/java/info/xiaomo/multiplesource/sql/Sql.java @@ -4,10 +4,9 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月16日 11:29 diff --git a/multipleSource/src/main/resources/config/application.properties b/multipleSource/src/main/resources/config/application.properties index 1f0a93a5..f1910361 100644 --- a/multipleSource/src/main/resources/config/application.properties +++ b/multipleSource/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss @@ -10,13 +10,13 @@ spring.jackson.time-zone=GMT+8 spring.datasource.primary.url=jdbc:mysql://ip:3306/test1?characterEncoding=utf8&useSSL=true spring.datasource.primary.username=\u4F60\u7684\u5E10\u53F7 spring.datasource.primary.password=\u4F60\u7684\u5BC6\u7801 -spring.datasource.primary.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.primary.driver-class-name=com.mysql.cj.jdbc.Driver #database2 spring.datasource.secondary.url=jdbc:mysql://ip:3306/test2?characterEncoding=utf8&useSSL=true spring.datasource.secondary.username=\u5E10\u53F7 spring.datasource.secondary.password=\u4F60\u7684\u5BC6\u7801 -spring.datasource.secondary.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.secondary.driver-class-name=com.mysql.cj.jdbc.Driver diff --git a/mybatis/pom.xml b/mybatis/pom.xml index 1f021924..aca5b38b 100644 --- a/mybatis/pom.xml +++ b/mybatis/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.mybatis.spring.boot diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java index 4d09e437..b87e5e65 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/MybatisMain.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java index 19d1a423..7b19d769 100644 --- a/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java +++ b/mybatis/src/main/java/info/xiaomo/mybatis/controller/MybatisUserController.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月16日 9:41 diff --git a/mybatis/src/main/resources/config/application.properties b/mybatis/src/main/resources/config/application.properties index c75522bf..b138051d 100644 --- a/mybatis/src/main/resources/config/application.properties +++ b/mybatis/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss @@ -11,7 +11,7 @@ spring.jackson.time-zone=GMT+8 spring.datasource.url=jdbc:mysql://ip:3306/db?characterEncoding=utf8&useSSL=true spring.datasource.username=username spring.datasource.password=password -spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver diff --git a/order/pom.xml b/order/pom.xml new file mode 100644 index 00000000..fed4e2b0 --- /dev/null +++ b/order/pom.xml @@ -0,0 +1,66 @@ + + + + xiaomo + info.xiaomo + 2020.1 + + 4.0.0 + + order + + + info.xiaomo + core + 2020.1 + + + org.springframework.boot + spring-boot-devtools + true + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-swagger-ui + + + com.google.zxing + javase + 3.2.1 + + + com.google.zxing + core + 3.3.3 + + + + com.github.xiaoymin + swagger-bootstrap-ui + 1.5 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + diff --git a/order/src/main/java/info/xiaomo/order/OrderMain.java b/order/src/main/java/info/xiaomo/order/OrderMain.java new file mode 100644 index 00000000..d6311aba --- /dev/null +++ b/order/src/main/java/info/xiaomo/order/OrderMain.java @@ -0,0 +1,73 @@ +package info.xiaomo.order; + +import io.swagger.annotations.ApiOperation; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import springfox.documentation.annotations.ApiIgnore; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + + +/** + * @author xiaomo + */ +@Configuration +@ComponentScan("info.xiaomo") +@EntityScan("info.xiaomo.*.model") +@EnableSwagger2 +@Controller +@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class}) +public class OrderMain implements WebMvcConfigurer { + + public static void main(String[] args) { + SpringApplication.run(OrderMain.class, args); + } + + /** + * 接口 + * + * @return 接口 + */ + @RequestMapping(value = "/", method = RequestMethod.GET) + @ApiIgnore() + @ApiOperation(value = "重定向到api首页") + public ModelAndView api() { + return new ModelAndView("redirect:/swagger-ui.html"); + } + + + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + .apiInfo(apiInfo()) + .select() + .apis(RequestHandlerSelectors.basePackage("info.xiaomo.order")) + .paths(PathSelectors.any()) + .build(); + } + + private ApiInfo apiInfo() { + return new ApiInfoBuilder() + .title("Spring Boot中使用Swagger2构建RESTful APIs") + .contact("小莫") + .version("1.0") + .build(); + } + +} diff --git a/order/src/main/java/info/xiaomo/order/controller/OrderController.java b/order/src/main/java/info/xiaomo/order/controller/OrderController.java new file mode 100644 index 00000000..416d1c4d --- /dev/null +++ b/order/src/main/java/info/xiaomo/order/controller/OrderController.java @@ -0,0 +1,43 @@ +package info.xiaomo.order.controller; + +import info.xiaomo.core.base.Result; +import info.xiaomo.order.service.OrderService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + + +/** + * @author xiaomo + */ +@RestController +@RequestMapping("/order") +@Api(value = "识别订单") +public class OrderController { + + private final OrderService service; + + @Autowired + public OrderController(OrderService orderService) { + this.service = orderService; + } + + + @RequestMapping(value = "forbid/{id}", method = RequestMethod.GET) + @ApiOperation(value = "封号", notes = "根据传入的id对修改对应帐号状态", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "后台用户唯一id", required = true, dataType = "Long", paramType = "path") + }) + @ApiResponses(value = { + @ApiResponse(code = 404, message = "Not Found"), + @ApiResponse(code = 400, message = "No Name Provided"), + }) + public Result forbid(@PathVariable("id") Long id) { + return new Result(null); + } +} + diff --git a/order/src/main/java/info/xiaomo/order/model/OrderModel.java b/order/src/main/java/info/xiaomo/order/model/OrderModel.java new file mode 100644 index 00000000..22b8cba9 --- /dev/null +++ b/order/src/main/java/info/xiaomo/order/model/OrderModel.java @@ -0,0 +1,54 @@ +package info.xiaomo.order.model; + + +import info.xiaomo.core.base.BaseModel; +import lombok.*; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * │\__╭╭╭╭╭__/│ + * │ │ + * │ │ + * │ - -│ + * │≡ o ≡ │ + * │ │ + * ╰——┬O◤▽◥O┬——╯ + * | o | + * |╭---╮把今天最好的表现当作明天最新的起点..〜 + * いま 最高の表現 として 明日最新の始発..〜 + * Today the best performance as tomorrow newest starter! + + * + * @author : xiaomo + * github: https://github.com/houko + * email: xiaomo@xiaomo.info + *

+ * Date: 16/4/2 12:39 + * Copyright(©) 2015 by xiaomo. + */ +@Entity +@Table(name = "adminUser") +@Data +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = false) +@AllArgsConstructor +@NoArgsConstructor +public class OrderModel extends BaseModel implements Serializable { + + @Column(name = "UserName") + private String userName; + + @Column(name = "Password") + private String password; + + @Column(name = "Status") + private int status = 1; + + @Column(name = "Salt") + private String salt; + +} diff --git a/order/src/main/java/info/xiaomo/order/service/OrderService.java b/order/src/main/java/info/xiaomo/order/service/OrderService.java new file mode 100644 index 00000000..b3543f4d --- /dev/null +++ b/order/src/main/java/info/xiaomo/order/service/OrderService.java @@ -0,0 +1,9 @@ +package info.xiaomo.order.service; + +/** + * @author xiaomo + */ +public interface OrderService { + + +} diff --git a/order/src/main/java/info/xiaomo/order/service/impl/OrderServiceImpl.java b/order/src/main/java/info/xiaomo/order/service/impl/OrderServiceImpl.java new file mode 100644 index 00000000..d7b60d04 --- /dev/null +++ b/order/src/main/java/info/xiaomo/order/service/impl/OrderServiceImpl.java @@ -0,0 +1,12 @@ +package info.xiaomo.order.service.impl; + +import info.xiaomo.order.service.OrderService; +import org.springframework.stereotype.Service; + +/** + * @author xiaomo + */ +@Service +public class OrderServiceImpl implements OrderService { + +} diff --git a/pom.xml b/pom.xml index 23c2af74..5b1f7919 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 info.xiaomo xiaomo - 2017.2 + 2020.1 @@ -36,7 +36,10 @@ multipleSource crawler + javase + + order pom @@ -47,44 +50,32 @@ - - - - - - - - - - - - UTF-8 - 1.8 + 11 3.5 - 4.12 + 4.13.1 - 5.1.38 + 8.0.28 1.7.21 1.1.7 - 2.5 + 2.7 [1.3.3,) [1.2.31,) - 1.10.1 + 1.14.2 - 2.0.3.RELEASE + 2.5.12 3.5.1 @@ -92,7 +83,7 @@ 1.4.7 - 1.16.10 + 1.18.14 2.2.2 @@ -102,7 +93,7 @@ 2.6.12 - 3.10-beta2 + 3.17 @@ -122,6 +113,11 @@ pom import + + dom4j + dom4j + 1.6.1 + junit junit @@ -219,6 +215,19 @@ + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + org.apache.maven.plugins @@ -232,19 +241,16 @@ maven-source-plugin - 2.1 + 3.2.0 true compile - - jar - - \ No newline at end of file + diff --git a/rabbitmq/pom.xml b/rabbitmq/pom.xml index 5237d5c8..eed80ec6 100644 --- a/rabbitmq/pom.xml +++ b/rabbitmq/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java index 5c25e2f4..7030a585 100644 --- a/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java +++ b/rabbitmq/src/main/java/info/xiaomo/rabbitmq/RabbitMqMain.java @@ -14,11 +14,11 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + *

* * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/rabbitmq/src/main/resources/config/application.properties b/rabbitmq/src/main/resources/config/application.properties index e2c21445..b3ab7a48 100644 --- a/rabbitmq/src/main/resources/config/application.properties +++ b/rabbitmq/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 diff --git a/redis/pom.xml b/redis/pom.xml index 348bf85a..3ed31182 100644 --- a/redis/pom.xml +++ b/redis/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/redis/src/main/java/info/xiaomo/redis/RedisMain.java b/redis/src/main/java/info/xiaomo/redis/RedisMain.java index 9b6b7ed0..1f42cee6 100644 --- a/redis/src/main/java/info/xiaomo/redis/RedisMain.java +++ b/redis/src/main/java/info/xiaomo/redis/RedisMain.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java index 49543886..1590409a 100644 --- a/redis/src/main/java/info/xiaomo/redis/controller/TestController.java +++ b/redis/src/main/java/info/xiaomo/redis/controller/TestController.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月14日 17:25 diff --git a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java index 202a4b95..97cd82e6 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/CommonRedisDao.java @@ -9,10 +9,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月14日 17:59 diff --git a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java index 7a1ebf21..b9ecb6ea 100644 --- a/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java +++ b/redis/src/main/java/info/xiaomo/redis/dao/impl/CommonRedisDaoImpl.java @@ -18,10 +18,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月14日 18:00 diff --git a/redis/src/main/resources/config/application.properties b/redis/src/main/resources/config/application.properties index b25e5713..7721fe42 100644 --- a/redis/src/main/resources/config/application.properties +++ b/redis/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 # redis diff --git a/scheduled/pom.xml b/scheduled/pom.xml index b4bff7da..fa18839a 100644 --- a/scheduled/pom.xml +++ b/scheduled/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -14,7 +14,7 @@ info.xiaomo core - 2017.2 + 2020.1 diff --git a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java index a0b58808..ada6b33a 100644 --- a/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java +++ b/scheduled/src/main/java/info/xiaomo/scheduled/ScheduledMain.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:31 diff --git a/scheduled/src/main/resources/config/application.properties b/scheduled/src/main/resources/config/application.properties index 2bbf0e38..7d2d7151 100644 --- a/scheduled/src/main/resources/config/application.properties +++ b/scheduled/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 diff --git a/security/pom.xml b/security/pom.xml index bf01534e..2c3b2bda 100644 --- a/security/pom.xml +++ b/security/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/security/src/main/java/info/xiaomo/security/SecurityMain.java b/security/src/main/java/info/xiaomo/security/SecurityMain.java index 18773e9c..01e306a3 100644 --- a/security/src/main/java/info/xiaomo/security/SecurityMain.java +++ b/security/src/main/java/info/xiaomo/security/SecurityMain.java @@ -18,10 +18,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/security/src/main/resources/config/application.properties b/security/src/main/resources/config/application.properties index e32aee62..8d858203 100644 --- a/security/src/main/resources/config/application.properties +++ b/security/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss diff --git a/socket/pom.xml b/socket/pom.xml index c7509645..3739f943 100644 --- a/socket/pom.xml +++ b/socket/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/socket/src/main/java/info/xiaomo/chat/ChatMain.java b/socket/src/main/java/info/xiaomo/chat/ChatMain.java index 890fb662..b144a642 100644 --- a/socket/src/main/java/info/xiaomo/chat/ChatMain.java +++ b/socket/src/main/java/info/xiaomo/chat/ChatMain.java @@ -14,10 +14,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java index 769f0ecf..57dcd631 100644 --- a/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java +++ b/socket/src/main/java/info/xiaomo/chat/socket/MyWebSocket.java @@ -19,11 +19,11 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + *

* * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 16:36 diff --git a/socket/src/main/resources/config/application.properties b/socket/src/main/resources/config/application.properties index 453a78fb..d1e72d0f 100644 --- a/socket/src/main/resources/config/application.properties +++ b/socket/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8081 -server.session.timeout=1800 + server.max-http-header-size=20971520 diff --git a/thymeleaf/pom.xml b/thymeleaf/pom.xml index 6a7376b3..6d1b1f53 100644 --- a/thymeleaf/pom.xml +++ b/thymeleaf/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -14,7 +14,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot diff --git a/thymeleaf/src/main/java/info/xiaomo/thymeleaf/ThymeleafMain.java b/thymeleaf/src/main/java/info/xiaomo/thymeleaf/ThymeleafMain.java index 8468af9d..a561841f 100644 --- a/thymeleaf/src/main/java/info/xiaomo/thymeleaf/ThymeleafMain.java +++ b/thymeleaf/src/main/java/info/xiaomo/thymeleaf/ThymeleafMain.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年12月1日 15:38 diff --git a/thymeleaf/src/main/java/info/xiaomo/thymeleaf/controller/ThymeleafController.java b/thymeleaf/src/main/java/info/xiaomo/thymeleaf/controller/ThymeleafController.java index 9e0613e0..ef573df5 100644 --- a/thymeleaf/src/main/java/info/xiaomo/thymeleaf/controller/ThymeleafController.java +++ b/thymeleaf/src/main/java/info/xiaomo/thymeleaf/controller/ThymeleafController.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月16日 10:19 diff --git a/thymeleaf/src/main/resources/config/application.properties b/thymeleaf/src/main/resources/config/application.properties index 9a461544..fec3b903 100644 --- a/thymeleaf/src/main/resources/config/application.properties +++ b/thymeleaf/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss diff --git a/website/pom.xml b/website/pom.xml index 5e3a88d4..3a00bf4f 100644 --- a/website/pom.xml +++ b/website/pom.xml @@ -5,7 +5,7 @@ xiaomo info.xiaomo - 2017.2 + 2020.1 4.0.0 @@ -15,7 +15,7 @@ info.xiaomo core - 2017.2 + 2020.1 org.springframework.boot @@ -43,6 +43,18 @@ swagger-bootstrap-ui 1.5 + + org.springframework + spring-webmvc + + + org.projectlombok + lombok + + + org.springframework.boot + spring-boot-starter-web + diff --git a/website/src/main/java/info/xiaomo/website/XiaomoMain.java b/website/src/main/java/info/xiaomo/website/XiaomoMain.java index 74186fec..1d2c5aa7 100644 --- a/website/src/main/java/info/xiaomo/website/XiaomoMain.java +++ b/website/src/main/java/info/xiaomo/website/XiaomoMain.java @@ -29,10 +29,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 15:38 diff --git a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java index 980f2cc1..c79e934b 100644 --- a/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/AdminUserController.java @@ -28,10 +28,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 12:47 @@ -56,7 +56,7 @@ public AdminUserController(AdminUserService service) { * @return Result */ @RequestMapping(value = "login/{userName}/{password}", method = RequestMethod.POST) - @ApiOperation(value = "获取用户信息", notes = "根据用户帐号和密码登录后台", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "获取用户信息", notes = "根据用户帐号和密码登录后台", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "userName", value = "用户名", required = true, dataType = "Result", paramType = "path"), @ApiImplicitParam(name = "password", value = "用户名", required = true, dataType = "Result", paramType = "path") @@ -65,13 +65,13 @@ public AdminUserController(AdminUserService service) { @ApiResponse(code = 404, message = "Not Found"), @ApiResponse(code = 400, message = "No Name Provided"), }) - public Result login(@PathVariable("userName") String userName, @PathVariable("password") String password) { + public Result login(@PathVariable("userName") String userName, @PathVariable("password") String password) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } if (!Md5Util.encode(password, adminModel.getSalt()).equals(adminModel.getPassword())) { - return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); + return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result(adminModel); } @@ -82,7 +82,7 @@ public Result login(@PathVariable("userName") String userName, @PathVariable("pa * * @return Result */ - @ApiOperation(value = "添加后台用户", notes = "传一个管理员用户模型过来然后保存到数据库", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加后台用户", notes = "传一个管理员用户模型过来然后保存到数据库", httpMethod = "POST") @RequestMapping(value = "add", method = RequestMethod.POST) @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found"), @@ -91,7 +91,7 @@ public Result login(@PathVariable("userName") String userName, @PathVariable("pa public Result add(@RequestBody AdminModel model) { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel != null) { - return new Result(CodeConst.ADMIN_USER_REPEAT.getResultCode(), CodeConst.ADMIN_USER_REPEAT.getMessage()); + return new Result(CodeConst.ADMIN_USER_REPEAT.getResultCode(), CodeConst.ADMIN_USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); model.setSalt(salt); @@ -106,7 +106,7 @@ public Result add(@RequestBody AdminModel model) { * @param id id * @return Result */ - @ApiOperation(value = "查找用户", notes = "根据传来的id查找用户并返回", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "查找用户", notes = "根据传来的id查找用户并返回", httpMethod = "GET") @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "后台用户唯一id", required = true, dataType = "Long", paramType = "path") @@ -118,7 +118,7 @@ public Result add(@RequestBody AdminModel model) { public Result findUserById(@PathVariable("id") Long id) { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(adminModel); } @@ -163,7 +163,7 @@ public Result findById(@PathVariable Long id) { * @return Result */ @Override - @ApiOperation(value = "查找用户", notes = "根据传来的用户名查找用户并返回", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "查找用户", notes = "根据传来的用户名查找用户并返回", httpMethod = "GET") @RequestMapping(value = "findByName/{userName}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "userName", value = "用户名", required = true, dataType = "String", paramType = "path") @@ -175,7 +175,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable("userName") String userName) { AdminModel adminModel = service.findAdminUserByUserName(userName); if (adminModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(adminModel); } @@ -242,7 +242,7 @@ public Result delByIds(@PathVariable List ids) { * @throws UserNotFoundException UserNotFoundException */ @RequestMapping(value = "changePassword", method = RequestMethod.POST) - @ApiOperation(value = "修改用户密码", notes = "传来模型验证并修改密码", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "修改用户密码", notes = "传来模型验证并修改密码", httpMethod = "POST") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found"), @ApiResponse(code = 400, message = "No Name Provided"), @@ -250,7 +250,7 @@ public Result delByIds(@PathVariable List ids) { public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); if (adminModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } String salt = RandomUtil.createSalt(); adminModel.setSalt(salt); @@ -266,7 +266,7 @@ public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundE * @return 不分页 */ @RequestMapping(value = "findAll", method = RequestMethod.GET) - @ApiOperation(value = "返回所有用户信息", notes = "不分页", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "返回所有用户信息", notes = "不分页", httpMethod = "GET") @ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found"), @ApiResponse(code = 400, message = "No Name Provided"), @@ -287,7 +287,7 @@ public Result getAll() { * @throws UserNotFoundException UserNotFoundException */ @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) - @ApiOperation(value = "删除用户", notes = "根据传入的id删除对应的用户", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "删除用户", notes = "根据传入的id删除对应的用户", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "用户唯一id", required = true, dataType = "Long", paramType = "path") }) @@ -298,7 +298,7 @@ public Result getAll() { public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel adminModel = service.findAdminUserById(id); if (adminModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.deleteAdminUserById(id); return new Result(adminModel); @@ -312,7 +312,7 @@ public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundExc * @throws UserNotFoundException UserNotFoundException */ @RequestMapping(value = "update/{userName}", method = RequestMethod.POST) - @ApiOperation(value = "更新用户信息", notes = "根据传入的模型更新用户信息", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "更新用户信息", notes = "根据传入的模型更新用户信息", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "userName", value = "用户名", required = true, dataType = "String", paramType = "path") }) @@ -338,7 +338,7 @@ public Result update(@PathVariable("userName") String userName) throws UserNotFo * @throws UserNotFoundException UserNotFoundException */ @RequestMapping(value = "forbid/{id}", method = RequestMethod.GET) - @ApiOperation(value = "封号", notes = "根据传入的id对修改对应帐号状态", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "封号", notes = "根据传入的id对修改对应帐号状态", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "后台用户唯一id", required = true, dataType = "Long", paramType = "path") }) @@ -349,7 +349,7 @@ public Result update(@PathVariable("userName") String userName) throws UserNotFo public Result forbid(@PathVariable("id") Long id) throws UserNotFoundException { AdminModel model = service.findAdminUserById(id); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } model = service.forbidAdminUserById(id); return new Result(model); diff --git a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java index 48eaa7d0..86452ba6 100644 --- a/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java +++ b/website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java @@ -12,11 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -24,10 +20,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1117:40 @@ -54,14 +50,14 @@ public ChangeLogController(ChangeLogService service) { */ @Override @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) - @ApiOperation(value = "通过id查找", notes = "通过id查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "通过id查找", notes = "通过id查找", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path") }) public Result findById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(changeLogModel); } @@ -73,14 +69,14 @@ public Result findById(@PathVariable("id") Long id) { */ @Override @RequestMapping(value = "findByName/{name}", method = RequestMethod.GET) - @ApiOperation(value = "通过名字查找", notes = "通过名字查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "通过名字查找", notes = "通过名字查找", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "更新日志内容", required = true, dataType = "String", paramType = "path") }) public Result findByName(@PathVariable("name") String name) { ChangeLogModel model = service.findByName(name); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -147,11 +143,11 @@ public Result delByIds(@PathVariable List ids) { */ @Override @RequestMapping(value = "findAll", method = RequestMethod.GET) - @ApiOperation(value = "分页查询更新日志", notes = "分页查询更新日志", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "分页查询更新日志", notes = "分页查询更新日志", httpMethod = "GET") public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(pages); } @@ -173,12 +169,12 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) * * @return result */ - @ApiOperation(value = "增加更新日志", notes = "增加更新日志", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "增加更新日志", notes = "增加更新日志", httpMethod = "POST") @RequestMapping(value = "add", method = RequestMethod.POST) public Result add(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel != null) { - return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } changeLogModel = new ChangeLogModel(); changeLogModel.setName(model.getName()); @@ -193,12 +189,12 @@ public Result add(@RequestBody ChangeLogModel model) { * * @return result */ - @ApiOperation(value = "修改更新日志", notes = "修改更新日志", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "修改更新日志", notes = "修改更新日志", httpMethod = "POST") @RequestMapping(value = "update", method = RequestMethod.POST) public Result update(@RequestBody ChangeLogModel model) { ChangeLogModel changeLogModel = service.findByName(model.getName()); if (changeLogModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } changeLogModel.setName(model.getName()); changeLogModel.setOnlineTime(model.getOnlineTime()); @@ -211,14 +207,14 @@ public Result update(@RequestBody ChangeLogModel model) { * 删除更新日志 */ @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) - @ApiOperation(value = "删除更新日志", notes = "删除更新日志", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "删除更新日志", notes = "删除更新日志", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path") }) public Result deleteById(@PathVariable("id") Long id) { ChangeLogModel changeLogModel = service.findById(id); if (changeLogModel == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } ChangeLogModel delModel = service.delete(id); return new Result(delModel); diff --git a/website/src/main/java/info/xiaomo/website/controller/LinkController.java b/website/src/main/java/info/xiaomo/website/controller/LinkController.java index 31bacdbe..1afd6385 100644 --- a/website/src/main/java/info/xiaomo/website/controller/LinkController.java +++ b/website/src/main/java/info/xiaomo/website/controller/LinkController.java @@ -20,10 +20,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:55 @@ -49,7 +49,7 @@ public LinkController(LinkService service) { * @return model */ @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) - @ApiOperation(value = "通过id查找", notes = "通过id查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "通过id查找", notes = "通过id查找", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path") }) @@ -69,7 +69,7 @@ public Result findLinkById(@PathVariable("id") Long id) { */ @Override @RequestMapping(value = "findByName/{name}", method = RequestMethod.GET) - @ApiOperation(value = "根据名字查找", notes = "根据名字查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据名字查找", notes = "根据名字查找", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "友情链接名字", required = true, dataType = "String", paramType = "path") }) @@ -144,7 +144,7 @@ public Result delByIds(@PathVariable List ids) { */ @Override @RequestMapping(value = "findAll", method = RequestMethod.GET) - @ApiOperation(value = "返回所有数据", notes = "返回所有数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "返回所有数据", notes = "返回所有数据", httpMethod = "GET") public Result findAll() { List pages = service.findAll(); if (pages == null || pages.size() == 0) { @@ -182,7 +182,7 @@ public Result findById(@PathVariable Long id) { * @return model */ @RequestMapping(value = "add", method = RequestMethod.POST) - @ApiOperation(value = "添加链接", notes = "添加链接", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加链接", notes = "添加链接", httpMethod = "POST") public Result add(@RequestBody LinkModel model) { LinkModel linkModel = service.findByName(model.getName()); if (linkModel != null) { @@ -200,7 +200,7 @@ public Result add(@RequestBody LinkModel model) { * * @return model */ - @ApiOperation(value = "更新链接", notes = "更新链接", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "更新链接", notes = "更新链接", httpMethod = "POST") @RequestMapping(value = "update", method = RequestMethod.POST) public Result update(@RequestBody LinkModel model) { LinkModel linkModel = service.findById(model.getId()); @@ -220,7 +220,7 @@ public Result update(@RequestBody LinkModel model) { * @return model */ @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) - @ApiOperation(value = "删除链接", notes = "删除链接", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "删除链接", notes = "删除链接", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path") }) diff --git a/website/src/main/java/info/xiaomo/website/controller/MailController.java b/website/src/main/java/info/xiaomo/website/controller/MailController.java index 98dec377..412496d3 100644 --- a/website/src/main/java/info/xiaomo/website/controller/MailController.java +++ b/website/src/main/java/info/xiaomo/website/controller/MailController.java @@ -9,10 +9,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月14日 11:06 diff --git a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java index 24bfe974..46601a9a 100644 --- a/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java +++ b/website/src/main/java/info/xiaomo/website/controller/TechnologyController.java @@ -20,10 +20,9 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:36 @@ -45,21 +44,21 @@ public TechnologyController(TechnologyService service) { @Override - @ApiOperation(value = "根据id查找技术", notes = "根据id查找技术", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据id查找技术", notes = "根据id查找技术", httpMethod = "GET") @RequestMapping(value = "/findById/{id}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一Id", required = true, dataType = "Long", paramType = "path") }) - public Result findById(@PathVariable Long id) { + public Result findById(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @Override - @ApiOperation(value = "根据名字查找技术", notes = "根据名字查找技术", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据名字查找技术", notes = "根据名字查找技术", httpMethod = "GET") @RequestMapping(value = "/findByName/{name}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "技术名字", required = true, dataType = "name", paramType = "path") @@ -67,7 +66,7 @@ public Result findById(@PathVariable Long id) { public Result findByName(@PathVariable String name) { TechnologyModel model = service.findByName(name); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } @@ -128,12 +127,12 @@ public Result delByIds(@PathVariable List ids) { } @Override - @ApiOperation(value = "查找所有", notes = "查找所有", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "查找所有", notes = "查找所有", httpMethod = "GET") @RequestMapping(value = "/findAll", method = RequestMethod.GET) public Result findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(all); } @@ -151,23 +150,23 @@ public Result findAll(@PathVariable int start, @PathVariable int pageSize) } - @ApiOperation(value = "添加链接", notes = "添加链接", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加链接", notes = "添加链接", httpMethod = "POST") @RequestMapping(value = "/add", method = RequestMethod.POST) public Result add(@RequestBody TechnologyModel model) { TechnologyModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result(addModel); } - @ApiOperation(value = "更新链接", notes = "更新链接", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "更新链接", notes = "更新链接", httpMethod = "POST") @RequestMapping(value = "/update", method = RequestMethod.POST) public Result update(@RequestBody TechnologyModel model) { TechnologyModel update = service.findById(model.getId()); if (update == null) { - return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } update = service.update(model); return new Result(update); @@ -175,14 +174,14 @@ public Result update(@RequestBody TechnologyModel model) { @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) - @ApiOperation(value = "删除链接", notes = "删除链接", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "删除链接", notes = "删除链接", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path") }) public Result delete(@PathVariable Long id) { TechnologyModel model = service.findById(id); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result(model); diff --git a/website/src/main/java/info/xiaomo/website/controller/UserController.java b/website/src/main/java/info/xiaomo/website/controller/UserController.java index 6a678524..5a4ca6d9 100644 --- a/website/src/main/java/info/xiaomo/website/controller/UserController.java +++ b/website/src/main/java/info/xiaomo/website/controller/UserController.java @@ -19,11 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Optional; @@ -32,10 +28,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 17:51 @@ -60,7 +56,7 @@ public UserController(UserService service) { * @param id id * @return result */ - @ApiOperation(value = "查找用户", notes = "查找用户", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "查找用户", notes = "查找用户", httpMethod = "GET") @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), @@ -68,18 +64,18 @@ public UserController(UserService service) { @SuppressWarnings("unchecked") public Result findUserById(@PathVariable("id") Long id) { Optional optional = service.findUserById(id); - return optional.map(Result::new).orElseGet(() -> new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage())); + return optional.map(Result::new).orElseGet(() -> new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage())); } /** * 添加用户 */ - @ApiOperation(value = "添加用户", notes = "添加用户", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加用户", notes = "添加用户", httpMethod = "POST") @RequestMapping(value = "addUser", method = RequestMethod.POST) public Result addUser(@RequestBody UserModel user) { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel != null) { - return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String salt = RandomUtil.createSalt(); user.setPassword(Md5Util.encode(user.getPassword(), salt)); @@ -94,7 +90,7 @@ public Result addUser(@RequestBody UserModel user) { * * @return result */ - @ApiOperation(value = "注册", notes = "注册用户并发送验证链接到邮箱", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "注册", notes = "注册用户并发送验证链接到邮箱", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "用户名", required = true, dataType = "String", paramType = "path"), @ApiImplicitParam(name = "密码", required = true, dataType = "String", paramType = "path") @@ -104,7 +100,7 @@ public Result register(@PathVariable("email") String email, @PathVariable("passw UserModel userModel = service.findUserByEmail(email); //邮箱被占用 if (userModel != null) { - return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } String redirectValidateUrl = MailUtil.redirectValidateUrl(email, password); MailUtil.send(email, "帐号激活邮件", redirectValidateUrl); @@ -117,7 +113,7 @@ public Result register(@PathVariable("email") String email, @PathVariable("passw * * @return result */ - @ApiOperation(value = "登录", notes = "登录", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "登录", notes = "登录", httpMethod = "POST") @ApiImplicitParams({ @ApiImplicitParam(name = "email", value = "邮箱", required = true, dataType = "String", paramType = "path"), @ApiImplicitParam(name = "password", value = "密码", required = true, dataType = "String", paramType = "path") @@ -127,11 +123,11 @@ public Result login(@PathVariable("email") String email, @PathVariable("password UserModel userModel = service.findUserByEmail(email); //找不到用户 if (userModel == null) { - return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } //密码不正确 if (!Md5Util.encode(password, userModel.getSalt()).equals(userModel.getPassword())) { - return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); + return new Result(CodeConst.AUTH_FAILED.getResultCode(), CodeConst.AUTH_FAILED.getMessage()); } return new Result(userModel); } @@ -143,12 +139,12 @@ public Result login(@PathVariable("email") String email, @PathVariable("password * @return model * @throws UserNotFoundException UserNotFoundException */ - @ApiOperation(value = "修改密码", notes = "修改密码", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "修改密码", notes = "修改密码", httpMethod = "POST") @RequestMapping(value = "changePassword", method = RequestMethod.POST) public Result changePassword(@RequestBody UserModel user) throws UserNotFoundException { UserModel userByEmail = service.findUserByEmail(user.getEmail()); if (userByEmail == null) { - return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } String salt = RandomUtil.createSalt(); userByEmail.setPassword(Md5Util.encode(user.getPassword(), salt)); @@ -164,12 +160,12 @@ public Result changePassword(@RequestBody UserModel user) throws UserNotFoundExc * @return model * @throws UserNotFoundException UserNotFoundException */ - @ApiOperation(value = "更新用户信息", notes = "更新用户信息", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "更新用户信息", notes = "更新用户信息", httpMethod = "POST") @RequestMapping(value = "update", method = RequestMethod.POST) public Result update(@RequestBody UserModel user) throws UserNotFoundException { UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel == null) { - return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } userModel = new UserModel(); userModel.setEmail(user.getEmail()); @@ -187,12 +183,12 @@ public Result update(@RequestBody UserModel user) throws UserNotFoundException { * * @return result */ - @ApiOperation(value = "返回所有用户数据", notes = "返回所有用户数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "返回所有用户数据", notes = "返回所有用户数据", httpMethod = "GET") @RequestMapping(value = "findAll", method = RequestMethod.GET) public Result getAll() { List pages = service.findAll(); if (pages == null || pages.size() <= 0) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(pages); } @@ -205,14 +201,14 @@ public Result getAll() { * @return result */ @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) - @ApiOperation(value = "根据id删除用户", notes = "根据id删除用户", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据id删除用户", notes = "根据id删除用户", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), }) public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { UserModel userModel = service.deleteUserById(id); if (userModel == null) { - return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); + return new Result(CodeConst.USER_NOT_FOUND.getResultCode(), CodeConst.USER_NOT_FOUND.getMessage()); } return new Result(userModel); } @@ -220,19 +216,19 @@ public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundExc /** * 处理激活 */ - @ApiOperation(value = "处理激活", notes = "处理激活", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "处理激活", notes = "处理激活", httpMethod = "POST") @RequestMapping(value = "validateEmail", method = RequestMethod.POST) public Result validateEmail(@RequestBody UserModel user ) throws ServiceException { //数据访问层,通过email获取用户信息 UserModel userModel = service.findUserByEmail(user.getEmail()); if (userModel != null) { - return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); + return new Result(CodeConst.USER_REPEAT.getResultCode(), CodeConst.USER_REPEAT.getMessage()); } //验证码是否过期 if (user.getRegisterTime() + TimeUtil.ONE_DAY_IN_MILLISECONDS < TimeUtil.getNowOfMills()) { LOGGER.info("用户{}使用己过期的激活码{}激活邮箱失败!", user.getEmail(), user.getEmail()); - return new Result(CodeConst.TIME_PASSED.getResultCode(), CodeConst.TIME_PASSED.getMessage()); + return new Result(CodeConst.TIME_PASSED.getResultCode(), CodeConst.TIME_PASSED.getMessage()); } //激活 String salt = RandomUtil.createSalt(); diff --git a/website/src/main/java/info/xiaomo/website/controller/WorksController.java b/website/src/main/java/info/xiaomo/website/controller/WorksController.java index 66fd5a92..9817f244 100644 --- a/website/src/main/java/info/xiaomo/website/controller/WorksController.java +++ b/website/src/main/java/info/xiaomo/website/controller/WorksController.java @@ -1,6 +1,5 @@ package info.xiaomo.website.controller; -import info.xiaomo.core.base.BaseController; import info.xiaomo.core.base.Result; import info.xiaomo.core.constant.CodeConst; import info.xiaomo.website.model.WorksModel; @@ -10,8 +9,6 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -20,10 +17,9 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:36 @@ -34,8 +30,8 @@ @RequestMapping("/works") @RestController -@Api(value = "作品相关api", description = "作品相关api") -public class WorksController extends BaseController { +@Api(value = "作品相关api") +public class WorksController { private final WorksService service; @@ -45,145 +41,75 @@ public WorksController(WorksService service) { } - @Override @RequestMapping(value = "/findById/{id}", method = RequestMethod.GET) - @ApiOperation(value = "根据id查找作品", notes = "根据id查找作品", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据id查找作品", notes = "根据id查找作品", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), }) - public Result findById(@PathVariable Long id) { + public Result findById(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } - @Override @RequestMapping(value = "/findAll", method = RequestMethod.GET) - @ApiOperation(value = "查找所有", notes = "查找所有", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) - public Result findAll() { + @ApiOperation(value = "查找所有", notes = "查找所有", httpMethod = "GET") + public Result> findAll() { List all = service.findAll(); if (all == null || all.isEmpty()) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(all); } - /** - * 带分页 - * - * @param start 起始页 - * @param pageSize 页码数 - * @return result - */ - @Override - public Result findAll(@PathVariable int start, @PathVariable int pageSize) { - return null; - } - - @Override @RequestMapping(value = "/findByName/{name}", method = RequestMethod.GET) - @ApiOperation(value = "根据名字查找作品", notes = "根据名字查找作品", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据名字查找作品", notes = "根据名字查找作品", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "作品名字", required = true, dataType = "String", paramType = "path"), }) - public Result findByName(@PathVariable String name) { + public Result findByName(@PathVariable String name) { WorksModel model = service.findByName(name); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } return new Result(model); } - /** - * 根据名字删除模型 - * - * @param name name - * @return result - */ - @Override - public Result delByName(@PathVariable String name) { - return null; - } - - /** - * 根据id删除模型 - * - * @param id id - * @return result - */ - @Override - public Result delById(@PathVariable Long id) { - return null; - } - - /** - * 添加模型 - * - * @param model model - * @return result - */ - @Override - public Result add(@RequestBody Object model) { - return null; - } - - /** - * 更新 - * - * @param model model - * @return result - */ - @Override - public Result update(@RequestBody Object model) { - return null; - } - - /** - * 批量删除 - * - * @param ids ids - * @return result - */ - @Override - public Result delByIds(@PathVariable List ids) { - return null; - } - - @ApiOperation(value = "添加作品", notes = "添加作品", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "添加作品", notes = "添加作品", httpMethod = "POST") @RequestMapping(value = "/add", method = RequestMethod.POST) - public Result add(@RequestBody WorksModel model) { + public Result add(@RequestBody WorksModel model) { WorksModel addModel = service.findByName(model.getName()); if (addModel != null) { - return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); + return new Result(CodeConst.REPEAT.getResultCode(), CodeConst.REPEAT.getMessage()); } addModel = service.add(model); return new Result(addModel); } - @ApiOperation(value = "更新作品", notes = "更新作品", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "更新作品", notes = "更新作品", httpMethod = "POST") @RequestMapping(value = "/update", method = RequestMethod.POST) - public Result update(@RequestBody WorksModel model) { + public Result update(@RequestBody WorksModel model) { WorksModel worksModel = service.findById(model.getId()); if (worksModel == null) { - return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); + return new Result(CodeConst.CodeOR.getResultCode(), CodeConst.CodeOR.getMessage()); } worksModel = service.update(worksModel); return new Result(worksModel); } - @ApiOperation(value = "根据id删除作品", notes = "根据id删除作品", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @ApiOperation(value = "根据id删除作品", notes = "根据id删除作品", httpMethod = "GET") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "唯一id", required = true, dataType = "Long", paramType = "path"), }) - public Result delete(@PathVariable Long id) { + public Result delete(@PathVariable Long id) { WorksModel model = service.findById(id); if (model == null) { - return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); + return new Result(CodeConst.NULL_DATA.getResultCode(), CodeConst.NULL_DATA.getMessage()); } service.del(id); return new Result(model); diff --git a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java index 98a5a59a..70034482 100644 --- a/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/AdminUserDao.java @@ -16,10 +16,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java index 21028b52..0953d493 100644 --- a/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/ChangeLogDao.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:52 diff --git a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java index 1329e963..53fbf585 100644 --- a/website/src/main/java/info/xiaomo/website/dao/LinkDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/LinkDao.java @@ -8,10 +8,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:52 diff --git a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java index 97c11036..923c7678 100644 --- a/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/TechnologyDao.java @@ -16,10 +16,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/UserDao.java b/website/src/main/java/info/xiaomo/website/dao/UserDao.java index ca9aa978..810462b6 100644 --- a/website/src/main/java/info/xiaomo/website/dao/UserDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/UserDao.java @@ -16,10 +16,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/3 10:53 diff --git a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java index f617e1ab..0d6a1e89 100644 --- a/website/src/main/java/info/xiaomo/website/dao/WorksDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/WorksDao.java @@ -16,10 +16,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 13:08 diff --git a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java index 520951e4..f208448f 100644 --- a/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java +++ b/website/src/main/java/info/xiaomo/website/dao/base/CommonDao.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 20:46 diff --git a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java index 9d17b72d..a981ef75 100644 --- a/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java +++ b/website/src/main/java/info/xiaomo/website/interceptor/LoginInterceptor.java @@ -7,14 +7,14 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + /** * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 10:42 diff --git a/website/src/main/java/info/xiaomo/website/model/AdminModel.java b/website/src/main/java/info/xiaomo/website/model/AdminModel.java index 5755900a..7209d379 100644 --- a/website/src/main/java/info/xiaomo/website/model/AdminModel.java +++ b/website/src/main/java/info/xiaomo/website/model/AdminModel.java @@ -21,10 +21,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 12:39 diff --git a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java index bbf7eac4..bfc74198 100644 --- a/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java +++ b/website/src/main/java/info/xiaomo/website/model/ChangeLogModel.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/517:17 diff --git a/website/src/main/java/info/xiaomo/website/model/LinkModel.java b/website/src/main/java/info/xiaomo/website/model/LinkModel.java index a7d3198d..5907fff0 100644 --- a/website/src/main/java/info/xiaomo/website/model/LinkModel.java +++ b/website/src/main/java/info/xiaomo/website/model/LinkModel.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:47 diff --git a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java index 8426806c..ad3d9e05 100644 --- a/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java +++ b/website/src/main/java/info/xiaomo/website/model/TechnologyModel.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:27 diff --git a/website/src/main/java/info/xiaomo/website/model/UserModel.java b/website/src/main/java/info/xiaomo/website/model/UserModel.java index ef37578a..1dfba5b9 100644 --- a/website/src/main/java/info/xiaomo/website/model/UserModel.java +++ b/website/src/main/java/info/xiaomo/website/model/UserModel.java @@ -13,10 +13,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 17:36 diff --git a/website/src/main/java/info/xiaomo/website/model/WorksModel.java b/website/src/main/java/info/xiaomo/website/model/WorksModel.java index 066ffff3..6fef0f0e 100644 --- a/website/src/main/java/info/xiaomo/website/model/WorksModel.java +++ b/website/src/main/java/info/xiaomo/website/model/WorksModel.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:15 diff --git a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java index d5bdf1b0..18ee9d15 100644 --- a/website/src/main/java/info/xiaomo/website/service/AdminUserService.java +++ b/website/src/main/java/info/xiaomo/website/service/AdminUserService.java @@ -18,10 +18,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 13:04 diff --git a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java index a06a2e54..5339b40c 100644 --- a/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java +++ b/website/src/main/java/info/xiaomo/website/service/ChangeLogService.java @@ -9,10 +9,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:49 diff --git a/website/src/main/java/info/xiaomo/website/service/LinkService.java b/website/src/main/java/info/xiaomo/website/service/LinkService.java index d537e68d..6c97007f 100644 --- a/website/src/main/java/info/xiaomo/website/service/LinkService.java +++ b/website/src/main/java/info/xiaomo/website/service/LinkService.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/1119:49 diff --git a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java index 1f5c2215..5165cfb1 100644 --- a/website/src/main/java/info/xiaomo/website/service/TechnologyService.java +++ b/website/src/main/java/info/xiaomo/website/service/TechnologyService.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:33 diff --git a/website/src/main/java/info/xiaomo/website/service/UserService.java b/website/src/main/java/info/xiaomo/website/service/UserService.java index 3d3e204d..cc244a90 100644 --- a/website/src/main/java/info/xiaomo/website/service/UserService.java +++ b/website/src/main/java/info/xiaomo/website/service/UserService.java @@ -12,10 +12,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 17:45 diff --git a/website/src/main/java/info/xiaomo/website/service/WorksService.java b/website/src/main/java/info/xiaomo/website/service/WorksService.java index fef99e16..ffb93ddc 100644 --- a/website/src/main/java/info/xiaomo/website/service/WorksService.java +++ b/website/src/main/java/info/xiaomo/website/service/WorksService.java @@ -10,10 +10,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:33 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java index 67a4d27c..dcebc65b 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/AdminUserServiceImpl.java @@ -26,10 +26,10 @@ * |╭---╮把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 16/4/2 13:34 @@ -84,7 +84,7 @@ public AdminModel updateAdminUser(AdminModel model) throws UserNotFoundException @Override public Page getAdminUsers(int start, int pageSize) { - Sort sort = new Sort(Sort.Direction.DESC, "createTime"); + Sort sort = Sort.by(Sort.Direction.DESC, "createTime"); return dao.findAll(PageRequest.of(start - 1, pageSize, sort)); } diff --git a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java index 62d5648b..aa603bd1 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/ChangeLogServiceImpl.java @@ -17,10 +17,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月11日 19:49 @@ -49,7 +49,7 @@ public ChangeLogModel findByName(String name) { @Override public Page findAll(int start, int pageSize) { - Sort sort = new Sort(Sort.Direction.DESC, "createTime"); + Sort sort = Sort.by(Sort.Direction.DESC, "createTime"); return dao.findAll(PageRequest.of(start - 1, pageSize, sort)); } diff --git a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java index cf04ef9a..1742a9e7 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/LinkServiceImpl.java @@ -17,10 +17,9 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月11日 19:50 @@ -49,7 +48,7 @@ public LinkModel findByName(String name) { @Override public Page findAll(int start, int pageSize) { - Sort sort = new Sort(Sort.Direction.DESC, "order"); + Sort sort = Sort.by(Sort.Direction.DESC, "order"); return dao.findAll(PageRequest.of(start - 1, pageSize, sort)); } diff --git a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java index debfe08c..42d66e9d 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/TechnologyServiceImpl.java @@ -16,10 +16,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:34 diff --git a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java index 4265b711..f971ce79 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/UserServiceImpl.java @@ -18,10 +18,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年4月1日 17:46 @@ -86,7 +86,7 @@ public UserModel updateUser(UserModel model) throws UserNotFoundException { @Override public Page findAll(int start, int pageSize) { - Sort sort = new Sort(Sort.Direction.DESC, "createTime"); + Sort sort = Sort.by(Sort.Direction.DESC, "createTime"); return dao.findAll(PageRequest.of(start - 1, pageSize, sort)); } diff --git a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java index 6427b09e..50b66c00 100644 --- a/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java +++ b/website/src/main/java/info/xiaomo/website/service/impl/WorksServiceImpl.java @@ -16,10 +16,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月3日 14:34 diff --git a/website/src/main/java/info/xiaomo/website/util/MailUtil.java b/website/src/main/java/info/xiaomo/website/util/MailUtil.java index 1903b12a..d338d6d1 100644 --- a/website/src/main/java/info/xiaomo/website/util/MailUtil.java +++ b/website/src/main/java/info/xiaomo/website/util/MailUtil.java @@ -21,10 +21,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016/4/511:00 diff --git a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java index 47ff5be8..63ac1226 100644 --- a/website/src/main/java/info/xiaomo/website/view/AdminUserView.java +++ b/website/src/main/java/info/xiaomo/website/view/AdminUserView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java index 77570ec4..05900fdd 100644 --- a/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java +++ b/website/src/main/java/info/xiaomo/website/view/ChangeLogView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/LinkView.java b/website/src/main/java/info/xiaomo/website/view/LinkView.java index e2bd5fae..42ccd3c7 100644 --- a/website/src/main/java/info/xiaomo/website/view/LinkView.java +++ b/website/src/main/java/info/xiaomo/website/view/LinkView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java index cbbfabca..bdf5121b 100644 --- a/website/src/main/java/info/xiaomo/website/view/TechnologyView.java +++ b/website/src/main/java/info/xiaomo/website/view/TechnologyView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/UserView.java b/website/src/main/java/info/xiaomo/website/view/UserView.java index d2e55dfa..2e6aea81 100644 --- a/website/src/main/java/info/xiaomo/website/view/UserView.java +++ b/website/src/main/java/info/xiaomo/website/view/UserView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/java/info/xiaomo/website/view/WorksView.java b/website/src/main/java/info/xiaomo/website/view/WorksView.java index 9f93238f..4b4a5f67 100644 --- a/website/src/main/java/info/xiaomo/website/view/WorksView.java +++ b/website/src/main/java/info/xiaomo/website/view/WorksView.java @@ -4,10 +4,10 @@ * 把今天最好的表现当作明天最新的起点..〜 * いま 最高の表現 として 明日最新の始発..〜 * Today the best performance as tomorrow newest starter! - * Created by IntelliJ IDEA. + * * @author : xiaomo - * github: https://github.com/xiaomoinfo + * github: https://github.com/houko * email: xiaomo@xiaomo.info *

* Date: 2016年11月21日 11:12 diff --git a/website/src/main/resources/config/application.properties b/website/src/main/resources/config/application.properties index 71bb2fbe..f830f53d 100644 --- a/website/src/main/resources/config/application.properties +++ b/website/src/main/resources/config/application.properties @@ -1,6 +1,6 @@ logging.config=classpath:config/logback-dev.xml server.port=8080 -server.session.timeout=1800 + server.max-http-header-size=20971520 #datasource @@ -8,7 +8,7 @@ spring.datasource.url=jdbc:mysql://ip/db?characterEncoding=utf8&useSSL=true # ?useUnicode=true&characterEncoding=UTF-8 spring.datasource.username=username spring.datasource.password=password -spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 #spring.jackson.date-format=yyyy-MM-dd HH:mm:ss #spring.jackson.time-zone=GMT+8 diff --git a/website/src/test/java/info/xiaomo/test/MailTests.java b/website/src/test/java/info/xiaomo/test/MailTests.java deleted file mode 100644 index 3bff1dd0..00000000 --- a/website/src/test/java/info/xiaomo/test/MailTests.java +++ /dev/null @@ -1,71 +0,0 @@ -package info.xiaomo.test; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.FileSystemResource; -import org.springframework.mail.SimpleMailMessage; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.mail.javamail.MimeMessageHelper; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import javax.mail.internet.MimeMessage; -import java.io.File; - - -@RunWith(SpringJUnit4ClassRunner.class) -public class MailTests { - - @Autowired - private JavaMailSender mailSender; - - - @Test - public void sendSimpleMail() throws Exception { - - SimpleMailMessage message = new SimpleMailMessage(); - message.setFrom("dyc87112@qq.com"); - message.setTo("dyc87112@qq.com"); - message.setSubject("主题:简单邮件"); - message.setText("测试邮件内容"); - - mailSender.send(message); - } - - @Test - public void sendAttachmentsMail() throws Exception { - - MimeMessage mimeMessage = mailSender.createMimeMessage(); - - MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true); - helper.setFrom("dyc87112@qq.com"); - helper.setTo("dyc87112@qq.com"); - helper.setSubject("主题:有附件"); - helper.setText("有附件的邮件"); - - FileSystemResource file = new FileSystemResource(new File("weixin.jpg")); - helper.addAttachment("附件-1.jpg", file); - helper.addAttachment("附件-2.jpg", file); - - mailSender.send(mimeMessage); - } - - @Test - public void sendInlineMail() throws Exception { - - MimeMessage mimeMessage = mailSender.createMimeMessage(); - - MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true); - helper.setFrom("dyc87112@qq.com"); - helper.setTo("dyc87112@qq.com"); - helper.setSubject("主题:嵌入静态资源"); - helper.setText("", true); - - FileSystemResource file = new FileSystemResource(new File("weixin.jpg")); - helper.addInline("weixin", file); - - mailSender.send(mimeMessage); - } - - -} diff --git a/website/src/test/resources/application.properties b/website/src/test/resources/application.properties deleted file mode 100644 index 41c59d16..00000000 --- a/website/src/test/resources/application.properties +++ /dev/null @@ -1,33 +0,0 @@ -logging.config=classpath:config/logback-dev.xml -server.port=8080 -server.session.timeout=1800 -server.max-http-header-size=20971520 - -#datasource -spring.datasource.url=jdbc:mysql://ip/\u6570\u636E\u5E93?characterEncoding=utf8&useSSL=true -# ?useUnicode=true&characterEncoding=UTF-8 -spring.datasource.username=\u4F60\u7684\u5E10\u53F7 -spring.datasource.password=\u4F60\u7684\u5BC6\u7801 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -# \u914D\u7F6E\u8FD9\u4E2A\u503C\u5C31\u53EF\u4EE5\u683C\u5F0F\u5316\u65F6\u95F4 -#spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -#spring.jackson.time-zone=GMT+8 - -#jpa -spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect -spring.jpa.hibernate.ddl-auto=update -spring.jpa.show-sql=true -spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - - -#\u90AE\u4EF6 -spring.mail.host=smtp.qq.com -spring.mail.username=83387856@qq.com -spring.mail.password=, -spring.mail.properties.mail.smtp.auth=true -spring.mail.properties.mail.smtp.starttls.enable=true -spring.mail.properties.mail.smtp.starttls.required=true - -#spring.data.mongodb.uri=mongodb://name:pass@localhost:27017/test - -

AltStyle によって変換されたページ (->オリジナル) /