添加java-doc

This commit is contained in:
xiongxiaoyang
2020-05-30 11:07:08 +08:00
parent cfb13308e1
commit 792a6a9663
591 changed files with 115119 additions and 27 deletions

View File

@ -9,13 +9,19 @@ import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
/**
* @author 11797
* 基础Controller
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public class BaseController {
protected JwtTokenUtil jwtTokenUtil;
/**
* 获取登陆token
* */
protected String getToken(HttpServletRequest request){
String token = CookieUtil.getCookie(request,"Authorization");
if(token != null){
@ -24,6 +30,9 @@ public class BaseController {
return request.getHeader("Authorization");
}
/**
* 获取登陆用户信息
* */
protected UserDetails getUserDetails(HttpServletRequest request) {
String token = getToken(request);
if(StringUtils.isBlank(token)){

View File

@ -3,7 +3,10 @@ package com.java2nb.novel.common.bean;
import lombok.Data;
/**
* @author 11797
* 登陆用户信息封装
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
@Data
public class UserDetails {

View File

@ -1,7 +1,10 @@
package com.java2nb.novel.common.cache;
/**
* @author 11797
* 缓存key
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public interface CacheKey {

View File

@ -1,7 +1,10 @@
package com.java2nb.novel.common.cache;
/**
* @author 11797
* 缓存服务接口
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public interface CacheService {

View File

@ -10,7 +10,10 @@ import org.springframework.stereotype.Service;
import java.util.concurrent.TimeUnit;
/**
* @author xxy
* Redis缓存服务实现
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
@ConditionalOnProperty(prefix = "spring.redis", name = "host", matchIfMissing = false)
@RequiredArgsConstructor

View File

@ -5,9 +5,11 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* @author 11797
* 响应状态枚举
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
@Getter
@AllArgsConstructor
@NoArgsConstructor

View File

@ -1,8 +1,10 @@
package com.java2nb.novel.common.utils;
/**
* 常量
* @author Administrator
* 常量
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public class Constants {

View File

@ -5,7 +5,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author Administrator
* Cookie操作工具类
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public class CookieUtil {

View File

@ -16,7 +16,10 @@ import java.util.HashMap;
import java.util.Map;
/**
* @author 11797
* JWT工具类
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
@Component
@ConditionalOnProperty(prefix = "jwt", name = "secret")