Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 98e47754
authored
Oct 18, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷新关闭数据不新增bug修复
1 parent
d2dd2979
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
src/main/resources/application-dev.properties
src/main/java/com/subsidy/common/interceptor/AuthenticationInterceptor.java
View file @
98e4775
...
...
@@ -60,14 +60,14 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
HandlerMethod
handlerMethod
=
(
HandlerMethod
)
handler
;
Method
method
=
handlerMethod
.
getMethod
();
TimeRequired
timeRequired
=
method
.
getAnnotation
(
TimeRequired
.
class
);
if
(
timeRequired
!=
null
){
Calendar
calendar
=
Calendar
.
getInstance
();
int
hour
=
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
);
if
(
hour
<
6
){
throw
new
HttpException
(
17001
);
}
}
//
TimeRequired timeRequired = method.getAnnotation(TimeRequired.class);
//
if (timeRequired !=null){
//
Calendar calendar = Calendar.getInstance();
//
int hour = calendar.get(Calendar.HOUR_OF_DAY);
//
if (hour<6){
//
throw new HttpException(17001);
//
}
//
}
LoginRequired
methodAnnotation
=
method
.
getAnnotation
(
LoginRequired
.
class
);
if
(
methodAnnotation
!=
null
)
{
...
...
src/main/resources/application-dev.properties
View file @
98e4775
# 本地环境配置
spring.server.port
=
234
57
spring.server.port
=
234
62
# 数据源配置
spring.datasource.url
=
jdbc:mysql://116.62.57.92:3306/subsidy_
test
?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:mysql://116.62.57.92:3306/subsidy_
online
?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.type
=
com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-
name
=
com.mysql.cj.jdbc.Driver
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment