【7.4.0】更新@data注解

pull/54/MERGE
fengshuonan 2023-04-08 14:22:40 +08:00
parent f44bf21046
commit 110dd2e233
1094 changed files with 2845 additions and 2845 deletions

View File

@ -30,7 +30,7 @@ import java.lang.annotation.*;
*
*
* @author fengshuonan
* @date 2022/1/12 20:48
* @since 2022/1/12 20:48
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)

View File

@ -32,7 +32,7 @@ import java.lang.annotation.*;
*
*
* @author fengshuonan
* @date 2020/12/9 15:59
* @since 2020/12/9 15:59
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)

View File

@ -33,7 +33,7 @@ import java.lang.annotation.*;
* jsonSexEnum.M -> "男""M" -> "
*
* @author fengshuonan
* @date 2022/9/6 11:34
* @since 2022/9/6 11:34
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)

View File

@ -33,7 +33,7 @@ import java.lang.annotation.*;
* jsonidid ->
*
* @author fengshuonan
* @date 2022/9/6 11:34
* @since 2022/9/6 11:34
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)

View File

@ -31,7 +31,7 @@ package cn.stylefeng.roses.kernel.rule.base;
* valueString
*
* @author fengshuonan
* @date 2022/9/6 11:27
* @since 2022/9/6 11:27
*/
public interface ReadableEnum<T> {
@ -42,7 +42,7 @@ public interface ReadableEnum<T> {
*
* @return keyid
* @author fengshuonan
* @date 2022/9/6 11:29
* @since 2022/9/6 11:29
*/
Object getKey();
@ -53,7 +53,7 @@ public interface ReadableEnum<T> {
*
* @return value
* @author fengshuonan
* @date 2022/9/6 11:30
* @since 2022/9/6 11:30
*/
Object getName();
@ -63,7 +63,7 @@ public interface ReadableEnum<T> {
* @param originValue
* @return T
* @author fengshuonan
* @date 2022/9/24 15:17
* @since 2022/9/24 15:17
*/
T parseToEnum(String originValue);

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.base;
* json
*
* @author fengshuonan
* @date 2022/9/6 11:54
* @since 2022/9/6 11:54
*/
public interface SimpleFieldFormatProcess {
@ -14,7 +14,7 @@ public interface SimpleFieldFormatProcess {
* @param originValue
* @return true
* @author fengshuonan
* @date 2022/9/6 13:16
* @since 2022/9/6 13:16
*/
boolean canFormat(Object originValue);
@ -24,7 +24,7 @@ public interface SimpleFieldFormatProcess {
* @param originValue
* @return
* @author fengshuonan
* @date 2022/9/6 13:28
* @since 2022/9/6 13:28
*/
Object formatProcess(Object originValue);

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.callback;
*
*
* @author fengshuonan
* @date 2022/10/22 21:35
* @since 2022/10/22 21:35
*/
public interface ConfigUpdateCallback {
@ -14,7 +14,7 @@ public interface ConfigUpdateCallback {
* @param code SYS_SERVER_DEPLOY_HOST
* @param value
* @author fengshuonan
* @date 2022/10/22 21:36
* @since 2022/10/22 21:36
*/
void configUpdate(String code, String value);

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.rule.constants;
*
*
* @author fengshuonan
* @date 2020/10/16 11:25
* @since 2020/10/16 11:25
*/
public interface RuleConstants {

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.rule.constants;
*
*
* @author fengshuonan
* @date 2021/2/8 11:59
* @since 2021/2/8 11:59
*/
public interface SymbolConstant {

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.constants;
*
*
* @author fengshuonan
* @date 2021/9/24 17:20
* @since 2021/9/24 17:20
*/
public interface TenantConstants {

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.rule.constants;
*
*
* @author fengshuonan
* @date 2020/10/15 15:50
* @since 2020/10/15 15:50
*/
public interface TreeConstants {

View File

@ -9,7 +9,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
* 使 ConfigInitListener
*
* @author fengshuonan
* @date 2021/2/26 18:27
* @since 2021/2/26 18:27
*/
@Getter
public class ApplicationPropertiesContext {

View File

@ -8,7 +8,7 @@ import lombok.Getter;
* mapping.xml
*
* @author stylefeng
* @date 2020/6/20 21:08
* @since 2020/6/20 21:08
*/
@Getter
public enum DbTypeEnum {
@ -63,7 +63,7 @@ public enum DbTypeEnum {
* url
*
* @author fengshuonan
* @date 2022/8/23 14:22
* @since 2022/8/23 14:22
*/
public static String getTypeByUrl(String url) {
if (url == null) {

View File

@ -30,7 +30,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2022/1/13 16:37
* @since 2022/1/13 16:37
*/
@Getter
public enum FieldTypeEnum {

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.enums;
*
*
* @author fengshuonan
* @date 2022/9/6 11:48
* @since 2022/9/6 11:48
*/
public enum FormatTypeEnum {

View File

@ -37,7 +37,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2022/9/28 11:15
* @since 2022/9/28 11:15
*/
@Getter
public enum ResBizTypeEnum implements ReadableEnum<ResBizTypeEnum> {

View File

@ -35,7 +35,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2020/10/17 10:01
* @since 2020/10/17 10:01
*/
@Getter
public enum SexEnum implements ReadableEnum<SexEnum> {
@ -65,7 +65,7 @@ public enum SexEnum implements ReadableEnum<SexEnum> {
* code
*
* @author fengshuonan
* @date 2020/10/29 18:59
* @since 2020/10/29 18:59
*/
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static SexEnum codeToEnum(String code) {
@ -83,7 +83,7 @@ public enum SexEnum implements ReadableEnum<SexEnum> {
*
*
* @author fengshuonan
* @date 2021/1/11 22:34
* @since 2021/1/11 22:34
*/
public static String codeToMessage(String code) {
if (null != code) {

View File

@ -7,7 +7,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2022/6/29 14:11
* @since 2022/6/29 14:11
*/
@Getter
public enum SortByEnum {

View File

@ -36,7 +36,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2020/10/14 21:31
* @since 2020/10/14 21:31
*/
@Getter
public enum StatusEnum implements ReadableEnum<StatusEnum> {
@ -66,7 +66,7 @@ public enum StatusEnum implements ReadableEnum<StatusEnum> {
* code
*
* @author fengshuonan
* @date 2020/10/29 18:59
* @since 2020/10/29 18:59
*/
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static StatusEnum codeToEnum(Integer code) {

View File

@ -30,7 +30,7 @@ import lombok.Getter;
*
*
* @author liuhanqing
* @date 2021/1/15 13:36
* @since 2021/1/15 13:36
*/
@Getter
public enum TreeNodeEnum {
@ -58,7 +58,7 @@ public enum TreeNodeEnum {
* code
*
* @author liuhanqing
* @date 2021/1/15 13:36
* @since 2021/1/15 13:36
*/
public static TreeNodeEnum codeToEnum(String code) {
if (null != code) {
@ -75,7 +75,7 @@ public enum TreeNodeEnum {
*
*
* @author liuhanqing
* @date 2021/1/15 13:36
* @since 2021/1/15 13:36
*/
public static String codeToName(String code) {
if (null != code) {

View File

@ -36,7 +36,7 @@ import lombok.Getter;
* del_flagchar(1)YN
*
* @author fengshuonan
* @date 2020/4/13 22:59
* @since 2020/4/13 22:59
*/
@Getter
public enum YesOrNotEnum implements ReadableEnum<YesOrNotEnum> {
@ -75,7 +75,7 @@ public enum YesOrNotEnum implements ReadableEnum<YesOrNotEnum> {
* code
*
* @author fengshuonan
* @date 2022/9/7 17:58
* @since 2022/9/7 17:58
*/
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static YesOrNotEnum codeToEnum(Boolean boolFlag) {

View File

@ -32,7 +32,7 @@ package cn.stylefeng.roses.kernel.rule.exception;
* ServiceException
*
* @author fengshuonan
* @date 2020/10/14 21:41
* @since 2020/10/14 21:41
*/
public interface AbstractExceptionEnum {
@ -41,7 +41,7 @@ public interface AbstractExceptionEnum {
*
* @return
* @author fengshuonan
* @date 2020/10/14 21:42
* @since 2020/10/14 21:42
*/
String getErrorCode();
@ -50,7 +50,7 @@ public interface AbstractExceptionEnum {
*
* @return
* @author fengshuonan
* @date 2020/10/14 21:42
* @since 2020/10/14 21:42
*/
String getUserTip();

View File

@ -44,7 +44,7 @@ import static cn.stylefeng.roses.kernel.rule.constants.RuleConstants.RULE_MODULE
* RPC
*
* @author fengshuonan
* @date 2020/10/15 9:07
* @since 2020/10/15 9:07
*/
@Data
@EqualsAndHashCode(callSuper = true)

View File

@ -34,7 +34,7 @@ import static cn.stylefeng.roses.kernel.rule.constants.RuleConstants.FIRST_LEVEL
*
*
* @author fengshuonan
* @date 2020/10/15 17:18
* @since 2020/10/15 17:18
*/
@Getter
public enum DefaultBusinessExceptionEnum implements AbstractExceptionEnum {

View File

@ -34,7 +34,7 @@ import static cn.stylefeng.roses.kernel.rule.constants.RuleConstants.THIRD_ERROR
* CDN
*
* @author fengshuonan
* @date 2020/10/15 17:31
* @since 2020/10/15 17:31
*/
@Getter
public enum DefaultThirdExceptionEnum implements AbstractExceptionEnum {

View File

@ -34,7 +34,7 @@ import static cn.stylefeng.roses.kernel.rule.constants.RuleConstants.USER_OPERAT
*
*
* @author fengshuonan
* @date 2020/10/15 17:31
* @since 2020/10/15 17:31
*/
@Getter
public enum DefaultUserExceptionEnum implements AbstractExceptionEnum {

View File

@ -34,7 +34,7 @@ import static cn.stylefeng.roses.kernel.rule.constants.RuleConstants.RULE_EXCEPT
* servlet
*
* @author fengshuonan
* @date 2020/10/15 17:39
* @since 2020/10/15 17:39
*/
@Getter
public enum ServletExceptionEnum implements AbstractExceptionEnum {

View File

@ -14,7 +14,7 @@ import java.util.List;
* id
*
* @author fengshuonan
* @date 2022/9/7 11:50
* @since 2022/9/7 11:50
*/
public abstract class BaseSimpleFieldFormatProcess implements SimpleFieldFormatProcess {
@ -61,7 +61,7 @@ public abstract class BaseSimpleFieldFormatProcess implements SimpleFieldFormatP
*
*
* @author fengshuonan
* @date 2022/9/7 11:52
* @since 2022/9/7 11:52
*/
public abstract Class<?> getItemClass();
@ -73,7 +73,7 @@ public abstract class BaseSimpleFieldFormatProcess implements SimpleFieldFormatP
* @param businessId id
* @return
* @author fengshuonan
* @date 2022/9/7 12:58
* @since 2022/9/7 12:58
*/
public abstract Object simpleItemFormat(Object businessId);

View File

@ -35,7 +35,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
* application ready
*
* @author fengshuonan
* @date 2021/5/14 20:28
* @since 2021/5/14 20:28
*/
@Slf4j
public abstract class ApplicationReadyListener implements ApplicationListener<ApplicationReadyEvent> {
@ -57,7 +57,7 @@ public abstract class ApplicationReadyListener implements ApplicationListener<Ap
*
*
* @author fengshuonan
* @date 2021/5/14 20:17
* @since 2021/5/14 20:17
*/
public abstract void eventCallback(ApplicationReadyEvent event);

View File

@ -35,7 +35,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
* application
*
* @author fengshuonan
* @date 2021/5/14 20:28
* @since 2021/5/14 20:28
*/
@Slf4j
public abstract class ApplicationStartedListener implements ApplicationListener<ApplicationStartedEvent> {
@ -57,7 +57,7 @@ public abstract class ApplicationStartedListener implements ApplicationListener<
*
*
* @author fengshuonan
* @date 2021/5/14 20:17
* @since 2021/5/14 20:17
*/
public abstract void eventCallback(ApplicationStartedEvent event);

View File

@ -35,7 +35,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
* context
*
* @author fengshuonan
* @date 2021/5/14 20:28
* @since 2021/5/14 20:28
*/
@Slf4j
public abstract class ContextInitializedListener implements ApplicationListener<ApplicationContextInitializedEvent> {
@ -57,7 +57,7 @@ public abstract class ContextInitializedListener implements ApplicationListener<
*
*
* @author fengshuonan
* @date 2021/5/14 20:17
* @since 2021/5/14 20:17
*/
public abstract void eventCallback(ApplicationContextInitializedEvent event);

View File

@ -37,7 +37,7 @@ import lombok.Data;
* id
*
* @author fengshuonan
* @date 2020/11/21 16:53
* @since 2020/11/21 16:53
*/
@Data
public class SimpleDict {

View File

@ -35,7 +35,7 @@ import java.util.Map;
*
*
* @author fengshuonan
* @date 2020/10/14 18:12
* @since 2020/10/14 18:12
*/
@Data
public class BaseRequest implements Serializable {

View File

@ -39,7 +39,7 @@ import java.util.Date;
* <p>
*
* @author yxx
* @date 2023/03/28 18:08
* @since 2023/03/28 18:08
*/
@Data
public class BaseResponse implements Serializable {

View File

@ -31,7 +31,7 @@ import lombok.EqualsAndHashCode;
*
*
* @author fengshuonan
* @date 2020/10/16 16:26
* @since 2020/10/16 16:26
*/
@EqualsAndHashCode(callSuper = true)
@Data

View File

@ -31,7 +31,7 @@ import lombok.Data;
* http
*
* @author fengshuonan
* @date 2020/10/17 17:33
* @since 2020/10/17 17:33
*/
@Data
public class ResponseData<T> {

View File

@ -30,7 +30,7 @@ import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
*
*
* @author fengshuonan
* @date 2020/10/16 16:23
* @since 2020/10/16 16:23
*/
public class SuccessResponseData<T> extends ResponseData<T> {

View File

@ -6,7 +6,7 @@ package cn.stylefeng.roses.kernel.rule.tenant;
* 使使
*
* @author fengshuonan
* @date 2022/11/8 0:58
* @since 2022/11/8 0:58
*/
public class OnceTenantCodeHolder {
@ -16,7 +16,7 @@ public class OnceTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static void setTenantCode(String aesKey) {
CONTEXT_HOLDER.set(aesKey);
@ -26,7 +26,7 @@ public class OnceTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static String getTenantCode() {
return CONTEXT_HOLDER.get();
@ -36,7 +36,7 @@ public class OnceTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static void clearTenantCode() {
CONTEXT_HOLDER.remove();

View File

@ -6,7 +6,7 @@ package cn.stylefeng.roses.kernel.rule.tenant;
* HttpContextLoginUser使
*
* @author fengshuonan
* @date 2022/11/8 0:58
* @since 2022/11/8 0:58
*/
public class RequestTenantCodeHolder {
@ -16,7 +16,7 @@ public class RequestTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static void setTenantCode(String aesKey) {
CONTEXT_HOLDER.set(aesKey);
@ -26,7 +26,7 @@ public class RequestTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static String getTenantCode() {
return CONTEXT_HOLDER.get();
@ -36,7 +36,7 @@ public class RequestTenantCodeHolder {
*
*
* @author fengshuonan
* @date 2022/11/8 0:59
* @since 2022/11/8 0:59
*/
public static void clearTenantCode() {
CONTEXT_HOLDER.remove();

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.tenant;
*
*
* @author fengshuonan
* @date 2022/11/7 20:16
* @since 2022/11/7 20:16
*/
public interface TenantPrefixApi {
@ -12,7 +12,7 @@ public interface TenantPrefixApi {
*
*
* @author fengshuonan
* @date 2022/11/7 20:29
* @since 2022/11/7 20:29
*/
String getTenantPrefix();

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.rule.threadlocal;
* 便ThreadLocal
*
* @author fengshuonan
* @date 2021/10/29 11:14
* @since 2021/10/29 11:14
*/
public interface RemoveThreadLocalApi {
@ -12,7 +12,7 @@ public interface RemoveThreadLocalApi {
* ThreadLocal
*
* @author fengshuonan
* @date 2021/10/29 11:19
* @since 2021/10/29 11:19
*/
void removeThreadLocalAction();

View File

@ -35,7 +35,7 @@ import java.util.List;
*
*
* @author fengshuonan
* @date 2018/7/25 5:59
* @since 2018/7/25 5:59
*/
@Data
public class DefaultTreeBuildFactory<T extends AbstractTreeNode> implements AbstractTreeBuildFactory<T> {

View File

@ -30,7 +30,7 @@ import java.util.List;
* tree
*
* @author fengshuonan
* @date 2018/7/25 5:59
* @since 2018/7/25 5:59
*/
public interface AbstractTreeBuildFactory<T> {
@ -40,7 +40,7 @@ public interface AbstractTreeBuildFactory<T> {
* @param nodes
* @return
* @author fengshuonan
* @date 2018/7/26 9:45
* @since 2018/7/26 9:45
*/
List<T> doTreeBuild(List<T> nodes);

View File

@ -30,7 +30,7 @@ import java.util.List;
*
*
* @author fengshuonan
* @date 2020/10/15 14:31
* @since 2020/10/15 14:31
*/
public interface AbstractTreeNode<T> {
@ -39,7 +39,7 @@ public interface AbstractTreeNode<T> {
*
* @return id
* @author fengshuonan
* @date 2020/10/15 15:28
* @since 2020/10/15 15:28
*/
String getNodeId();
@ -48,7 +48,7 @@ public interface AbstractTreeNode<T> {
*
* @return id
* @author fengshuonan
* @date 2020/10/15 15:28
* @since 2020/10/15 15:28
*/
String getNodeParentId();
@ -57,7 +57,7 @@ public interface AbstractTreeNode<T> {
*
* @param childrenNodes
* @author fengshuonan
* @date 2020/10/15 15:28
* @since 2020/10/15 15:28
*/
void setChildrenNodes(List<T> childrenNodes);

View File

@ -36,7 +36,7 @@ import java.util.List;
* id-1
*
* @author fengshuonan
* @date 2020/10/15 14:39
* @since 2020/10/15 14:39
*/
@Data
public class DefaultTreeNode implements AbstractTreeNode<DefaultTreeNode> {

View File

@ -33,7 +33,7 @@ import java.util.List;
* xm-select
*
* @author fengshuonan
* @date 2021/1/31 19:02
* @since 2021/1/31 19:02
*/
@Data
public class DefaultXmSelectNode implements AbstractXmSelectNode {

View File

@ -30,7 +30,7 @@ import java.util.List;
* xm-select
*
* @author fengshuonan
* @date 2021/1/31 18:30
* @since 2021/1/31 18:30
*/
public interface AbstractXmSelectNode {
@ -38,7 +38,7 @@ public interface AbstractXmSelectNode {
*
*
* @author fengshuonan
* @date 2021/1/31 18:30
* @since 2021/1/31 18:30
*/
String getName();
@ -46,7 +46,7 @@ public interface AbstractXmSelectNode {
* ,
*
* @author fengshuonan
* @date 2021/1/31 18:30
* @since 2021/1/31 18:30
*/
String getValue();
@ -54,7 +54,7 @@ public interface AbstractXmSelectNode {
*
*
* @author fengshuonan
* @date 2021/1/31 18:31
* @since 2021/1/31 18:31
*/
Boolean getSelected();
@ -62,7 +62,7 @@ public interface AbstractXmSelectNode {
*
*
* @author fengshuonan
* @date 2021/1/31 18:31
* @since 2021/1/31 18:31
*/
Boolean getDisabled();
@ -70,7 +70,7 @@ public interface AbstractXmSelectNode {
*
*
* @author fengshuonan
* @date 2021/1/31 18:33
* @since 2021/1/31 18:33
*/
List<?> getChildren();

View File

@ -38,7 +38,7 @@ import java.util.List;
* jquery zTree
*
* @author fengshuonan
* @date 2021/1/6 21:47
* @since 2021/1/6 21:47
*/
@ToString
@EqualsAndHashCode
@ -102,7 +102,7 @@ public class ZTreeNode implements AbstractTreeNode<ZTreeNode> {
* ztree
*
* @author fengshuonan
* @date 2021/1/6 21:47
* @since 2021/1/6 21:47
*/
public static ZTreeNode createParent() {
ZTreeNode zTreeNode = new ZTreeNode();

View File

@ -33,7 +33,7 @@ import java.util.List;
* ant
*
* @author fengshuonan
* @date 2020/12/15 22:31
* @since 2020/12/15 22:31
*/
@Slf4j
public class AntPathMatcherUtil {
@ -44,7 +44,7 @@ public class AntPathMatcherUtil {
* @param requestURI url
* @param antPatterns ant
* @author fengshuonan
* @date 2020/12/15 22:31
* @since 2020/12/15 22:31
*/
public static Boolean getAntMatchFLag(String requestURI, String contextPath, List<String> antPatterns) {
AntPathMatcher antPathMatcher = new AntPathMatcher();

View File

@ -35,7 +35,7 @@ import java.lang.reflect.Field;
*
*
* @author fengshuonan
* @date 2020/10/19 16:20
* @since 2020/10/19 16:20
*/
@Slf4j
public class AopTargetUtils {
@ -44,7 +44,7 @@ public class AopTargetUtils {
*
*
* @author fengshuonan
* @date 2020/10/19 16:21
* @since 2020/10/19 16:21
*/
public static Object getTarget(Object proxy) {
@ -70,7 +70,7 @@ public class AopTargetUtils {
* cglib
*
* @author fengshuonan
* @date 2020/10/19 16:21
* @since 2020/10/19 16:21
*/
private static Object getCglibProxyTargetObject(Object proxy) throws Exception {
Field h = proxy.getClass().getDeclaredField("CGLIB$CALLBACK_0");
@ -85,7 +85,7 @@ public class AopTargetUtils {
* jdk
*
* @author fengshuonan
* @date 2020/10/19 16:22
* @since 2020/10/19 16:22
*/
private static Object getJdkDynamicProxyTargetObject(Object proxy) throws Exception {
Field h = proxy.getClass().getSuperclass().getDeclaredField("h");

View File

@ -17,7 +17,7 @@ import java.util.Map;
*
*
* @author fengshuonan
* @date 2022/1/14 16:42
* @since 2022/1/14 16:42
*/
@Slf4j
public class ClassTypeUtil {
@ -31,7 +31,7 @@ public class ClassTypeUtil {
*
*
* @author fengshuonan
* @date 2022/1/13 17:49
* @since 2022/1/13 17:49
*/
public static boolean ensureEntityFlag(Class<?> clazz) {
for (String packageName : entityScanPackage) {
@ -46,7 +46,7 @@ public class ClassTypeUtil {
*
*
* @author fengshuonan
* @date 2022/1/14 0:25
* @since 2022/1/14 0:25
*/
public static FieldTypeEnum getClassFieldType(Type type) {

View File

@ -31,7 +31,7 @@ import cn.stylefeng.roses.kernel.rule.enums.DbTypeEnum;
*
*
* @author fengshuonan
* @date 2021/3/27 21:24
* @since 2021/3/27 21:24
*/
public class DatabaseTypeUtil {
@ -39,7 +39,7 @@ public class DatabaseTypeUtil {
*
*
* @author fengshuonan
* @date 2021/3/27 21:25
* @since 2021/3/27 21:25
*/
public static DbTypeEnum getDbType(String jdbcUrl) {
if (StrUtil.isEmpty(jdbcUrl)) {

View File

@ -7,7 +7,7 @@ import java.util.regex.Pattern;
*
*
* @author fengshuonan
* @date 2022/8/2 15:04
* @since 2022/8/2 15:04
*/
public class DateRegexUtil {
@ -15,7 +15,7 @@ public class DateRegexUtil {
*
*
* @author fengshuonan
* @date 2022/8/2 15:04
* @since 2022/8/2 15:04
*/
public static String extractDate(String originStr) {

View File

@ -9,7 +9,7 @@ import java.sql.DriverManager;
*
*
* @author fengshuonan
* @date 2022/9/15 11:50
* @since 2022/9/15 11:50
*/
public class DbConnectionUtil {
@ -17,7 +17,7 @@ public class DbConnectionUtil {
* 5
*
* @author fengshuonan
* @date 2022/9/15 11:49
* @since 2022/9/15 11:49
*/
public static boolean getValidFlag(String className, String url, String account, String password) {
return getValidFlag(className, url, account, password, 5);
@ -27,7 +27,7 @@ public class DbConnectionUtil {
*
*
* @author fengshuonan
* @date 2022/9/15 11:49
* @since 2022/9/15 11:49
*/
public static boolean getValidFlag(String className, String url, String account, String password, Integer timeoutSeconds) {
Connection connection = null;

View File

@ -32,7 +32,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.ErrorResponseData;
*
*
* @author fengshuonan
* @date 2020/12/16 16:03
* @since 2020/12/16 16:03
*/
public class ExceptionUtil {
@ -43,7 +43,7 @@ public class ExceptionUtil {
* @param packageName
* @return
* @author fengshuonan
* @date 2020/12/16 16:04
* @since 2020/12/16 16:04
*/
public static String getFirstStackTraceByPackageName(Throwable throwable, String packageName) {
@ -77,7 +77,7 @@ public class ExceptionUtil {
* ErrorResponseData
*
* @author fengshuonan
* @date 2020/12/16 16:09
* @since 2020/12/16 16:09
*/
public static void fillErrorResponseData(ErrorResponseData errorResponseData, Throwable throwable, String projectPackage) {
if (errorResponseData == null || throwable == null) {

View File

@ -8,7 +8,7 @@ import cn.hutool.core.util.StrUtil;
* Gunsguns$
*
* @author fengshuonan
* @date 2022/11/16 23:07
* @since 2022/11/16 23:07
*/
public class GunsResourceCodeUtil {
@ -25,7 +25,7 @@ public class GunsResourceCodeUtil {
* {newAppCode}$sys_notice$add
*
* @author fengshuonan
* @date 2022/11/16 23:09
* @since 2022/11/16 23:09
*/
public static String replace(String resourceCode, String newAppCode) {

View File

@ -46,7 +46,7 @@ import java.util.List;
* HttpHttpServletRequestHttpServletResponse
*
* @author fengshuonan
* @date 2020/10/15 17:38
* @since 2020/10/15 17:38
*/
@Slf4j
public class HttpServletUtil {
@ -75,7 +75,7 @@ public class HttpServletUtil {
* request
*
* @author fengshuonan
* @date 2020/10/15 17:48
* @since 2020/10/15 17:48
*/
public static HttpServletRequest getRequest() {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
@ -90,7 +90,7 @@ public class HttpServletUtil {
* response
*
* @author fengshuonan
* @date 2020/10/15 17:48
* @since 2020/10/15 17:48
*/
public static HttpServletResponse getResponse() {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
@ -107,7 +107,7 @@ public class HttpServletUtil {
* ipv6127.0.0.1
*
* @author fengshuonan
* @date 2020/10/26 14:09
* @since 2020/10/26 14:09
*/
public static String getRequestClientIp(HttpServletRequest request) {
if (ObjectUtil.isEmpty(request)) {
@ -125,7 +125,7 @@ public class HttpServletUtil {
* @param ipGeoApi ipapi
* @param ipGeoAppCode ipappCode
* @author fengshuonan
* @date 2020/10/26 14:10
* @since 2020/10/26 14:10
*/
@SuppressWarnings("unchecked")
public static String calcClientIpAddress(HttpServletRequest request, String ipGeoApi, String ipGeoAppCode) {
@ -172,7 +172,7 @@ public class HttpServletUtil {
* headernull
*
* @author fengshuonan
* @date 2020/10/28 9:14
* @since 2020/10/28 9:14
*/
public static UserAgent getUserAgent(HttpServletRequest request) {
@ -194,7 +194,7 @@ public class HttpServletUtil {
*
* @return ture-
* @author fengshuonan
* @date 2021/2/22 22:37
* @since 2021/2/22 22:37
*/
public static Boolean getNormalRequestFlag(HttpServletRequest request) {
return request.getHeader("Accept") == null || request.getHeader("Accept").toLowerCase().contains("text/html");
@ -207,7 +207,7 @@ public class HttpServletUtil {
*
* @return ture-json
* @author fengshuonan
* @date 2021/2/22 22:37
* @since 2021/2/22 22:37
*/
public static Boolean getJsonRequestFlag(HttpServletRequest request) {
return request.getHeader("Accept") == null || request.getHeader("Accept").toLowerCase().contains("application/json");

View File

@ -31,7 +31,7 @@ import java.net.UnknownHostException;
* IP
*
* @author fengshuonan
* @date 2021/1/10 14:25
* @since 2021/1/10 14:25
*/
public class IpInfoUtils {
@ -39,7 +39,7 @@ public class IpInfoUtils {
* hostname
*
* @author fengshuonan
* @date 2021/1/10 18:40
* @since 2021/1/10 18:40
*/
public static String getHostName() {
try {

View File

@ -11,7 +11,7 @@ import java.util.List;
*
*
* @author fengshuonan
* @date 2021/3/21 20:24
* @since 2021/3/21 20:24
*/
public class LicenseTitleAppenderUtil {
@ -19,7 +19,7 @@ public class LicenseTitleAppenderUtil {
*
*
* @author fengshuonan
* @date 2021/3/21 20:25
* @since 2021/3/21 20:25
*/
public static void append(String codeDirectory, String licenseHeader) {
List<File> files = FileUtil.loopFiles(codeDirectory);

View File

@ -11,7 +11,7 @@ import java.util.stream.Collectors;
* mac
*
* @author fengshuonan
* @date 2020/11/13 12:59
* @since 2020/11/13 12:59
*/
public class MacAddressUtil {
@ -21,7 +21,7 @@ public class MacAddressUtil {
*
*
* @author fengshuonan
* @date 2020/11/13 13:00
* @since 2020/11/13 13:00
*/
public static List<String> getMacList() throws Exception {
java.util.Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces();

View File

@ -8,7 +8,7 @@ import java.util.Collection;
*
*
* @author fengshuonan
* @date 2022/9/7 10:24
* @since 2022/9/7 10:24
*/
public class MixFieldTypeUtil {
@ -16,7 +16,7 @@ public class MixFieldTypeUtil {
* fieldValueLongList<Long>Long[]true
*
* @author fengshuonan
* @date 2022/9/7 10:24
* @since 2022/9/7 10:24
*/
public static boolean whetherAssignClass(Object fieldValue, Class<?> clazz) {

View File

@ -18,7 +18,7 @@ import java.util.List;
* 2. jar
*
* @author fengshuonan
* @date 2022/9/30 21:31
* @since 2022/9/30 21:31
*/
@Getter
@Setter
@ -80,7 +80,7 @@ public class MvnDeployUtil {
* pompackagingpom
*
* @author fengshuonan
* @date 2022/9/30 21:45
* @since 2022/9/30 21:45
*/
public static boolean packagingIsPomFlag(File pom) {
BufferedReader reader = null;
@ -104,7 +104,7 @@ public class MvnDeployUtil {
*
*
* @author fengshuonan
* @date 2022/9/30 21:49
* @since 2022/9/30 21:49
*/
private void getAllDirs(String fileDir) {
@ -129,7 +129,7 @@ public class MvnDeployUtil {
* pomjarpom
*
* @author fengshuonan
* @date 2022/9/30 21:49
* @since 2022/9/30 21:49
*/
private DirectoryType getDirectoryType(File directoryPath) {
boolean pom = false;
@ -161,7 +161,7 @@ public class MvnDeployUtil {
* pommvn deploy
*
* @author fengshuonan
* @date 2022/9/30 21:55
* @since 2022/9/30 21:55
*/
private void doOnlyPom(File directory) {
@ -186,7 +186,7 @@ public class MvnDeployUtil {
* jarpommvn deploy
*
* @author fengshuonan
* @date 2022/9/30 21:58
* @since 2022/9/30 21:58
*/
private void doJarAndPom(File directory) {
@ -215,7 +215,7 @@ public class MvnDeployUtil {
*
*
* @author fengshuonan
* @date 2022/9/30 21:58
* @since 2022/9/30 21:58
*/
public void beginDeploy() {
@ -239,7 +239,7 @@ public class MvnDeployUtil {
* mvn
*
* @author fengshuonan
* @date 2022/9/30 21:54
* @since 2022/9/30 21:54
*/
private void executeCommand(String command) {
try {
@ -255,7 +255,7 @@ public class MvnDeployUtil {
* mvn deploy command
*
* @author fengshuonan
* @date 2022/9/30 21:52
* @since 2022/9/30 21:52
*/
private String buildCommand(FileType fileType, File deployJar, File deployJarPom) {
@ -304,7 +304,7 @@ public class MvnDeployUtil {
* jar
*
* @author fengshuonan
* @date 2022/9/30 21:33
* @since 2022/9/30 21:33
*/
private enum DirectoryType {
/**
@ -327,7 +327,7 @@ public class MvnDeployUtil {
* mvn
*
* @author fengshuonan
* @date 2022/9/30 21:34
* @since 2022/9/30 21:34
*/
private enum FileType {

View File

@ -6,7 +6,7 @@ import java.lang.reflect.Array;
*
*
* @author fengshuonan
* @date 2022/9/7 11:06
* @since 2022/9/7 11:06
*/
public class ObjectConvertUtil {
@ -14,7 +14,7 @@ public class ObjectConvertUtil {
* Objectarrayobject
*
* @author fengshuonan
* @date 2020/7/24 22:06
* @since 2020/7/24 22:06
*/
public static Object[] objToArray(Object object) {
int length = Array.getLength(object);

View File

@ -30,7 +30,7 @@ import lombok.extern.slf4j.Slf4j;
*
*
* @author fengshuonan
* @date 2021/5/18 10:41
* @since 2021/5/18 10:41
*/
@Slf4j
public class ProjectUtil {
@ -47,7 +47,7 @@ public class ProjectUtil {
*
* @return true-false-
* @author fengshuonan
* @date 2021/5/18 10:42
* @since 2021/5/18 10:42
*/
public static Boolean getSeparationFlag() {
if (SEPARATION_FLAG != null) {

View File

@ -12,7 +12,7 @@ import java.util.Map;
* redirect url
*
* @author fengshuonan
* @date 2021/1/22 11:07
* @since 2021/1/22 11:07
*/
@Slf4j
public class RedirectUrlBuildUtil {
@ -25,7 +25,7 @@ public class RedirectUrlBuildUtil {
* @param originUrl url
* @param paramsMap url
* @author fengshuonan
* @date 2021/1/22 11:07
* @since 2021/1/22 11:07
*/
public static String createRedirectUrl(String originUrl, Map<String, ?> paramsMap) {
if (StrUtil.isBlank(originUrl)) {

View File

@ -41,7 +41,7 @@ import java.nio.charset.Charset;
* http
*
* @author fengshuonan
* @date 2020/12/15 21:39
* @since 2020/12/15 21:39
*/
@Slf4j
public class ResponseRenderUtil {
@ -50,7 +50,7 @@ public class ResponseRenderUtil {
* json
*
* @author fengshuonan
* @date 2020/12/15 21:40
* @since 2020/12/15 21:40
*/
public static void renderJsonResponse(HttpServletResponse response, Object responseData) {
response.setCharacterEncoding(CharsetUtil.UTF_8);
@ -67,7 +67,7 @@ public class ResponseRenderUtil {
* json
*
* @author fengshuonan
* @date 2020/12/15 21:40
* @since 2020/12/15 21:40
*/
public static void renderErrorResponse(HttpServletResponse response,
String code, String message, String exceptionClazz) {
@ -87,7 +87,7 @@ public class ResponseRenderUtil {
*
*
* @author fengshuonan
* @date 2021/7/1 15:01
* @since 2021/7/1 15:01
*/
public static void setRenderFileHeader(HttpServletResponse response, String fileName) {
final String charset = ObjectUtil.defaultIfNull(response.getCharacterEncoding(), CharsetUtil.UTF_8);
@ -99,7 +99,7 @@ public class ResponseRenderUtil {
*
*
* @author fengshuonan
* @date 2021/7/1 15:01
* @since 2021/7/1 15:01
*/
public static void setRenderImageHeader(HttpServletResponse response) {
response.setContentType("image/png");

View File

@ -6,7 +6,7 @@ import java.util.regex.Pattern;
*
*
* @author fengshuonan
* @date 2022/9/19 13:37
* @since 2022/9/19 13:37
*/
public class StrFilterUtil {
@ -14,7 +14,7 @@ public class StrFilterUtil {
*
*
* @author fengshuonan
* @date 2022/9/19 13:39
* @since 2022/9/19 13:39
*/
public static String filterFileName(String param) {
Pattern fileNamePattern = Pattern.compile("[\\\\/:*?\"<>|\\s]");

View File

@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
* Token
*
* @author fengshuonan
* @date 2022/8/1 17:41
* @since 2022/8/1 17:41
*/
@Slf4j
public class TokenSignUtil {
@ -43,7 +43,7 @@ public class TokenSignUtil {
* @param timestamp sign
* @param secretKey
* @author fengshuonan
* @date 2022/8/1 17:43
* @since 2022/8/1 17:43
*/
public static String createSignStr(Long timestamp, String secretKey) {
if (ObjectUtil.isEmpty(timestamp) || ObjectUtil.isEmpty(secretKey)) {
@ -61,7 +61,7 @@ public class TokenSignUtil {
* @param signStr
* @param expiredSeconds
* @author fengshuonan
* @date 2022/8/1 17:48
* @since 2022/8/1 17:48
*/
public static boolean validateSignStr(Long timestamp, String secretKey, String signStr, Integer expiredSeconds) {

View File

@ -35,7 +35,7 @@ import cn.stylefeng.roses.kernel.jwt.api.pojo.payload.DefaultJwtPayload;
* 退token
*
* @author fengshuonan
* @date 2020/10/26 14:41
* @since 2020/10/26 14:41
*/
public interface AuthServiceApi {
@ -45,7 +45,7 @@ public interface AuthServiceApi {
* @param loginRequest
* @return token jwt token
* @author fengshuonan
* @date 2020/10/26 14:41
* @since 2020/10/26 14:41
*/
LoginResponse login(LoginRequest loginRequest);
@ -54,7 +54,7 @@ public interface AuthServiceApi {
*
* @param username
* @author fengshuonan
* @date 2020/10/26 14:40
* @since 2020/10/26 14:40
*/
LoginResponse loginWithUserName(String username);
@ -64,7 +64,7 @@ public interface AuthServiceApi {
* @param username
* @param caToken sso
* @author fengshuonan
* @date 2021/5/25 22:44
* @since 2021/5/25 22:44
*/
LoginResponse loginWithUserNameAndCaToken(String username, String caToken);
@ -73,7 +73,7 @@ public interface AuthServiceApi {
*
* @param loginWithTokenRequest
* @author fengshuonan
* @date 2021/5/25 22:44
* @since 2021/5/25 22:44
*/
LoginResponse LoginWithToken(LoginWithTokenRequest loginWithTokenRequest);
@ -81,7 +81,7 @@ public interface AuthServiceApi {
* 退
*
* @author fengshuonan
* @date 2020/10/19 14:16
* @since 2020/10/19 14:16
*/
void logout();
@ -90,7 +90,7 @@ public interface AuthServiceApi {
*
* @param token token
* @author fengshuonan
* @date 2020/10/19 14:16
* @since 2020/10/19 14:16
*/
void logoutWithToken(String token);
@ -103,7 +103,7 @@ public interface AuthServiceApi {
* @return token
* @throws AuthException token
* @author fengshuonan
* @date 2020/10/19 14:16
* @since 2020/10/19 14:16
*/
DefaultJwtPayload validateToken(String token) throws AuthException;
@ -113,7 +113,7 @@ public interface AuthServiceApi {
* @param token token
* @param requestUrl url
* @author fengshuonan
* @date 2020/10/22 16:03
* @since 2020/10/22 16:03
*/
void checkAuth(String token, String requestUrl);
@ -121,7 +121,7 @@ public interface AuthServiceApi {
*
*
* @author xixiaowei
* @date 2022/1/22 16:37
* @since 2022/1/22 16:37
*/
void cancelFreeze(LoginRequest loginRequest);
@ -132,7 +132,7 @@ public interface AuthServiceApi {
* @param defaultJwtPayload jwtpayload
* @return
* @author fengshuonan
* @date 2022/10/17 0:04
* @since 2022/10/17 0:04
*/
LoginUser createNewLoginInfo(String token, DefaultJwtPayload defaultJwtPayload);

View File

@ -31,7 +31,7 @@ import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
*
*
* @author fengshuonan
* @date 2020/10/17 10:27
* @since 2020/10/17 10:27
*/
public interface LoginUserApi {
@ -42,7 +42,7 @@ public interface LoginUserApi {
*
* @return tokennull
* @author fengshuonan
* @date 2020/10/17 11:05
* @since 2020/10/17 11:05
*/
String getToken();
@ -54,7 +54,7 @@ public interface LoginUserApi {
* @return
* @throws AuthException
* @author fengshuonan
* @date 2020/10/17 10:27
* @since 2020/10/17 10:27
*/
LoginUser getLoginUser() throws AuthException;
@ -65,7 +65,7 @@ public interface LoginUserApi {
*
* @return
* @author fengshuonan
* @date 2020/10/17 11:00
* @since 2020/10/17 11:00
*/
LoginUser getLoginUserNullable();
@ -74,7 +74,7 @@ public interface LoginUserApi {
*
* @return true-false-
* @author fengshuonan
* @date 2020/11/4 15:45
* @since 2020/11/4 15:45
*/
boolean getSuperAdminFlag();
@ -83,7 +83,7 @@ public interface LoginUserApi {
*
* @return truefalse
* @author fengshuonan
* @date 2020/10/17 11:02
* @since 2020/10/17 11:02
*/
boolean hasLogin();
@ -93,7 +93,7 @@ public interface LoginUserApi {
* @param buttonCode
* @return true-false-
* @author fengshuonan
* @date 2021/1/9 11:32
* @since 2021/1/9 11:32
*/
boolean haveButton(String buttonCode);

View File

@ -30,7 +30,7 @@ import cn.stylefeng.roses.kernel.auth.api.exception.AuthException;
*
*
* @author fengshuonan
* @date 2020/10/19 14:24
* @since 2020/10/19 14:24
*/
public interface PermissionServiceApi {
@ -43,7 +43,7 @@ public interface PermissionServiceApi {
* @param requestUrl url
* @throws AuthException
* @author fengshuonan
* @date 2020/10/19 14:50
* @since 2020/10/19 14:50
*/
void checkPermission(String token, String requestUrl) throws AuthException;

View File

@ -36,7 +36,7 @@ import java.util.List;
* 访
*
* @author fengshuonan
* @date 2020/10/19 16:47
* @since 2020/10/19 16:47
*/
public interface SessionManagerApi {
@ -46,7 +46,7 @@ public interface SessionManagerApi {
* @param token token
* @param loginUser
* @author fengshuonan
* @date 2020/10/19 16:47
* @since 2020/10/19 16:47
*/
void createSession(String token, LoginUser loginUser, Boolean createCookie);
@ -56,7 +56,7 @@ public interface SessionManagerApi {
* @param token token
* @param loginUser
* @author fengshuonan
* @date 2021/1/9 10:43
* @since 2021/1/9 10:43
*/
void updateSession(String token, LoginUser loginUser);
@ -66,7 +66,7 @@ public interface SessionManagerApi {
* @param token token
* @return token
* @author fengshuonan
* @date 2020/10/19 16:48
* @since 2020/10/19 16:48
*/
LoginUser getSession(String token);
@ -75,7 +75,7 @@ public interface SessionManagerApi {
*
* @param token token
* @author fengshuonan
* @date 2020/10/19 16:48
* @since 2020/10/19 16:48
*/
void removeSession(String token);
@ -86,7 +86,7 @@ public interface SessionManagerApi {
*
* @param token token
* @author fengshuonan
* @date 2020/10/21 16:18
* @since 2020/10/21 16:18
*/
void removeSessionExcludeToken(String token);
@ -96,7 +96,7 @@ public interface SessionManagerApi {
* @param token token
* @return true-false-
* @author fengshuonan
* @date 2020/10/19 16:49
* @since 2020/10/19 16:49
*/
boolean haveSession(String token);
@ -105,7 +105,7 @@ public interface SessionManagerApi {
*
* @param token token
* @author fengshuonan
* @date 2020/10/19 16:50
* @since 2020/10/19 16:50
*/
void refreshSession(String token);
@ -115,7 +115,7 @@ public interface SessionManagerApi {
*
*
* @author fengshuonan
* @date 2021/1/2 20:25
* @since 2021/1/2 20:25
*/
void destroySessionCookie();
@ -123,7 +123,7 @@ public interface SessionManagerApi {
* 线
*
* @author peihongwei
* @date 2021/1/9 10:41
* @since 2021/1/9 10:41
*/
List<LoginUser> onlineUserList();

View File

@ -30,7 +30,7 @@ import cn.stylefeng.roses.kernel.auth.api.pojo.sso.SsoLoginCodeRequest;
* api
*
* @author fengshuonan
* @date 2022/5/16 16:53
* @since 2022/5/16 16:53
*/
public interface SsoServerApi {
@ -40,7 +40,7 @@ public interface SsoServerApi {
* @param ssoLoginCodeRequest
* @return ssoLoginCode
* @author fengshuonan
* @date 2021/1/27 17:26
* @since 2021/1/27 17:26
*/
String createSsoLoginCode(SsoLoginCodeRequest ssoLoginCodeRequest);

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.auth.api;
*
*
* @author fengshuonan
* @date 2022/3/26 14:05
* @since 2022/3/26 14:05
*/
public interface TempSecretApi {
@ -36,7 +36,7 @@ public interface TempSecretApi {
*
*
* @author fengshuonan
* @date 2022/3/26 14:07
* @since 2022/3/26 14:07
*/
String getUserTempSecretKey(Long userId);

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.auth.api.constants;
* auth
*
* @author fengshuonan
* @date 2020/10/16 11:05
* @since 2020/10/16 11:05
*/
public interface AuthConstants {

View File

@ -4,7 +4,7 @@ package cn.stylefeng.roses.kernel.auth.api.constants;
*
*
* @author xixiaowei
* @date 2022/1/22 17:37
* @since 2022/1/22 17:37
*/
public interface LoginCacheConstants {

View File

@ -31,7 +31,7 @@ import cn.stylefeng.roses.kernel.auth.api.LoginUserApi;
* Spring
*
* @author fengshuonan
* @date 2020/10/17 10:30
* @since 2020/10/17 10:30
*/
public class LoginContext {

View File

@ -6,7 +6,7 @@ import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
*
*
* @author fengshuonan
* @date 2021/3/23 17:38
* @since 2021/3/23 17:38
*/
public class LoginUserHolder {
@ -16,7 +16,7 @@ public class LoginUserHolder {
* set holder
*
* @author fengshuonan
* @date 2021/3/23 17:41
* @since 2021/3/23 17:41
*/
public static void set(LoginUser abstractLoginUser) {
LONGIN_USER_HOLDER.set(abstractLoginUser);
@ -26,7 +26,7 @@ public class LoginUserHolder {
* holder
*
* @author fengshuonan
* @date 2021/3/23 17:41
* @since 2021/3/23 17:41
*/
public static LoginUser get() {
return LONGIN_USER_HOLDER.get();
@ -36,7 +36,7 @@ public class LoginUserHolder {
*
*
* @author fengshuonan
* @date 2021/3/23 17:42
* @since 2021/3/23 17:42
*/
public static void remove() {
LONGIN_USER_HOLDER.remove();

View File

@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
* ThreadLocalHolder
*
* @author fengshuonan
* @date 2021/10/29 11:41
* @since 2021/10/29 11:41
*/
@Component
public class LoginUserRemoveThreadLocalHolder implements RemoveThreadLocalApi {

View File

@ -32,7 +32,7 @@ import javax.servlet.http.Cookie;
*
*
* @author fengshuonan
* @date 2020/12/27 13:28
* @since 2020/12/27 13:28
*/
public abstract class SessionCookieCreator {
@ -45,7 +45,7 @@ public abstract class SessionCookieCreator {
* @param cookieValue cookie
* @param sessionExpiredSeconds cookie
* @author fengshuonan
* @date 2020/12/27 13:29
* @since 2020/12/27 13:29
*/
public Cookie createCookie(String cookieName, String cookieValue, Integer sessionExpiredSeconds) {
Cookie cookie = new Cookie(cookieName, cookieValue);
@ -58,7 +58,7 @@ public abstract class SessionCookieCreator {
* cookie
*
* @author fengshuonan
* @date 2020/12/27 13:41
* @since 2020/12/27 13:41
*/
public abstract void expandCookieProp(Cookie cookie);

View File

@ -33,7 +33,7 @@ import static cn.stylefeng.roses.kernel.auth.api.exception.enums.AuthExceptionEn
*
*
* @author fengshuonan
* @date 2020/11/5 15:22
* @since 2020/11/5 15:22
*/
@Getter
public enum DataScopeTypeEnum {
@ -76,7 +76,7 @@ public enum DataScopeTypeEnum {
* code
*
* @author fengshuonan
* @date 2020/10/29 18:59
* @since 2020/10/29 18:59
*/
public static DataScopeTypeEnum codeToEnum(Integer code) {
if (null != code) {

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.auth.api.enums;
*
*
* @author fengshuonan
* @date 2022/5/16 16:48
* @since 2022/5/16 16:48
*/
public enum SsoClientTypeEnum {

View File

@ -33,7 +33,7 @@ import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
*
*
* @author fengshuonan
* @date 2020/10/15 15:59
* @since 2020/10/15 15:59
*/
public class AuthException extends ServiceException {

View File

@ -33,7 +33,7 @@ import lombok.Getter;
*
*
* @author fengshuonan
* @date 2020/10/16 10:53
* @since 2020/10/16 10:53
*/
@Getter
public enum AuthExceptionEnum implements AbstractExceptionEnum {

View File

@ -37,7 +37,7 @@ import static cn.stylefeng.roses.kernel.auth.api.constants.AuthConstants.*;
*
*
* @author fengshuonan
* @date 2020/10/17 16:10
* @since 2020/10/17 16:10
*/
public class AuthConfigExpander {
@ -45,7 +45,7 @@ public class AuthConfigExpander {
* url
*
* @author fengshuonan
* @date 2020/10/17 16:12
* @since 2020/10/17 16:12
*/
public static List<String> getNoneSecurityConfig() {
String noneSecurityUrls = ConfigContext.me().getSysConfigValueWithDefault("SYS_NONE_SECURITY_URLS", String.class, "");
@ -60,7 +60,7 @@ public class AuthConfigExpander {
* authjwt
*
* @author fengshuonan
* @date 2021/1/2 18:52
* @since 2021/1/2 18:52
*/
public static String getAuthJwtSecret() {
String sysJwtSecret = ConfigContext.me().getConfigValueNullable("SYS_AUTH_JWT_SECRET", String.class);
@ -81,7 +81,7 @@ public class AuthConfigExpander {
* 7
*
* @author fengshuonan
* @date 2021/1/2 18:53
* @since 2021/1/2 18:53
*/
public static Long getAuthJwtTimeoutSeconds() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_JWT_TIMEOUT_SECONDS", Long.class, DEFAULT_AUTH_JWT_TIMEOUT_SECONDS);
@ -95,7 +95,7 @@ public class AuthConfigExpander {
* sessionsession
*
* @author fengshuonan
* @date 2020/10/20 9:32
* @since 2020/10/20 9:32
*/
public static Long getSessionExpiredSeconds() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SESSION_EXPIRED_SECONDS", Long.class, 3600L);
@ -108,7 +108,7 @@ public class AuthConfigExpander {
*
* @return true-false-
* @author fengshuonan
* @date 2020/10/21 14:31
* @since 2020/10/21 14:31
*/
public static boolean getSingleAccountLoginFlag() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SINGLE_ACCOUNT_LOGIN_FLAG", Boolean.class, false);
@ -118,7 +118,7 @@ public class AuthConfigExpander {
* tokenheader
*
* @author fengshuonan
* @date 2020/10/22 14:11
* @since 2020/10/22 14:11
*/
public static String getAuthTokenHeaderName() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_HEADER_NAME", String.class, DEFAULT_AUTH_HEADER_NAME);
@ -128,7 +128,7 @@ public class AuthConfigExpander {
* tokenparam
*
* @author fengshuonan
* @date 2020/10/22 14:11
* @since 2020/10/22 14:11
*/
public static String getAuthTokenParamName() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_PARAM_NAME", String.class, DEFAULT_AUTH_PARAM_NAME);
@ -138,7 +138,7 @@ public class AuthConfigExpander {
* cookiecookename
*
* @author fengshuonan
* @date 2020/12/27 13:18
* @since 2020/12/27 13:18
*/
public static String getSessionCookieName() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_SESSION_COOKIE_NAME", String.class, DEFAULT_AUTH_HEADER_NAME);
@ -148,7 +148,7 @@ public class AuthConfigExpander {
* jwtssotoken
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoJwtSecret() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_JWT_SECRET", String.class, SYS_AUTH_SSO_JWT_SECRET);
@ -158,7 +158,7 @@ public class AuthConfigExpander {
* sso
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoDataDecryptSecret() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_DECRYPT_DATA_SECRET", String.class, SYS_AUTH_SSO_DECRYPT_DATA_SECRET);
@ -169,7 +169,7 @@ public class AuthConfigExpander {
*
* @return true-false-
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static Boolean getSsoSessionValidateSwitch() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_SESSION_VALIDATE_SWITCH", Boolean.class, SYS_AUTH_SSO_SESSION_VALIDATE_SWITCH);
@ -179,7 +179,7 @@ public class AuthConfigExpander {
* ssoredishost
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoSessionValidateRedisHost() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_HOST", String.class, SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_HOST);
@ -189,7 +189,7 @@ public class AuthConfigExpander {
* ssoredis
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static Integer getSsoSessionValidateRedisPort() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_PORT", Integer.class, SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_PORT);
@ -199,7 +199,7 @@ public class AuthConfigExpander {
* ssoredis
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoSessionValidateRedisPassword() {
return ConfigContext.me().getConfigValueNullable("SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_PASSWORD", String.class);
@ -209,7 +209,7 @@ public class AuthConfigExpander {
* ssoredisdb
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static Integer getSsoSessionValidateRedisDbIndex() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_DB_INDEX", Integer.class, SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_DB_INDEX);
@ -219,7 +219,7 @@ public class AuthConfigExpander {
* ssoredis
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoSessionValidateRedisCachePrefix() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_CACHE_PREFIX", String.class, SYS_AUTH_SSO_SESSION_VALIDATE_REDIS_CACHE_PREFIX);
@ -229,7 +229,7 @@ public class AuthConfigExpander {
* SSO
*
* @author fengshuonan
* @date 2021/5/25 22:39
* @since 2021/5/25 22:39
*/
public static String getSsoUrl() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_SSO_HOST", String.class, SYS_AUTH_SSO_HOST);
@ -241,7 +241,7 @@ public class AuthConfigExpander {
*
*
* @author fengshuonan
* @date 2022/10/16 23:28
* @since 2022/10/16 23:28
*/
public static Boolean getPasswordRsaValidateFlag() {
return ConfigContext.me().getSysConfigValueWithDefault("SYS_AUTH_PASSWORD_RSA_VALIDATE", Boolean.class, false);

View File

@ -6,7 +6,7 @@ import cn.stylefeng.roses.kernel.config.api.context.ConfigContext;
*
*
* @author xixiaowei
* @date 2022/1/24 15:47
* @since 2022/1/24 15:47
*/
public class LoginConfigExpander {
@ -14,7 +14,7 @@ public class LoginConfigExpander {
*
*
* @author xixiaowei
* @date 2022/1/24 15:48
* @since 2022/1/24 15:48
*/
public static boolean getAccountErrorDetectionFlag() {
return ConfigContext.me().getSysConfigValueWithDefault("ACCOUNT_ERROR_DETECTION", Boolean.class, false);

View File

@ -13,7 +13,7 @@ import javax.servlet.http.HttpServletRequest;
*
*
* @author fengshuonan
* @date 2021/9/28 17:46
* @since 2021/9/28 17:46
*/
public class CommonLoginUserUtil {
@ -21,7 +21,7 @@ public class CommonLoginUserUtil {
* Token
*
* @author fengshuonan
* @date 2021/9/28 17:46
* @since 2021/9/28 17:46
*/
public static String getToken() {

View File

@ -36,7 +36,7 @@ import org.springframework.web.bind.annotation.RequestParam;
* 使
*
* @author fengshuonan
* @date 2021/9/29 10:08
* @since 2021/9/29 10:08
*/
public interface LoginUserRemoteApi {
@ -44,7 +44,7 @@ public interface LoginUserRemoteApi {
* token
*
* @author fengshuonan
* @date 2021/9/29 10:08
* @since 2021/9/29 10:08
*/
@RequestMapping(value = "/loginUserRemote/getLoginUserByToken", method = RequestMethod.POST)
LoginUser getLoginUserByToken(@RequestBody LoginUserRequest loginUserRequest);
@ -53,7 +53,7 @@ public interface LoginUserRemoteApi {
* token
*
* @author fengshuonan
* @date 2021/9/29 11:39
* @since 2021/9/29 11:39
*/
@RequestMapping(value = "/loginUserRemote/haveSession", method = RequestMethod.GET)
SessionValidateResponse haveSession(@RequestParam("token") String token);
@ -62,7 +62,7 @@ public interface LoginUserRemoteApi {
* loginUserLoginUser
*
* @author fengshuonan
* @date 2021/9/29 11:39
* @since 2021/9/29 11:39
*/
@RequestMapping(value = "/loginUserRemote/getEffectiveLoginUser", method = RequestMethod.POST)
LoginUser getEffectiveLoginUser(@RequestBody LoginUser loginUser);

View File

@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
*
*
* @author fengshuonan
* @date 2021/9/29 11:25
* @since 2021/9/29 11:25
*/
@Data
@AllArgsConstructor

View File

@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
* Session
*
* @author fengshuonan
* @date 2021/9/29 11:37
* @since 2021/9/29 11:37
*/
@Data
@AllArgsConstructor

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.auth.api.password;
* api
*
* @author fengshuonan
* @date 2020/12/21 16:50
* @since 2020/12/21 16:50
*/
public interface PasswordStoredEncryptApi {
@ -38,7 +38,7 @@ public interface PasswordStoredEncryptApi {
* @param originPassword
* @return
* @author fengshuonan
* @date 2020/12/21 16:52
* @since 2020/12/21 16:52
*/
String encrypt(String originPassword);
@ -48,7 +48,7 @@ public interface PasswordStoredEncryptApi {
* @param encryptBefore
* @return true-false-
* @author fengshuonan
* @date 2020/12/21 17:09
* @since 2020/12/21 17:09
*/
Boolean checkPassword(String encryptBefore, String encryptAfter);

View File

@ -28,7 +28,7 @@ package cn.stylefeng.roses.kernel.auth.api.password;
* api
*
* @author fengshuonan
* @date 2020/12/21 16:50
* @since 2020/12/21 16:50
*/
public interface PasswordTransferEncryptApi {
@ -38,7 +38,7 @@ public interface PasswordTransferEncryptApi {
* @param originPassword
* @return
* @author fengshuonan
* @date 2020/12/21 16:52
* @since 2020/12/21 16:52
*/
String encrypt(String originPassword);
@ -48,7 +48,7 @@ public interface PasswordTransferEncryptApi {
* @param encryptedPassword
* @return
* @author fengshuonan
* @date 2020/12/21 16:51
* @since 2020/12/21 16:51
*/
String decrypt(String encryptedPassword);

View File

@ -35,7 +35,7 @@ import javax.validation.constraints.NotBlank;
*
*
* @author fengshuonan
* @date 2020/10/19 14:02
* @since 2020/10/19 14:02
*/
@EqualsAndHashCode(callSuper = true)
@Data

View File

@ -33,7 +33,7 @@ import lombok.Data;
*
*
* @author fengshuonan
* @date 2020/10/19 14:17
* @since 2020/10/19 14:17
*/
@Data
public class LoginResponse {
@ -72,7 +72,7 @@ public class LoginResponse {
*
*
* @author fengshuonan
* @date 2021/5/25 22:31
* @since 2021/5/25 22:31
*/
public LoginResponse(LoginUser loginUser, String token, Long expireAt) {
this.loginUser = uselessFilter(loginUser);
@ -84,7 +84,7 @@ public class LoginResponse {
* loginCode
*
* @author fengshuonan
* @date 2021/5/25 22:31
* @since 2021/5/25 22:31
*/
public LoginResponse(String loginCode) {
this.ssoLogin = true;
@ -95,7 +95,7 @@ public class LoginResponse {
*
*
* @author fengshuonan
* @date 2021/7/13 11:23
* @since 2021/7/13 11:23
*/
private LoginUser uselessFilter(LoginUser loginUser) {
LoginUser tempUser = new LoginUser();

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotBlank;
* token
*
* @author fengshuonan
* @date 2021/5/25 22:43
* @since 2021/5/25 22:43
*/
@EqualsAndHashCode(callSuper = true)
@Data

View File

@ -31,7 +31,7 @@ import lombok.Data;
* RSA
*
* @author fengshuonan
* @date 2022/10/16 15:28
* @since 2022/10/16 15:28
*/
@Data
public class PwdRsaSecretProperties {

View File

@ -42,7 +42,7 @@ import java.util.*;
*
*
* @author fengshuonan
* @date 2020/10/17 9:58
* @since 2020/10/17 9:58
*/
@Data
public class LoginUser implements Serializable {

View File

@ -30,7 +30,7 @@ import lombok.Data;
*
*
* @author fengshuonan
* @date 2020/12/26 18:14
* @since 2020/12/26 18:14
*/
@Data
public class SimpleRoleInfo {

View File

@ -33,7 +33,7 @@ import java.util.Date;
*
*
* @author fengshuonan
* @date 2020/12/26 18:14
* @since 2020/12/26 18:14
*/
@Data
public class SimpleUserInfo {

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotBlank;
* ssoLoginCode
*
* @author fengshuonan
* @date 2021/1/27 16:55
* @since 2021/1/27 16:55
*/
@EqualsAndHashCode(callSuper = true)
@Data

Some files were not shown because too many files have changed in this diff Show More