Compare commits
3 Commits
master-old
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7c8bca7df | ||
| 2a3ae4a376 | |||
| 92e818e370 |
35
.github/workflows/build.yml
vendored
35
.github/workflows/build.yml
vendored
@@ -1,20 +1,16 @@
|
||||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- "doc/**"
|
||||
- "**/README.md"
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore:
|
||||
- "doc/**"
|
||||
- "**/README.md"
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')" # 如果 commit 信息包含以下关键字则跳过该任务
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '.md')" # 如果 commit 信息包含以下关键字则跳过该任务
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
KEY: ${{ secrets.WEB_HOOK_ACCESS_KEY }}
|
||||
@@ -26,13 +22,16 @@ jobs:
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
- name: Sync repository
|
||||
uses: x-dr/sync-repo-to-gitee@v1.0
|
||||
env:
|
||||
# 在 Settings->Secrets 配置 GITEE_KEY
|
||||
SSH_KEY: ${{ secrets.GITEE_KEY }}
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
# GitHub存储库的SSH URL.
|
||||
github-repo: git@github.com:xiaohai2271/blog-backEnd.git
|
||||
# Gitee存储库的SSH URL.
|
||||
gitee-repo: git@gitee.com:xiaohai2271/blog-backEnd.git
|
||||
|
||||
- name: Unit Test
|
||||
run: mvn package -B -pl blog-deploy -am
|
||||
- name: Deploy
|
||||
run: mvn -B test --file pom.xml && curl http://bt.celess.cn:2271/hook?access_key=$KEY
|
||||
|
||||
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
# 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.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 14 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['java']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
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.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# 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@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
22
.github/workflows/sync.yml
vendored
22
.github/workflows/sync.yml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Sync Repository Action
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
# 每周一0:00
|
||||
- cron: '0 0 * * 1'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Sync to Gitee
|
||||
uses: x-dr/sync-repo-to-gitee@master
|
||||
env:
|
||||
# 在 Settings->Secrets 配置 GITEE_KEY
|
||||
SSH_KEY: ${{ secrets.GITEE_KEY }}
|
||||
with:
|
||||
# GitHub存储库的SSH URL.
|
||||
github-repo: git@github.com:xiaohai2271/blog-backEnd.git
|
||||
# Gitee存储库的SSH URL.
|
||||
gitee-repo: git@gitee.com:xiaohai2271/blog-backEnd.git
|
||||
29
.github/workflows/test.yml
vendored
Normal file
29
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
|
||||
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '.md')" # 如果 commit 信息包含以下关键字则跳过该任务
|
||||
runs-on: ubuntu-latest
|
||||
# env:
|
||||
# APPLICATION_PROPERTIES_TEST: ${{ secrets.APPLICATION_PROPERTIES_TEST }}
|
||||
# APPLICATION_PROPERTIES_PROD: ${{ secrets.APPLICATION_PROPERTIES_PROD }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
|
||||
- name: Test
|
||||
run: mvn -B test --file pom.xml
|
||||
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,5 +4,5 @@
|
||||
target/
|
||||
|
||||
# 本地项目的私有文件
|
||||
blog-deploy/src/main/resources/application-dev.properties
|
||||
src/main/resources/application-dev.properties
|
||||
src/main/resources/application-prod.properties
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-article</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--MarkDown 2 html -->
|
||||
<dependency>
|
||||
<groupId>com.youbenzi</groupId>
|
||||
<artifactId>MDTool</artifactId>
|
||||
<version>1.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.minidev</groupId>
|
||||
<artifactId>json-smart</artifactId>
|
||||
<version>2.4.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,18 +0,0 @@
|
||||
package cn.celess.article;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {ArticleApplication.class, CommonApplication.class, UserApplication.class})
|
||||
public class ArticleApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(ArticleApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _ _
|
||||
| | | | (_) | _ \ | | /\ | | (_) | |
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ / \ _ __ | |_ _ ___ | | ___
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| / /\ \ | '__| | __| | | / __| | | / _ \
|
||||
| | | | | | | |_) | | | | (_) | | (_| | / ____ \ | | | |_ | | | (__ | | | __/
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | /_/ \_\ |_| \__| |_| \___| |_| \___|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.article;
|
||||
|
||||
import cn.celess.common.test.BaseRedisTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = {ArticleApplication.class})
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class ArticleBaseTest extends BaseRedisTest {
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-categorytag</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,19 +0,0 @@
|
||||
package cn.celess.categorytag;
|
||||
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {CategoryTagApplication.class, CommonApplication.class, UserApplication.class})
|
||||
public class CategoryTagApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(CategoryTagApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _______
|
||||
| | | | (_) | _ \ | | |__ __|
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ | | __ _ __ _
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| | | / _` | / _` |
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | | | (_| | | (_| |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | |_| \__,_| \__, |
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.categorytag;
|
||||
|
||||
import cn.celess.common.test.BaseTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = {CategoryTagApplication.class})
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class CategoryTagBaseTest extends BaseTest {
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-comment</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,18 +0,0 @@
|
||||
package cn.celess.comment;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {CommentApplication.class, CommonApplication.class, UserApplication.class})
|
||||
public class CommentApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(CommentApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _____ _
|
||||
| | | | (_) | _ \ | | / ____| | |
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ | | ___ _ __ ___ _ __ ___ ___ _ __ | |_
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| | | / _ \ | '_ ` _ \ | '_ ` _ \ / _ \ | '_ \ | __|
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | |____ | (_) | | | | | | | | | | | | | | __/ | | | | | |_
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | \_____| \___/ |_| |_| |_| |_| |_| |_| \___| |_| |_| \__|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.comment;
|
||||
|
||||
import cn.celess.common.test.BaseTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = {CommentApplication.class})
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class CommentBaseTest extends BaseTest {
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-common</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-resource</artifactId>
|
||||
<version>${blog-resource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.kstyrc</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.8</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.sun</groupId>
|
||||
<artifactId>jconsole</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.sun</groupId>
|
||||
<artifactId>tools</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pageHelper -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--Email-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
<!-- TODO: remove this -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>[7.2.0, 7.2.99]</version>
|
||||
</dependency>
|
||||
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.45.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- protostuff序列化依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.dyuproject.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.dyuproject.protostuff</groupId>
|
||||
<artifactId>protostuff-runtime</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,26 +0,0 @@
|
||||
package cn.celess.common;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
|
||||
@SpringBootApplication(
|
||||
scanBasePackageClasses = {
|
||||
CommonApplication.class
|
||||
}
|
||||
)
|
||||
@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.REGEX, pattern = "cn.celess.common.test.BaseRedisTest")})
|
||||
@MapperScan("cn.celess.common.mapper")
|
||||
public class CommonApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(CommonApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package cn.celess.common.test;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import redis.embedded.RedisServer;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.PreDestroy;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2020/08/14 16:20
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class BaseRedisTest extends BaseTest {
|
||||
private static RedisServer redisServer;
|
||||
|
||||
@PostConstruct
|
||||
public static void startRedis() {
|
||||
try {
|
||||
if (redisServer == null) {
|
||||
redisServer = new RedisServer(6380);
|
||||
redisServer.start();
|
||||
log.info("start Redis success");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error("start Redis failed");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@PreDestroy()
|
||||
public static void stopRedis() {
|
||||
if (redisServer.isActive()) {
|
||||
redisServer.stop();
|
||||
log.info("stop Redis success");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package cn.celess.common.util;
|
||||
|
||||
import org.springframework.util.DigestUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/03/28 17:21
|
||||
*/
|
||||
public class StringUtil {
|
||||
/**
|
||||
* 从html中提取纯文本
|
||||
*
|
||||
* @param html html string
|
||||
* @return 纯文本
|
||||
*/
|
||||
public static String getString(String html) {
|
||||
//剔出<html>的标签
|
||||
String txtcontent = html.replaceAll("</?[^>]+>", "");
|
||||
//去除字符串中的空格,回车,换行符,制表符
|
||||
txtcontent = txtcontent.replaceAll("<a>\\s*|\t|\r|\n</a>", "");
|
||||
return txtcontent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成MD5
|
||||
*
|
||||
* @param str 源数据
|
||||
* @return md5 内容
|
||||
*/
|
||||
public static String getMD5(String str) {
|
||||
return DigestUtils.md5DigestAsHex(str.getBytes());
|
||||
}
|
||||
|
||||
public static String getCompleteUrlAndMethod(HttpServletRequest request) {
|
||||
// like this : GET:/articles?page=1&count=5
|
||||
return request.getMethod() + ":" + request.getRequestURI() +
|
||||
(request.getQueryString() == null ? "" : "?" + request.getQueryString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=cn.celess.common.config.CommonEnvPostProcessor
|
||||
org.springframework.context.ApplicationListener=cn.celess.common.config.CommonEnvPostProcessor
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _____
|
||||
| | | | (_) | _ \ | | / ____|
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ | | ___ _ __ ___ _ __ ___ ___ _ __
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| | | / _ \ | '_ ` _ \ | '_ ` _ \ / _ \ | '_ \
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | |____ | (_) | | | | | | | | | | | | | | (_) | | | | |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | \_____| \___/ |_| |_| |_| |_| |_| |_| \___/ |_| |_|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
package cn.celess.common;
|
||||
|
||||
import cn.celess.common.test.BaseTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = CommonApplication.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class CommonBaseTest extends BaseTest {
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package cn.celess.common.util;
|
||||
|
||||
import cn.celess.common.CommonBaseTest;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class StringUtilTest extends CommonBaseTest {
|
||||
|
||||
@Test
|
||||
public void getMD5() {
|
||||
assertEquals("25f9e794323b453885f5181f1b624d0b", StringUtil.getMD5("123456789"));
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-deploy</artifactId>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Swagger -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||
<version>1.9.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-article</artifactId>
|
||||
<version>${blog-article.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-categorytag</artifactId>
|
||||
<version>${blog-categorytag.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-comment</artifactId>
|
||||
<version>${blog-comment.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-extension</artifactId>
|
||||
<version>${blog-extension.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-partnersite</artifactId>
|
||||
<version>${blog-partnersite.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-siteinfo</artifactId>
|
||||
<version>${blog-siteinfo.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-visitor</artifactId>
|
||||
<version>${blog-visitor.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.6</version>
|
||||
<configuration>
|
||||
<mainClass>cn.celess.BlogApplication</mainClass>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,27 +0,0 @@
|
||||
package cn.celess;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.REGEX, pattern = "cn.celess.common.test.BaseRedisTest")})
|
||||
public class BlogApplication {
|
||||
public static final Logger logger = LoggerFactory.getLogger(BlogApplication.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(BlogApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
logger.info("启动完成!");
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package cn.celess.configuration;
|
||||
|
||||
import cn.celess.common.util.EnvironmentUtil;
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/03/28 14:26
|
||||
*/
|
||||
@Configuration
|
||||
public class DruidConfig {
|
||||
|
||||
@Bean
|
||||
public DruidDataSource druidDataSource() {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
dataSource.setDriverClassName(EnvironmentUtil.getProperties("spring.datasource.driver-class-name"));
|
||||
// 数据库基本信息
|
||||
dataSource.setUrl(EnvironmentUtil.getProperties("spring.datasource.url"));
|
||||
dataSource.setUsername(EnvironmentUtil.getProperties("spring.datasource.username"));
|
||||
dataSource.setPassword(EnvironmentUtil.getProperties("spring.datasource.password"));
|
||||
|
||||
// 数据库连接池配置
|
||||
dataSource.setInitialSize(10);
|
||||
dataSource.setMinIdle(10);
|
||||
dataSource.setMaxActive(100);
|
||||
return dataSource;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _
|
||||
| | | | (_) | _ \ | |
|
||||
| |__| | _ | |_) | | | ___ __ _
|
||||
| __ | | | | _ < | | / _ \ / _` |
|
||||
| | | | | | | |_) | | | | (_) | | (_| |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, |
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess;
|
||||
|
||||
import cn.celess.common.test.BaseTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = {BlogApplication.class})
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class DeployBaseTest extends BaseTest {
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-extension</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 七牛云SDK -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>[7.2.0, 7.2.99]</version>
|
||||
</dependency>
|
||||
|
||||
<!--Email-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,17 +0,0 @@
|
||||
package cn.celess.extension;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {ExtensionApplication.class, CommonApplication.class})
|
||||
public class ExtensionApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(ExtensionApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _
|
||||
| | | | (_) | _ \ | | | | (_)
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ ___ __ __ | |_ ___ _ __ ___ _ ___ _ __
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| / _ \ \ \/ / | __| / _ \ | '_ \ / __| | | / _ \ | '_ \
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | __/ > < | |_ | __/ | | | | \__ \ | | | (_) | | | | |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | \___| /_/\_\ \__| \___| |_| |_| |___/ |_| \___/ |_| |_|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-partnersite</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- OkHttp -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.3</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.jetbrains.kotlin</groupId>-->
|
||||
<!-- <artifactId>kotlin-stdlib</artifactId>-->
|
||||
<!-- <version>1.4.20</version>-->
|
||||
<!-- <scope>compile</scope>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.45.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,18 +0,0 @@
|
||||
package cn.celess.partnersite;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {PartnerSiteApplication.class, CommonApplication.class, UserApplication.class})
|
||||
public class PartnerSiteApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(PartnerSiteApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _ _
|
||||
| | | | (_) | _ \ | | | | (_) | |
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ _ __ __ _ _ __ | |_ _ __ ___ _ __ ___ _ | |_ ___
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| | '_ \ / _` | | '__| | __| | '_ \ / _ \ | '__| / __| | | | __| / _ \
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | |_) | | (_| | | | | |_ | | | | | __/ | | \__ \ | | | |_ | __/
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | | .__/ \__,_| |_| \__| |_| |_| \___| |_| |___/ |_| \__| \___|
|
||||
__/ | | |
|
||||
|___/ |_|
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.partnersite;
|
||||
|
||||
import cn.celess.common.test.BaseRedisTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = PartnerSiteApplication.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class PartnerSiteBaseTest extends BaseRedisTest {
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-resource</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>13</maven.compiler.source>
|
||||
<maven.compiler.target>13</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-siteinfo</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,18 +0,0 @@
|
||||
package cn.celess.siteinfo;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {SiteInfoApplication.class, CommonApplication.class, UserApplication.class})
|
||||
public class SiteInfoApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(SiteInfoApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _ _ __
|
||||
| | | | (_) | _ \ | | (_) | | (_) / _|
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ ___ _ | |_ ___ _ _ __ | |_ ___
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| / __| | | | __| / _ \ | | | '_ \ | _| / _ \
|
||||
| | | | | | | |_) | | | | (_) | | (_| | \__ \ | | | |_ | __/ | | | | | | | | | (_) |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | |___/ |_| \__| \___| |_| |_| |_| |_| \___/
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.siteinfo;
|
||||
|
||||
import cn.celess.common.test.BaseTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = SiteInfoApplication.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class SiteInfoBaseTest extends BaseTest {
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-user</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JJwt -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-core</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,17 +0,0 @@
|
||||
package cn.celess.user;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {UserApplication.class, CommonApplication.class})
|
||||
public class UserApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(UserApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package cn.celess.user.config;
|
||||
|
||||
import cn.celess.user.filter.AuthenticationFilter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @Author: 小海
|
||||
* @Date: 2019/10/18 14:19
|
||||
* @Description:
|
||||
*/
|
||||
@Configuration
|
||||
public class AuthorizationInterceptorConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(authenticationFilter()).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AuthenticationFilter authenticationFilter() {
|
||||
return new AuthenticationFilter();
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _
|
||||
| | | | (_) | _ \ | | | | | |
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ | | | | ___ ___ _ __
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| | | | | / __| / _ \ | '__|
|
||||
| | | | | | | |_) | | | | (_) | | (_| | | |__| | \__ \ | __/ | |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | \____/ |___/ \___| |_|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,13 +0,0 @@
|
||||
package cn.celess.user;
|
||||
|
||||
import cn.celess.common.test.BaseRedisTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Component
|
||||
public abstract class UserBaseTest extends BaseRedisTest {
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blog</artifactId>
|
||||
<groupId>cn.celess</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blog-visitor</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-common</artifactId>
|
||||
<version>${blog-common.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-user</artifactId>
|
||||
<version>${blog-user.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog-extension</artifactId>
|
||||
<version>${blog-extension.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Ua解析-->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>1.7.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,24 +0,0 @@
|
||||
package cn.celess.visitor;
|
||||
|
||||
import cn.celess.common.CommonApplication;
|
||||
import cn.celess.extension.ExtensionApplication;
|
||||
import cn.celess.user.UserApplication;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
@SpringBootApplication(scanBasePackageClasses = {
|
||||
VisitorApplication.class,
|
||||
CommonApplication.class,
|
||||
ExtensionApplication.class,
|
||||
UserApplication.class
|
||||
})
|
||||
public class VisitorApplication {
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(VisitorApplication.class)
|
||||
.main(SpringVersion.class)
|
||||
.bannerMode(Banner.Mode.CONSOLE)
|
||||
.run(args);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
${AnsiColor.BRIGHT_GREEN}
|
||||
_ _ _ ____ _ _ _ _
|
||||
| | | | (_) | _ \ | | (_) (_) | |
|
||||
| |__| | _ | |_) | | | ___ __ _ ______ __ __ _ ___ _ | |_ ___ _ __
|
||||
| __ | | | | _ < | | / _ \ / _` | |______| \ \ / / | | / __| | | | __| / _ \ | '__|
|
||||
| | | | | | | |_) | | | | (_) | | (_| | \ V / | | \__ \ | | | |_ | (_) | | |
|
||||
|_| |_| |_| |____/ |_| \___/ \__, | \_/ |_| |___/ |_| \__| \___/ |_|
|
||||
__/ |
|
||||
|___/
|
||||
${AnsiColor.BRIGHT_RED}
|
||||
Application Version: ${application.version}${application.formatted-version}
|
||||
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
|
||||
@@ -1,11 +0,0 @@
|
||||
package cn.celess.visitor;
|
||||
|
||||
import cn.celess.common.test.BaseRedisTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = VisitorApplication.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public abstract class VisitorBaseTest extends BaseRedisTest {
|
||||
}
|
||||
@@ -15,12 +15,12 @@ git clone git@github.com:xiaohai2271/blog-backEnd.git
|
||||
|
||||
### 3. maven构建
|
||||
```shell script
|
||||
mvn clean package -pl blog-deploy -am
|
||||
mvn package
|
||||
```
|
||||
|
||||
### 4. 运行
|
||||
```shell script
|
||||
java -jar blog-deploy/target/blog-*.jar
|
||||
java -jar target/blog-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
### 5. 其他命令
|
||||
|
||||
228
pom.xml
228
pom.xml
@@ -2,72 +2,230 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>blog-common</module>
|
||||
<module>blog-article</module>
|
||||
<module>blog-categorytag</module>
|
||||
<module>blog-user</module>
|
||||
<module>blog-comment</module>
|
||||
<module>blog-partnersite</module>
|
||||
<module>blog-visitor</module>
|
||||
<module>blog-siteinfo</module>
|
||||
<module>blog-extension</module>
|
||||
<module>blog-deploy</module>
|
||||
<module>blog-resource</module>
|
||||
</modules>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.5.6</version>
|
||||
<version>2.1.3.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<groupId>cn.celess</groupId>
|
||||
<artifactId>blog</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>blog</name>
|
||||
<description>personal blog system project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<blog-common.version>1.0.0</blog-common.version>
|
||||
<blog-article.version>1.0.0</blog-article.version>
|
||||
<blog-categorytag.version>1.0.0</blog-categorytag.version>
|
||||
<blog-user.version>1.0.0</blog-user.version>
|
||||
<blog-comment.version>1.0.0</blog-comment.version>
|
||||
<blog-partnersite.version>1.0.0</blog-partnersite.version>
|
||||
<blog-visitor.version>1.0.0</blog-visitor.version>
|
||||
<blog-siteinfo.version>1.0.0</blog-siteinfo.version>
|
||||
<blog-extension.version>1.0.0</blog-extension.version>
|
||||
<blog-resource.version>1.0.0</blog-resource.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--druid-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.22</version>
|
||||
<version>1.18.26</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Swagger -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||
<version>1.9.6</version>
|
||||
</dependency>
|
||||
|
||||
<!--MarkDown 2 html -->
|
||||
<dependency>
|
||||
<groupId>com.youbenzi</groupId>
|
||||
<artifactId>MDTool</artifactId>
|
||||
<version>1.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.minidev</groupId>
|
||||
<artifactId>json-smart</artifactId>
|
||||
<version>2.4.7</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 七牛云SDK -->
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
<version>[7.2.0, 7.2.99]</version>
|
||||
</dependency>
|
||||
|
||||
<!--Email-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- redis -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pageHelper -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- protostuff序列化依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.dyuproject.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.dyuproject.protostuff</groupId>
|
||||
<artifactId>protostuff-runtime</artifactId>
|
||||
<version>1.1.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Ua解析-->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>1.21</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<version>4.13.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JJwt -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- OkHttp -->
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<version>5.8.2</version>
|
||||
<scope>test</scope>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>1.4.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.45.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>2.0.206</version>
|
||||
<version>1.4.200</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.kstyrc</groupId>
|
||||
<artifactId>embedded-redis</artifactId>
|
||||
<version>0.6</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-core</artifactId>
|
||||
<version>2.3.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.lionsoul</groupId>
|
||||
<artifactId>ip2region</artifactId>
|
||||
<version>1.7.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>1.5.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>process-sources</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
20
src/main/java/cn/celess/blog/BlogApplication.java
Normal file
20
src/main/java/cn/celess/blog/BlogApplication.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package cn.celess.blog;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
@MapperScan("cn.celess.blog.mapper")
|
||||
public class BlogApplication {
|
||||
public static final Logger logger = LoggerFactory.getLogger(BlogApplication.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BlogApplication.class, args);
|
||||
logger.info("启动完成!");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.celess.common.config;
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import cn.celess.common.util.EnvironmentUtil;
|
||||
import cn.celess.blog.util.EnvironmentUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.env.EnvironmentPostProcessor;
|
||||
import org.springframework.boot.logging.DeferredLog;
|
||||
@@ -12,11 +13,20 @@ import org.springframework.core.env.PropertiesPropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
/**
|
||||
* <p>date: 2022/12/02</P>
|
||||
* <p>desc: </p>
|
||||
* <p>mail: a@celess.cn</p>
|
||||
*
|
||||
* @author 禾几海
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class CommonEnvPostProcessor implements EnvironmentPostProcessor, ApplicationListener<ApplicationEvent>, Ordered {
|
||||
public static final DeferredLog log = new DeferredLog();
|
||||
@@ -33,7 +43,7 @@ public class CommonEnvPostProcessor implements EnvironmentPostProcessor, Applica
|
||||
//获取环境变量
|
||||
String homeEnv = EnvironmentUtil.getEnv("BLOG_HOME", EnvironmentUtil.getEnv("USERPROFILE"));
|
||||
String configPath = (homeEnv + CONFIG_PATH).replaceAll("[\\|/]+", Matcher.quoteReplacement(File.separator));
|
||||
try (InputStream input = new FileInputStream(configPath)) {
|
||||
try (InputStream input = Files.newInputStream(Paths.get(configPath))) {
|
||||
Properties properties = new Properties();
|
||||
properties.load(input);
|
||||
PropertiesPropertySource propertySource = new PropertiesPropertySource(SOURCE_NAME, properties);
|
||||
@@ -45,7 +55,7 @@ public class CommonEnvPostProcessor implements EnvironmentPostProcessor, Applica
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ApplicationEvent event) {
|
||||
public void onApplicationEvent(@NotNull ApplicationEvent event) {
|
||||
log.replayTo(CommonEnvPostProcessor.class);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.celess.configuration;
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import cn.celess.common.util.EnvironmentUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
@@ -14,6 +14,8 @@ import org.springframework.web.filter.CorsFilter;
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeModel;
|
||||
|
||||
@Bean
|
||||
public CorsFilter corsFilter() {
|
||||
@@ -24,7 +26,7 @@ public class CorsConfig {
|
||||
config.addAllowedOrigin("https://celess.cn");
|
||||
config.addAllowedOrigin("https://www.celess.cn");
|
||||
// 本地调试时的跨域
|
||||
if (!"prod".equals(EnvironmentUtil.getProperties("spring.profiles.active", "dev"))) {
|
||||
if (!"prod".equals(activeModel)) {
|
||||
config.addAllowedOrigin("http://localhost:4200");
|
||||
config.addAllowedOrigin("http://127.0.0.1:4200");
|
||||
}
|
||||
41
src/main/java/cn/celess/blog/configuration/DruidConfig.java
Normal file
41
src/main/java/cn/celess/blog/configuration/DruidConfig.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/03/28 14:26
|
||||
*/
|
||||
@Configuration
|
||||
public class DruidConfig {
|
||||
@Value("${spring.datasource.url}")
|
||||
private String dbUrl;
|
||||
|
||||
@Value("${spring.datasource.username}")
|
||||
private String username;
|
||||
|
||||
@Value("${spring.datasource.password}")
|
||||
private String password;
|
||||
|
||||
@Value("${spring.datasource.driver-class-name}")
|
||||
private String driverClassName;
|
||||
|
||||
@Bean
|
||||
public DruidDataSource druidDataSource() {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
dataSource.setDriverClassName(driverClassName);
|
||||
// 数据库基本信息
|
||||
dataSource.setUrl(dbUrl);
|
||||
dataSource.setUsername(username);
|
||||
dataSource.setPassword(password);
|
||||
|
||||
// 数据库连接池配置
|
||||
dataSource.setInitialSize(10);
|
||||
dataSource.setMinIdle(10);
|
||||
dataSource.setMaxActive(100);
|
||||
return dataSource;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
package cn.celess.configuration;
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import cn.celess.configuration.filter.MultipleSubmitFilter;
|
||||
import cn.celess.configuration.filter.VisitorRecord;
|
||||
import cn.celess.configuration.listener.SessionListener;
|
||||
import cn.celess.blog.configuration.filter.AuthenticationFilter;
|
||||
import cn.celess.blog.configuration.filter.MultipleSubmitFilter;
|
||||
import cn.celess.blog.configuration.filter.VisitorRecord;
|
||||
import cn.celess.blog.configuration.listener.SessionListener;
|
||||
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -15,12 +16,17 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
* @Description:
|
||||
*/
|
||||
@Configuration
|
||||
public class DeployInterceptorConfig implements WebMvcConfigurer {
|
||||
|
||||
public class InterceptorConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new MultipleSubmitFilter()).addPathPatterns("/**");
|
||||
registry.addInterceptor(new VisitorRecord()).addPathPatterns("/**");
|
||||
registry.addInterceptor(authenticationFilter()).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public AuthenticationFilter authenticationFilter() {
|
||||
return new AuthenticationFilter();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.celess.configuration;
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
@@ -12,6 +12,8 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.celess.configuration;
|
||||
package cn.celess.blog.configuration;
|
||||
|
||||
import cn.celess.common.util.EnvironmentUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
@@ -20,13 +20,16 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String environment;
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.enable(!"prod".equals(EnvironmentUtil.getProperties("spring.profiles.active", "dev")))
|
||||
.enable(!"prod".equals(environment))
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("cn.celess"))
|
||||
.apis(RequestHandlerSelectors.basePackage("cn.celess.blog"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package cn.celess.user.filter;
|
||||
package cn.celess.blog.configuration.filter;
|
||||
|
||||
|
||||
import cn.celess.common.constant.ResponseEnum;
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.service.UserService;
|
||||
import cn.celess.common.util.RedisUtil;
|
||||
import cn.celess.user.util.JwtUtil;
|
||||
import cn.celess.blog.enmu.ResponseEnum;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.service.UserService;
|
||||
import cn.celess.blog.util.JwtUtil;
|
||||
import cn.celess.blog.util.RedisUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -28,6 +27,8 @@ public class AuthenticationFilter implements HandlerInterceptor {
|
||||
private static final String ROLE_ADMIN = "admin";
|
||||
private static final String ROLE_USER = "user";
|
||||
@Autowired
|
||||
JwtUtil jwtUtil;
|
||||
@Autowired
|
||||
RedisUtil redisUtil;
|
||||
@Autowired
|
||||
UserService userService;
|
||||
@@ -39,23 +40,23 @@ public class AuthenticationFilter implements HandlerInterceptor {
|
||||
int indexOf = path.indexOf("/", 1);
|
||||
String rootPath = indexOf == -1 ? path : path.substring(0, indexOf);
|
||||
String jwtStr = request.getHeader("Authorization");
|
||||
if (jwtStr != null && !jwtStr.isEmpty() && !JwtUtil.isTokenExpired(jwtStr)) {
|
||||
if (jwtStr != null && !jwtStr.isEmpty() && !jwtUtil.isTokenExpired(jwtStr)) {
|
||||
// 已登录 记录当前email
|
||||
request.getSession().setAttribute("email", JwtUtil.getUsernameFromToken(jwtStr));
|
||||
request.getSession().setAttribute("email", jwtUtil.getUsernameFromToken(jwtStr));
|
||||
}
|
||||
// 不需要鉴权的路径
|
||||
if (!USER_PREFIX.equalsIgnoreCase(rootPath) && !ADMIN_PREFIX.equalsIgnoreCase(rootPath)) {
|
||||
if (!USER_PREFIX.equals(rootPath.toLowerCase()) && !ADMIN_PREFIX.equals(rootPath.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (jwtStr == null || jwtStr.isEmpty()) {
|
||||
return writeResponse(ResponseEnum.HAVE_NOT_LOG_IN, response, request);
|
||||
}
|
||||
if (JwtUtil.isTokenExpired(jwtStr)) {
|
||||
if (jwtUtil.isTokenExpired(jwtStr)) {
|
||||
return writeResponse(ResponseEnum.LOGIN_EXPIRED, response, request);
|
||||
}
|
||||
String email = JwtUtil.getUsernameFromToken(jwtStr);
|
||||
if (JwtUtil.isTokenExpired(jwtStr)) {
|
||||
String email = jwtUtil.getUsernameFromToken(jwtStr);
|
||||
if (jwtUtil.isTokenExpired(jwtStr)) {
|
||||
// 登陆过期
|
||||
return writeResponse(ResponseEnum.LOGIN_EXPIRED, response, request);
|
||||
}
|
||||
@@ -65,7 +66,7 @@ public class AuthenticationFilter implements HandlerInterceptor {
|
||||
String role = userService.getUserRoleByEmail(email);
|
||||
if (role.equals(ROLE_USER) || role.equals(ROLE_ADMIN)) {
|
||||
// 更新token
|
||||
String token = JwtUtil.updateTokenDate(jwtStr);
|
||||
String token = jwtUtil.updateTokenDate(jwtStr);
|
||||
response.setHeader("Authorization", token);
|
||||
}
|
||||
if (role.equals(ROLE_ADMIN)) {
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.celess.configuration.filter;
|
||||
package cn.celess.blog.configuration.filter;
|
||||
|
||||
import cn.celess.common.constant.ResponseEnum;
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.util.StringUtil;
|
||||
import cn.celess.blog.enmu.ResponseEnum;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.util.RequestUtil;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -24,12 +24,12 @@ public class MultipleSubmitFilter implements HandlerInterceptor {
|
||||
if (lastSubmitTime == null || completeUrl == null) {
|
||||
return true;
|
||||
}
|
||||
if (System.currentTimeMillis() - lastSubmitTime < WAIT_TIME && StringUtil.getCompleteUrlAndMethod(request).equals(completeUrl)) {
|
||||
if (System.currentTimeMillis() - lastSubmitTime < WAIT_TIME && RequestUtil.getCompleteUrlAndMethod(request).equals(completeUrl)) {
|
||||
// 请求参数和路径均相同 且请求时间间隔小于 WAIT_TIME
|
||||
response.setContentType("application/json");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
Response result = new Response(ResponseEnum.FAILURE.getCode(), "重复请求", null);
|
||||
response.getWriter().println(result);
|
||||
response.getWriter().println(result.toString());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -39,6 +39,6 @@ public class MultipleSubmitFilter implements HandlerInterceptor {
|
||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
|
||||
HttpSession session = request.getSession();
|
||||
session.setAttribute("lastSubmitTime", System.currentTimeMillis());
|
||||
session.setAttribute("completeUrl&method", StringUtil.getCompleteUrlAndMethod(request));
|
||||
session.setAttribute("completeUrl&method", RequestUtil.getCompleteUrlAndMethod(request));
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.celess.configuration.filter;
|
||||
package cn.celess.blog.configuration.filter;
|
||||
|
||||
import cn.celess.common.util.StringUtil;
|
||||
import cn.celess.blog.util.RequestUtil;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
@@ -27,11 +27,11 @@ public class VisitorRecord implements HandlerInterceptor {
|
||||
return true;
|
||||
}
|
||||
// 获取访问次数
|
||||
Integer count = visitDetail.get(StringUtil.getCompleteUrlAndMethod(request));
|
||||
Integer count = visitDetail.get(RequestUtil.getCompleteUrlAndMethod(request));
|
||||
// 自增
|
||||
count = count == null ? 1 : ++count;
|
||||
// 更新
|
||||
visitDetail.put(StringUtil.getCompleteUrlAndMethod(request), count);
|
||||
visitDetail.put(RequestUtil.getCompleteUrlAndMethod(request), count);
|
||||
session.setAttribute("ip", request.getRemoteAddr());
|
||||
return true;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.celess.configuration.listener;
|
||||
package cn.celess.blog.configuration.listener;
|
||||
|
||||
import cn.celess.user.util.RedisUserUtil;
|
||||
import cn.celess.blog.util.RedisUserUtil;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cn.celess.article.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.article.util.SitemapGenerateUtil;
|
||||
import cn.celess.common.constant.ResponseEnum;
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.dto.ArticleReq;
|
||||
import cn.celess.common.entity.vo.ArticleModel;
|
||||
import cn.celess.common.service.ArticleService;
|
||||
import cn.celess.common.util.EnvironmentUtil;
|
||||
import cn.celess.user.util.RedisUserUtil;
|
||||
import cn.celess.blog.enmu.ResponseEnum;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.model.ArticleModel;
|
||||
import cn.celess.blog.entity.request.ArticleReq;
|
||||
import cn.celess.blog.service.ArticleService;
|
||||
import cn.celess.blog.util.RedisUserUtil;
|
||||
import cn.celess.blog.util.SitemapGenerateUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -25,6 +25,8 @@ public class ArticleController {
|
||||
SitemapGenerateUtil sitemapGenerateUtil;
|
||||
@Autowired
|
||||
RedisUserUtil redisUserUtil;
|
||||
@Value("${spring.profiles.active}")
|
||||
private String activeModel;
|
||||
|
||||
/**
|
||||
* 新建一篇文章
|
||||
@@ -35,7 +37,7 @@ public class ArticleController {
|
||||
@PostMapping("/admin/article/create")
|
||||
public Response create(@RequestBody ArticleReq body) {
|
||||
ArticleModel articleModel = articleService.create(body);
|
||||
if ("prod".equals(EnvironmentUtil.getProperties("spring.profiles.active", "dev"))) {
|
||||
if ("prod".equals(activeModel)) {
|
||||
sitemapGenerateUtil.createSitemap();
|
||||
}
|
||||
return Response.success(articleModel);
|
||||
@@ -50,7 +52,7 @@ public class ArticleController {
|
||||
@DeleteMapping("/admin/article/del")
|
||||
public Response delete(@RequestParam("articleID") long articleId) {
|
||||
boolean delete = articleService.delete(articleId);
|
||||
if ("prod".equals(EnvironmentUtil.getProperties("spring.profiles.active", "dev"))) {
|
||||
if ("prod".equals(activeModel)) {
|
||||
sitemapGenerateUtil.createSitemap();
|
||||
}
|
||||
return Response.success(delete);
|
||||
@@ -65,7 +67,7 @@ public class ArticleController {
|
||||
@PutMapping("/admin/article/update")
|
||||
public Response update(@RequestBody ArticleReq body) {
|
||||
ArticleModel update = articleService.update(body);
|
||||
if ("prod".equals(EnvironmentUtil.getProperties("spring.profiles.active", "dev"))) {
|
||||
if ("prod".equals(activeModel)) {
|
||||
sitemapGenerateUtil.createSitemap();
|
||||
}
|
||||
return Response.success(update);
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.celess.categorytag.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.service.CategoryService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.service.CategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.celess.comment.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.dto.CommentReq;
|
||||
import cn.celess.common.service.CommentService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.request.CommentReq;
|
||||
import cn.celess.blog.service.CommentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package cn.celess.extension.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.constant.ResponseEnum;
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.vo.QiniuResponse;
|
||||
import cn.celess.common.exception.BlogResponseException;
|
||||
import cn.celess.common.service.CountService;
|
||||
import cn.celess.common.service.QiniuService;
|
||||
import cn.celess.common.util.HttpUtil;
|
||||
import cn.celess.common.util.RedisUtil;
|
||||
import cn.celess.common.util.VeriCodeUtil;
|
||||
import cn.celess.user.util.RedisUserUtil;
|
||||
import cn.celess.blog.enmu.ResponseEnum;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.model.QiniuResponse;
|
||||
import cn.celess.blog.exception.MyException;
|
||||
import cn.celess.blog.service.CountService;
|
||||
import cn.celess.blog.service.QiniuService;
|
||||
import cn.celess.blog.util.HttpUtil;
|
||||
import cn.celess.blog.util.RedisUserUtil;
|
||||
import cn.celess.blog.util.RedisUtil;
|
||||
import cn.celess.blog.util.VeriCodeUtil;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -37,7 +36,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @date : 2019/04/02 22:03
|
||||
*/
|
||||
@RestController
|
||||
public class ExtensionController {
|
||||
public class CommonController {
|
||||
public static final Logger logger = LoggerFactory.getLogger(Object.class);
|
||||
|
||||
@Autowired
|
||||
@@ -46,7 +45,7 @@ public class ExtensionController {
|
||||
QiniuService qiniuService;
|
||||
@Autowired
|
||||
RedisUtil redisUtil;
|
||||
@Resource
|
||||
@Autowired
|
||||
RedisUserUtil redisUserUtil;
|
||||
|
||||
|
||||
@@ -112,10 +111,10 @@ public class ExtensionController {
|
||||
request.getSession().setAttribute("verImgCodeStatus", false);
|
||||
String codeStr = (String) request.getSession().getAttribute("code");
|
||||
if (code == null) {
|
||||
throw new BlogResponseException(ResponseEnum.PARAMETERS_ERROR);
|
||||
throw new MyException(ResponseEnum.PARAMETERS_ERROR);
|
||||
}
|
||||
if (codeStr == null) {
|
||||
throw new BlogResponseException(ResponseEnum.IMG_CODE_TIMEOUT);
|
||||
throw new MyException(ResponseEnum.IMG_CODE_TIMEOUT);
|
||||
}
|
||||
code = code.toLowerCase();
|
||||
codeStr = codeStr.toLowerCase();
|
||||
@@ -147,7 +146,7 @@ public class ExtensionController {
|
||||
uploadTimes = Integer.parseInt(uploadTimesStr);
|
||||
}
|
||||
if (uploadTimes == 10) {
|
||||
throw new BlogResponseException(ResponseEnum.FAILURE.getCode(), "上传次数已达10次,请2小时后在上传");
|
||||
throw new MyException(ResponseEnum.FAILURE.getCode(), "上传次数已达10次,请2小时后在上传");
|
||||
}
|
||||
request.setCharacterEncoding("utf-8");
|
||||
response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);
|
||||
@@ -160,8 +159,8 @@ public class ExtensionController {
|
||||
String fileName = file.getOriginalFilename();
|
||||
assert fileName != null;
|
||||
String mime = fileName.substring(fileName.lastIndexOf("."));
|
||||
if (".png".equalsIgnoreCase(mime) || ".jpg".equalsIgnoreCase(mime) ||
|
||||
".jpeg".equalsIgnoreCase(mime) || ".bmp".equalsIgnoreCase(mime)) {
|
||||
if (".png".equals(mime.toLowerCase()) || ".jpg".equals(mime.toLowerCase()) ||
|
||||
".jpeg".equals(mime.toLowerCase()) || ".bmp".equals(mime.toLowerCase())) {
|
||||
QiniuResponse qiniuResponse = qiniuService.uploadFile(file.getInputStream(), "img_" + System.currentTimeMillis() + mime);
|
||||
map.put("success", 1);
|
||||
map.put("message", "上传成功");
|
||||
@@ -180,7 +179,7 @@ public class ExtensionController {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode root;
|
||||
try {
|
||||
root = mapper.readTree(HttpUtil.getHttpResponse("https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN"));
|
||||
root = mapper.readTree(HttpUtil.get("https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN"));
|
||||
} catch (IOException e) {
|
||||
return Response.failure(null);
|
||||
}
|
||||
@@ -197,10 +196,10 @@ public class ExtensionController {
|
||||
uploadTimes = Integer.parseInt(uploadTimesStr);
|
||||
}
|
||||
if (uploadTimes == 10) {
|
||||
throw new BlogResponseException(ResponseEnum.FAILURE.getCode(), "上传次数已达10次,请2小时后在上传");
|
||||
throw new MyException(ResponseEnum.FAILURE.getCode(), "上传次数已达10次,请2小时后在上传");
|
||||
}
|
||||
if (files.length == 0) {
|
||||
throw new BlogResponseException(ResponseEnum.NO_FILE);
|
||||
throw new MyException(ResponseEnum.NO_FILE);
|
||||
}
|
||||
for (MultipartFile file : files) {
|
||||
Map<String, Object> resp = new HashMap<>(4);
|
||||
@@ -1,13 +1,12 @@
|
||||
package cn.celess.partnersite.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
|
||||
import cn.celess.common.entity.PartnerSite;
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.dto.LinkApplyReq;
|
||||
import cn.celess.common.entity.dto.LinkReq;
|
||||
import cn.celess.common.service.MailService;
|
||||
import cn.celess.common.service.PartnerSiteService;
|
||||
import cn.celess.common.util.RedisUtil;
|
||||
import cn.celess.blog.entity.PartnerSite;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.request.LinkApplyReq;
|
||||
import cn.celess.blog.entity.request.LinkReq;
|
||||
import cn.celess.blog.service.MailService;
|
||||
import cn.celess.blog.service.PartnerSiteService;
|
||||
import cn.celess.blog.util.RedisUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -20,7 +19,7 @@ import java.util.stream.Collectors;
|
||||
* @date : 2019/05/12 13:26
|
||||
*/
|
||||
@RestController
|
||||
public class PartnerSiteController {
|
||||
public class LinksController {
|
||||
@Autowired
|
||||
PartnerSiteService partnerSiteService;
|
||||
@Autowired
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.celess.categorytag.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.vo.TagModel;
|
||||
import cn.celess.common.service.TagService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.model.TagModel;
|
||||
import cn.celess.blog.service.TagService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package cn.celess.user.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.entity.dto.LoginReq;
|
||||
import cn.celess.common.entity.dto.UserReq;
|
||||
import cn.celess.common.service.UserService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.entity.request.LoginReq;
|
||||
import cn.celess.blog.entity.request.UserReq;
|
||||
import cn.celess.blog.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -61,8 +61,8 @@ public class UserController {
|
||||
}
|
||||
String fileName = file.getOriginalFilename();
|
||||
String mime = fileName.substring(fileName.lastIndexOf("."));
|
||||
if (".png".equalsIgnoreCase(mime) || ".jpg".equalsIgnoreCase(mime) ||
|
||||
".jpeg".equalsIgnoreCase(mime) || ".bmp".equalsIgnoreCase(mime)) {
|
||||
if (".png".equals(mime.toLowerCase()) || ".jpg".equals(mime.toLowerCase()) ||
|
||||
".jpeg".equals(mime.toLowerCase()) || ".bmp".equals(mime.toLowerCase())) {
|
||||
return (Response) userService.updateUserAavatarImg(file.getInputStream(), mime);
|
||||
}
|
||||
return Response.failure("请上传图片文件");
|
||||
@@ -1,8 +1,8 @@
|
||||
package cn.celess.visitor.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.service.CountService;
|
||||
import cn.celess.common.service.VisitorService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.service.CountService;
|
||||
import cn.celess.blog.service.VisitorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.celess.siteinfo.controller;
|
||||
package cn.celess.blog.controller;
|
||||
|
||||
import cn.celess.common.entity.Response;
|
||||
import cn.celess.common.service.WebUpdateInfoService;
|
||||
import cn.celess.blog.entity.Response;
|
||||
import cn.celess.blog.service.WebUpdateInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.celess.common.constant;
|
||||
package cn.celess.blog.enmu;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.celess.common.constant;
|
||||
package cn.celess.blog.enmu;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.celess.common.constant;
|
||||
package cn.celess.blog.enmu;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package cn.celess.common.constant;
|
||||
package cn.celess.blog.enmu;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
@@ -1,8 +1,7 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,7 +10,7 @@ import java.util.List;
|
||||
* @date : 2019/03/28 14:51
|
||||
*/
|
||||
@Data
|
||||
public class Article implements Serializable {
|
||||
public class Article {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -1,11 +1,9 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: 小海
|
||||
* @Date: 2020-05-24 14:52
|
||||
@@ -14,7 +12,7 @@ import java.io.Serializable;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ArticleTag implements Serializable {
|
||||
public class ArticleTag {
|
||||
private Long id;
|
||||
|
||||
private Article article;
|
||||
@@ -1,15 +1,13 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/03/28 22:18
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
public class Category extends TagCategory implements Serializable {
|
||||
public class Category extends TagCategory {
|
||||
public Category(String name) {
|
||||
super.setName(name);
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -11,7 +10,7 @@ import java.util.Date;
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class Comment implements Serializable {
|
||||
public class Comment {
|
||||
|
||||
private Long id;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 友链
|
||||
*
|
||||
@@ -11,7 +9,7 @@ import java.io.Serializable;
|
||||
* @date : 2019/05/12 11:33
|
||||
*/
|
||||
@Data
|
||||
public class PartnerSite implements Serializable {
|
||||
public class PartnerSite {
|
||||
|
||||
private Long id;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import cn.celess.common.constant.ResponseEnum;
|
||||
import cn.celess.blog.enmu.ResponseEnum;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Data;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -1,15 +1,13 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/03/28 22:19
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
public class Tag extends TagCategory implements Serializable {
|
||||
public class Tag extends TagCategory {
|
||||
|
||||
public Tag(String name) {
|
||||
super.setName(name);
|
||||
@@ -1,16 +1,14 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: 小海
|
||||
* @Date: 2020-05-24 14:03
|
||||
* @Desc:
|
||||
*/
|
||||
@Data
|
||||
public class TagCategory implements Serializable {
|
||||
public class TagCategory {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -13,7 +12,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class User implements Serializable {
|
||||
public class User {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -1,8 +1,7 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -10,7 +9,7 @@ import java.util.Date;
|
||||
* @date : 2019/04/02 22:14
|
||||
*/
|
||||
@Data
|
||||
public class Visitor implements Serializable {
|
||||
public class Visitor {
|
||||
|
||||
private long id;
|
||||
private String ip;
|
||||
@@ -1,8 +1,7 @@
|
||||
package cn.celess.common.entity;
|
||||
package cn.celess.blog.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -10,7 +9,7 @@ import java.util.Date;
|
||||
* @date : 2019/05/12 11:29
|
||||
*/
|
||||
@Data
|
||||
public class WebUpdate implements Serializable {
|
||||
public class WebUpdate {
|
||||
|
||||
private long id;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import cn.celess.common.entity.Tag;
|
||||
import cn.celess.blog.entity.Tag;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -13,7 +12,7 @@ import java.util.List;
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class ArticleModel implements Serializable {
|
||||
public class ArticleModel {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,7 @@ import java.util.List;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CategoryModel implements Serializable {
|
||||
public class CategoryModel {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
@@ -1,9 +1,8 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -12,7 +11,7 @@ import java.util.List;
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class CommentModel implements Serializable {
|
||||
public class CommentModel {
|
||||
private long id;
|
||||
|
||||
private UserModel fromUser;
|
||||
@@ -1,11 +1,10 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -16,7 +15,7 @@ import java.util.List;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PageData<T> implements Serializable {
|
||||
public class PageData<T> {
|
||||
|
||||
private List<T> list;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/04/21 22:43
|
||||
*/
|
||||
public class QiniuResponse implements Serializable {
|
||||
public class QiniuResponse {
|
||||
public String key;
|
||||
public String hash;
|
||||
public String bucket;
|
||||
@@ -1,10 +1,9 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,7 @@ import java.util.List;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TagModel implements Serializable {
|
||||
public class TagModel {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
@@ -1,18 +1,16 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import cn.celess.common.constant.UserAccountStatusEnum;
|
||||
import cn.celess.blog.enmu.UserAccountStatusEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/04/22 23:13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserModel implements Serializable {
|
||||
public class UserModel {
|
||||
|
||||
private Long id;
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/05/05 16:05
|
||||
*/
|
||||
@Data
|
||||
public class VisitorModel implements Serializable {
|
||||
public class VisitorModel {
|
||||
private long id;
|
||||
|
||||
private String ip;
|
||||
@@ -1,17 +1,15 @@
|
||||
package cn.celess.common.entity.vo;
|
||||
package cn.celess.blog.entity.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author : xiaohai
|
||||
* @date : 2019/05/12 11:32
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class WebUpdateModel implements Serializable {
|
||||
public class WebUpdateModel {
|
||||
private long id;
|
||||
|
||||
private String info;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user