Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_ad_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
maliang
lwby_ad_data
Commits
88aebd82
Commit
88aebd82
authored
Apr 18, 2020
by
maliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
data
parent
5a6e867f
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
33 additions
and
31 deletions
+33
-31
SecurityApplication.java
...in/java/com/boot/security/server/SecurityApplication.java
+1
-1
ExceptionHandlerAdvice.java
...m/boot/security/server/advice/ExceptionHandlerAdvice.java
+1
-1
奇趣源码官方微信.jpg
src/main/java/com/boot/security/server/advice/奇趣源码官方微信.jpg
+0
-0
AsycTaskExecutorConfig.java
...m/boot/security/server/config/AsycTaskExecutorConfig.java
+1
-1
DruidConfig.java
...ain/java/com/boot/security/server/config/DruidConfig.java
+1
-1
RedisConfig.java
...ain/java/com/boot/security/server/config/RedisConfig.java
+1
-1
SecurityConfig.java
.../java/com/boot/security/server/config/SecurityConfig.java
+5
-3
SecurityHandlerConfig.java
...om/boot/security/server/config/SecurityHandlerConfig.java
+1
-1
SwaggerConfig.java
...n/java/com/boot/security/server/config/SwaggerConfig.java
+1
-1
GenerateController.java
...m/boot/security/server/controller/GenerateController.java
+1
-1
PermissionController.java
...boot/security/server/controller/PermissionController.java
+1
-1
RoleController.java
...a/com/boot/security/server/controller/RoleController.java
+1
-1
UserController.java
...a/com/boot/security/server/controller/UserController.java
+1
-1
Token.java
src/main/java/com/boot/security/server/dto/Token.java
+1
-1
TokenFilter.java
...ain/java/com/boot/security/server/filter/TokenFilter.java
+2
-1
PageTableArgumentResolver.java
...security/server/page/table/PageTableArgumentResolver.java
+1
-1
PageTableHandler.java
...com/boot/security/server/page/table/PageTableHandler.java
+1
-1
PageTableRequest.java
...com/boot/security/server/page/table/PageTableRequest.java
+1
-1
PageTableResponse.java
...om/boot/security/server/page/table/PageTableResponse.java
+1
-1
SysLogService.java
.../java/com/boot/security/server/service/SysLogService.java
+1
-1
TokenService.java
...n/java/com/boot/security/server/service/TokenService.java
+1
-1
TokenServiceDbImpl.java
...boot/security/server/service/impl/TokenServiceDbImpl.java
+1
-1
TokenServiceImpl.java
...m/boot/security/server/service/impl/TokenServiceImpl.java
+1
-1
TokenServiceJWTImpl.java
...oot/security/server/service/impl/TokenServiceJWTImpl.java
+1
-1
UserDetailsServiceImpl.java
.../security/server/service/impl/UserDetailsServiceImpl.java
+1
-1
ExcelUtil.java
src/main/java/com/boot/security/server/utils/ExcelUtil.java
+1
-1
FileUtil.java
src/main/java/com/boot/security/server/utils/FileUtil.java
+1
-1
SpringUtil.java
src/main/java/com/boot/security/server/utils/SpringUtil.java
+1
-1
StrUtil.java
src/main/java/com/boot/security/server/utils/StrUtil.java
+1
-1
.gitignore
src/main/resources/.gitignore
+0
-1
No files found.
src/main/java/com/boot/security/server/SecurityApplication.java
View file @
88aebd82
...
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
/**
* 启动类
* 启动类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@SpringBootApplication
@SpringBootApplication
...
...
src/main/java/com/boot/security/server/advice/ExceptionHandlerAdvice.java
View file @
88aebd82
...
@@ -17,7 +17,7 @@ import com.boot.security.server.dto.ResponseInfo;
...
@@ -17,7 +17,7 @@ import com.boot.security.server.dto.ResponseInfo;
/**
/**
* springmvc异常处理
* springmvc异常处理
*
*
* @author
398005446@qq.com
* @author
maliang
*
*
*/
*/
@RestControllerAdvice
@RestControllerAdvice
...
...
src/main/java/com/boot/security/server/advice/奇趣源码官方微信.jpg
deleted
100644 → 0
View file @
5a6e867f
39.7 KB
src/main/java/com/boot/security/server/config/AsycTaskExecutorConfig.java
View file @
88aebd82
...
@@ -9,7 +9,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
...
@@ -9,7 +9,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
/**
/**
* 线程池配置、启用异步
* 线程池配置、启用异步
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月19日
* 2017年8月19日
*/
*/
...
...
src/main/java/com/boot/security/server/config/DruidConfig.java
View file @
88aebd82
...
@@ -56,7 +56,7 @@ public class DruidConfig {
...
@@ -56,7 +56,7 @@ public class DruidConfig {
/**
/**
* 数据源配置
* 数据源配置
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
...
...
src/main/java/com/boot/security/server/config/RedisConfig.java
View file @
88aebd82
...
@@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.GenericToStringSerializer;
...
@@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.GenericToStringSerializer;
* 集群下启动session共享,需打开@EnableRedisHttpSession<br>
* 集群下启动session共享,需打开@EnableRedisHttpSession<br>
* 单机下不需要
* 单机下不需要
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月10日
* 2017年8月10日
*/
*/
...
...
src/main/java/com/boot/security/server/config/SecurityConfig.java
View file @
88aebd82
...
@@ -20,7 +20,7 @@ import com.boot.security.server.filter.TokenFilter;
...
@@ -20,7 +20,7 @@ import com.boot.security.server.filter.TokenFilter;
/**
/**
* spring security配置
* spring security配置
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月16日
* 2017年10月16日
*
*
...
@@ -52,12 +52,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -52,12 +52,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 基于token,所以不需要session
// 基于token,所以不需要session
http
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
http
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
//对这些类型请求直接放开不做拦截
http
.
authorizeRequests
()
http
.
authorizeRequests
()
.
antMatchers
(
"/"
,
"/*.html"
,
"/favicon.ico"
,
"/css/**"
,
"/js/**"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
.
antMatchers
(
"/"
,
"/*.html"
,
"/favicon.ico"
,
"/css/**"
,
"/js/**"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
"/v2/api-docs/**"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/pages/**"
,
"/druid/**"
,
"/v2/api-docs/**"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/pages/**"
,
"/druid/**"
,
"/statics/**"
)
"/statics/**"
)
.
permitAll
().
anyRequest
().
authenticated
();
.
permitAll
().
anyRequest
().
authenticated
();
//对于登录的地址和处理方法
http
.
formLogin
().
loginProcessingUrl
(
"/login"
)
http
.
formLogin
().
loginProcessingUrl
(
"/login"
)
.
successHandler
(
authenticationSuccessHandler
).
failureHandler
(
authenticationFailureHandler
).
and
()
.
successHandler
(
authenticationSuccessHandler
).
failureHandler
(
authenticationFailureHandler
).
and
()
.
exceptionHandling
().
authenticationEntryPoint
(
authenticationEntryPoint
);
.
exceptionHandling
().
authenticationEntryPoint
(
authenticationEntryPoint
);
...
@@ -65,12 +66,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -65,12 +66,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 解决不允许显示在iframe的问题
// 解决不允许显示在iframe的问题
http
.
headers
().
frameOptions
().
disable
();
http
.
headers
().
frameOptions
().
disable
();
http
.
headers
().
cacheControl
();
http
.
headers
().
cacheControl
();
//对请求进行处理(给token续命并且把当前用户保存到security的上下文环境中)
http
.
addFilterBefore
(
tokenFilter
,
UsernamePasswordAuthenticationFilter
.
class
);
http
.
addFilterBefore
(
tokenFilter
,
UsernamePasswordAuthenticationFilter
.
class
);
}
}
@Override
@Override
protected
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
protected
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
//实现UserDetailsService接口,security会调用其中方法创建登陆对象,并且获取对象拥有的权限
auth
.
userDetailsService
(
userDetailsService
).
passwordEncoder
(
bCryptPasswordEncoder
());
auth
.
userDetailsService
(
userDetailsService
).
passwordEncoder
(
bCryptPasswordEncoder
());
}
}
...
...
src/main/java/com/boot/security/server/config/SecurityHandlerConfig.java
View file @
88aebd82
...
@@ -28,7 +28,7 @@ import com.boot.security.server.utils.ResponseUtil;
...
@@ -28,7 +28,7 @@ import com.boot.security.server.utils.ResponseUtil;
/**
/**
* spring security处理器
* spring security处理器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月16日
* 2017年10月16日
*/
*/
...
...
src/main/java/com/boot/security/server/config/SwaggerConfig.java
View file @
88aebd82
...
@@ -17,7 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -17,7 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
/**
* swagger文档
* swagger文档
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年7月21日
* 2017年7月21日
*/
*/
...
...
src/main/java/com/boot/security/server/controller/GenerateController.java
View file @
88aebd82
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 代码生成接口
* 代码生成接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"代码生成"
)
@Api
(
tags
=
"代码生成"
)
...
...
src/main/java/com/boot/security/server/controller/PermissionController.java
View file @
88aebd82
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 权限相关接口
* 权限相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"权限"
)
@Api
(
tags
=
"权限"
)
...
...
src/main/java/com/boot/security/server/controller/RoleController.java
View file @
88aebd82
...
@@ -30,7 +30,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -30,7 +30,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 角色相关接口
* 角色相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"角色"
)
@Api
(
tags
=
"角色"
)
...
...
src/main/java/com/boot/security/server/controller/UserController.java
View file @
88aebd82
...
@@ -33,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -33,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 用户相关接口
* 用户相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"用户"
)
@Api
(
tags
=
"用户"
)
...
...
src/main/java/com/boot/security/server/dto/Token.java
View file @
88aebd82
...
@@ -5,7 +5,7 @@ import java.io.Serializable;
...
@@ -5,7 +5,7 @@ import java.io.Serializable;
/**
/**
* Restful方式登陆token
* Restful方式登陆token
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月4日
* 2017年8月4日
*/
*/
...
...
src/main/java/com/boot/security/server/filter/TokenFilter.java
View file @
88aebd82
...
@@ -21,7 +21,7 @@ import com.boot.security.server.service.TokenService;
...
@@ -21,7 +21,7 @@ import com.boot.security.server.service.TokenService;
/**
/**
* Token过滤器
* Token过滤器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月14日
* 2017年10月14日
*/
*/
...
@@ -36,6 +36,7 @@ public class TokenFilter extends OncePerRequestFilter {
...
@@ -36,6 +36,7 @@ public class TokenFilter extends OncePerRequestFilter {
private
UserDetailsService
userDetailsService
;
private
UserDetailsService
userDetailsService
;
private
static
final
Long
MINUTES_10
=
10
*
60
*
1000L
;
private
static
final
Long
MINUTES_10
=
10
*
60
*
1000L
;
//给token延长时间并且保存登录用户的信息
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableArgumentResolver.java
View file @
88aebd82
...
@@ -19,7 +19,7 @@ import com.google.common.collect.Maps;
...
@@ -19,7 +19,7 @@ import com.google.common.collect.Maps;
/**
/**
* 分页、查询参数解析
* 分页、查询参数解析
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableArgumentResolver
implements
HandlerMethodArgumentResolver
{
public
class
PageTableArgumentResolver
implements
HandlerMethodArgumentResolver
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableHandler.java
View file @
88aebd82
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
/**
/**
* 分页查询处理器
* 分页查询处理器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
...
...
src/main/java/com/boot/security/server/page/table/PageTableRequest.java
View file @
88aebd82
...
@@ -6,7 +6,7 @@ import java.util.Map;
...
@@ -6,7 +6,7 @@ import java.util.Map;
/**
/**
* 分页查询参数
* 分页查询参数
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableRequest
implements
Serializable
{
public
class
PageTableRequest
implements
Serializable
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableResponse.java
View file @
88aebd82
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
/**
/**
* 分页查询返回
* 分页查询返回
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableResponse
implements
Serializable
{
public
class
PageTableResponse
implements
Serializable
{
...
...
src/main/java/com/boot/security/server/service/SysLogService.java
View file @
88aebd82
...
@@ -5,7 +5,7 @@ import com.boot.security.server.model.SysLogs;
...
@@ -5,7 +5,7 @@ import com.boot.security.server.model.SysLogs;
/**
/**
* 日志service
* 日志service
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月19日
* 2017年8月19日
*/
*/
...
...
src/main/java/com/boot/security/server/service/TokenService.java
View file @
88aebd82
...
@@ -11,7 +11,7 @@ import com.boot.security.server.dto.Token;
...
@@ -11,7 +11,7 @@ import com.boot.security.server.dto.Token;
* 如要换成数据库存储,将TokenServiceImpl类上的注解@Primary挪到com.boot.security.server.service.impl.TokenServiceDbImpl
* 如要换成数据库存储,将TokenServiceImpl类上的注解@Primary挪到com.boot.security.server.service.impl.TokenServiceDbImpl
*
*
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月14日
* 2017年10月14日
*/
*/
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceDbImpl.java
View file @
88aebd82
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
/**
/**
* token存到数据库的实现类
* token存到数据库的实现类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Service
@Service
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceImpl.java
View file @
88aebd82
...
@@ -16,7 +16,7 @@ import com.boot.security.server.service.TokenService;
...
@@ -16,7 +16,7 @@ import com.boot.security.server.service.TokenService;
* token存到redis的实现类<br>
* token存到redis的实现类<br>
* 普通token,uuid
* 普通token,uuid
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Deprecated
@Deprecated
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceJWTImpl.java
View file @
88aebd82
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
* token存到redis的实现类<br>
* token存到redis的实现类<br>
* jwt实现的token
* jwt实现的token
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Primary
@Primary
...
...
src/main/java/com/boot/security/server/service/impl/UserDetailsServiceImpl.java
View file @
88aebd82
...
@@ -24,7 +24,7 @@ import com.boot.security.server.service.UserService;
...
@@ -24,7 +24,7 @@ import com.boot.security.server.service.UserService;
* <p>
* <p>
* 密码校验请看文档(02 框架及配置),第三章第4节
* 密码校验请看文档(02 框架及配置),第三章第4节
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*/
*/
@Service
@Service
public
class
UserDetailsServiceImpl
implements
UserDetailsService
{
public
class
UserDetailsServiceImpl
implements
UserDetailsService
{
...
...
src/main/java/com/boot/security/server/utils/ExcelUtil.java
View file @
88aebd82
...
@@ -21,7 +21,7 @@ import org.apache.poi.ss.usermodel.Workbook;
...
@@ -21,7 +21,7 @@ import org.apache.poi.ss.usermodel.Workbook;
/**
/**
* excel工具类
* excel工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
ExcelUtil
{
public
class
ExcelUtil
{
...
...
src/main/java/com/boot/security/server/utils/FileUtil.java
View file @
88aebd82
...
@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
/**
/**
* 文件工具类
* 文件工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
FileUtil
{
public
class
FileUtil
{
...
...
src/main/java/com/boot/security/server/utils/SpringUtil.java
View file @
88aebd82
...
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
...
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
/**
/**
* spring获取bean工具类
* spring获取bean工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Component
@Component
...
...
src/main/java/com/boot/security/server/utils/StrUtil.java
View file @
88aebd82
...
@@ -7,7 +7,7 @@ import com.google.common.collect.Lists;
...
@@ -7,7 +7,7 @@ import com.google.common.collect.Lists;
/**
/**
* 字符串转化工具类
* 字符串转化工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
StrUtil
{
public
class
StrUtil
{
...
...
src/main/resources/.gitignore
deleted
100644 → 0
View file @
5a6e867f
/rebel.xml
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment