mirror of https://gitee.com/maxjhandsome/pig
Merge branch 'dev'
This commit is contained in:
commit
411059d525
12
README.md
12
README.md
|
@ -1,16 +1,8 @@
|
|||
<h1 align="center"><font color="red" face="STCAIYUN">需要有Spring Boot和Spring Cloud基础!!</font></h1>
|
||||
<h1 align="center"><font color="red" face="STCAIYUN">需要有Spring Boot和Spring Cloud基础!!</font></h1>
|
||||
<h1 align="center"><font color="red" face="STCAIYUN">需要有Spring Boot和Spring Cloud基础!!</font></h1>
|
||||
|
||||
<br/>
|
||||
<hr />
|
||||
<br/>
|
||||
<br/>
|
||||
<p align="center"><img src="doc/images/logo.jpg"></p>
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/circleci/project/vuejs/vue/dev.svg" alt="Build Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-Edgware-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-1.5.9-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/Spring%20Cloud-EdgwareSR3-blue.svg" alt="Coverage Status">
|
||||
<img src="https://img.shields.io/badge/Spring%20Boot-1.5.12-blue.svg" alt="Downloads">
|
||||
<img src="https://img.shields.io/badge/npm-v5.5.1-blue.svg" alt="Version">
|
||||
<img src="https://img.shields.io/npm/l/vue.svg" alt="License">
|
||||
</p>
|
||||
|
|
|
@ -165,7 +165,7 @@ CREATE TABLE `sys_log_0` (
|
|||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remote_addr` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
|
||||
`user_agent` varchar(255) DEFAULT NULL COMMENT '用户代理',
|
||||
`user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
|
||||
`request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
|
||||
`method` varchar(10) DEFAULT NULL COMMENT '操作方式',
|
||||
`params` text COMMENT '操作提交的数据',
|
||||
|
@ -192,7 +192,7 @@ CREATE TABLE `sys_log_1` (
|
|||
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`remote_addr` varchar(255) DEFAULT NULL COMMENT '操作IP地址',
|
||||
`user_agent` varchar(255) DEFAULT NULL COMMENT '用户代理',
|
||||
`user_agent` varchar(1000) DEFAULT NULL COMMENT '用户代理',
|
||||
`request_uri` varchar(255) DEFAULT NULL COMMENT '请求URI',
|
||||
`method` varchar(10) DEFAULT NULL COMMENT '操作方式',
|
||||
`params` text COMMENT '操作提交的数据',
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
package com.github.pig.gateway.service.impl;
|
||||
|
||||
import com.github.pig.common.vo.UserVO;
|
||||
import com.github.pig.gateway.feign.UserService;
|
||||
import com.github.pig.gateway.util.UserDetailsImpl;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2017/10/26
|
||||
* <p>
|
||||
*/
|
||||
@Service("userDetailService")
|
||||
public class UserDetailServiceImpl implements UserDetailsService, Serializable {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Override
|
||||
public UserDetailsImpl loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||
if (StringUtils.isBlank(username)) {
|
||||
throw new UsernameNotFoundException("用户不存在:" + username);
|
||||
}
|
||||
UserVO userVo = userService.findUserByUsername(username);
|
||||
return new UserDetailsImpl(userVo);
|
||||
}
|
||||
}
|
6
pom.xml
6
pom.xml
|
@ -13,7 +13,7 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.9.RELEASE</version>
|
||||
<version>1.5.12.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<properties>
|
||||
|
@ -21,8 +21,8 @@
|
|||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<pig.version>1.0-BETA</pig.version>
|
||||
<spring-boot.version>1.5.9.RELEASE</spring-boot.version>
|
||||
<spring-cloud.version>Edgware.RELEASE</spring-cloud.version>
|
||||
<spring-boot.version>1.5.12.RELEASE</spring-boot.version>
|
||||
<spring-cloud.version>Edgware.SR3</spring-cloud.version>
|
||||
|
||||
<!--Lombok-->
|
||||
<lombok.version>1.16.20</lombok.version>
|
||||
|
|
Loading…
Reference in New Issue