Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不是太高的手
SPTools
提交
ab0f19d0
S
SPTools
项目概览
不是太高的手
/
SPTools
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SPTools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ab0f19d0
编写于
5月 22, 2020
作者:
小
小柒2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
一个能够让程序猿快速开发的炒鸡工具箱
上级
77a4efd9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
9 deletion
+17
-9
src/main/java/com/tools/Application.java
src/main/java/com/tools/Application.java
+2
-1
src/main/java/com/tools/common/exception/RrExceptionHandler.java
...n/java/com/tools/common/exception/RrExceptionHandler.java
+7
-0
src/main/resources/templates/index.html
src/main/resources/templates/index.html
+5
-5
src/main/resources/templates/login.html
src/main/resources/templates/login.html
+3
-3
未找到文件。
src/main/java/com/tools/Application.java
浏览文件 @
ab0f19d0
...
...
@@ -12,6 +12,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动类
* 爪哇笔记:https://blog.52itstyle.vip
* 演示地址:https://tools.cloudbed.vip
*/
@SpringBootApplication
@EnableCaching
...
...
@@ -21,7 +22,7 @@ public class Application extends SpringBootServletInitializer {
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
logger
.
info
(
"
爪哇工具箱启动
"
);
logger
.
info
(
"
一个能够让程序猿快速开发的炒鸡工具箱
"
);
}
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
application
)
{
...
...
src/main/java/com/tools/common/exception/RrExceptionHandler.java
浏览文件 @
ab0f19d0
...
...
@@ -4,6 +4,7 @@ import com.tools.common.model.Result;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.dao.InvalidDataAccessResourceUsageException
;
import
org.springframework.validation.BindException
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
...
...
@@ -34,6 +35,12 @@ public class RrExceptionHandler {
return
Result
.
error
(
"数据库中已存在该记录"
);
}
@ExceptionHandler
(
InvalidDataAccessResourceUsageException
.
class
)
public
Result
handleDuplicateKeyException
(
InvalidDataAccessResourceUsageException
e
){
logger
.
error
(
e
.
getMessage
(),
e
);
return
Result
.
error
(
"演示环境禁止插插插"
);
}
@ExceptionHandler
(
Exception
.
class
)
public
Result
handleException
(
Exception
e
){
logger
.
error
(
e
.
getMessage
(),
e
);
...
...
src/main/resources/templates/index.html
浏览文件 @
ab0f19d0
...
...
@@ -3,10 +3,10 @@
xmlns:shiro=
"http://www.pollix.at/thymeleaf/shiro"
>
<head>
<meta
charset=
"utf-8"
>
<title>
爪哇工具箱
-后台管理
</title>
<title>
SPTools极速开发框架
-后台管理
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"keywords"
content=
"
爪哇工具箱
-后台管理"
>
<meta
name=
"description"
content=
"
爪哇工具箱
-后台管理"
>
<meta
name=
"keywords"
content=
"
SPTools极速开发框架
-后台管理"
>
<meta
name=
"description"
content=
"
SPTools极速开发框架
-后台管理"
>
<link
rel=
"shortcut icon"
th:href=
"@{/images/favicon.ico}"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
th:href=
"@{/css/okadmin.css}"
>
<link
rel=
"stylesheet"
th:href=
"@{/css/okadmin.theme.css}"
>
...
...
@@ -70,7 +70,7 @@
<!--左侧导航区域-->
<div
class=
"layui-side layui-side-menu okadmin-bg-20222A ok-left"
>
<div
class=
"layui-side-scroll okadmin-side"
>
<div
class=
"okadmin-logo"
>
爪哇工具箱
v1.0
</div>
<div
class=
"okadmin-logo"
>
SPTools
v1.0
</div>
<div
class=
"user-photo"
>
<a
class=
"img"
title=
"我的头像"
>
<img
src=
"images/avatar.png"
class=
"userAvatar"
>
...
...
@@ -123,7 +123,7 @@
<!--底部信息-->
<div
class=
"layui-footer okadmin-text-center"
>
Copyright ©2019-©2020
爪哇工具箱
v1.0.1 All Rights Reserved
Copyright ©2019-©2020
SPTools
v1.0.1 All Rights Reserved
<button
class=
"layui-btn layui-btn-danger layui-btn-xs donate"
>
捐赠作者
</button>
<button
class=
"layui-btn layui-btn-danger layui-btn-xs communication"
>
QQ群交流
</button>
</div>
...
...
src/main/resources/templates/login.html
浏览文件 @
ab0f19d0
...
...
@@ -2,10 +2,10 @@
<html
lang=
"en"
class=
"page-fill"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
爪哇工具箱
- 登录
</title>
<title>
SPTools极速开发框架
- 登录
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<meta
name=
"keywords"
content=
"
爪哇工具箱
"
>
<meta
name=
"description"
content=
"
爪哇工具箱
"
>
<meta
name=
"keywords"
content=
"
SpringBoot极速开发框架
"
>
<meta
name=
"description"
content=
"
SpringBoot极速开发框架
"
>
<link
rel=
"shortcut icon"
th:href=
"@{/images/favicon.ico}"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
th:href=
"@{/css/oksub.css}"
/>
</head>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录