【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 * @author fengshuonan
* @date 2022/1/12 20:48 * @since 2022/1/12 20:48
*/ */
@Target({ElementType.METHOD, ElementType.TYPE}) @Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
* Token * Token
* *
* @author fengshuonan * @author fengshuonan
* @date 2022/8/1 17:41 * @since 2022/8/1 17:41
*/ */
@Slf4j @Slf4j
public class TokenSignUtil { public class TokenSignUtil {
@ -43,7 +43,7 @@ public class TokenSignUtil {
* @param timestamp sign * @param timestamp sign
* @param secretKey * @param secretKey
* @author fengshuonan * @author fengshuonan
* @date 2022/8/1 17:43 * @since 2022/8/1 17:43
*/ */
public static String createSignStr(Long timestamp, String secretKey) { public static String createSignStr(Long timestamp, String secretKey) {
if (ObjectUtil.isEmpty(timestamp) || ObjectUtil.isEmpty(secretKey)) { if (ObjectUtil.isEmpty(timestamp) || ObjectUtil.isEmpty(secretKey)) {
@ -61,7 +61,7 @@ public class TokenSignUtil {
* @param signStr * @param signStr
* @param expiredSeconds * @param expiredSeconds
* @author fengshuonan * @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) { 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 * 退token
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/10/26 14:41 * @since 2020/10/26 14:41
*/ */
public interface AuthServiceApi { public interface AuthServiceApi {
@ -45,7 +45,7 @@ public interface AuthServiceApi {
* @param loginRequest * @param loginRequest
* @return token jwt token * @return token jwt token
* @author fengshuonan * @author fengshuonan
* @date 2020/10/26 14:41 * @since 2020/10/26 14:41
*/ */
LoginResponse login(LoginRequest loginRequest); LoginResponse login(LoginRequest loginRequest);
@ -54,7 +54,7 @@ public interface AuthServiceApi {
* *
* @param username * @param username
* @author fengshuonan * @author fengshuonan
* @date 2020/10/26 14:40 * @since 2020/10/26 14:40
*/ */
LoginResponse loginWithUserName(String username); LoginResponse loginWithUserName(String username);
@ -64,7 +64,7 @@ public interface AuthServiceApi {
* @param username * @param username
* @param caToken sso * @param caToken sso
* @author fengshuonan * @author fengshuonan
* @date 2021/5/25 22:44 * @since 2021/5/25 22:44
*/ */
LoginResponse loginWithUserNameAndCaToken(String username, String caToken); LoginResponse loginWithUserNameAndCaToken(String username, String caToken);
@ -73,7 +73,7 @@ public interface AuthServiceApi {
* *
* @param loginWithTokenRequest * @param loginWithTokenRequest
* @author fengshuonan * @author fengshuonan
* @date 2021/5/25 22:44 * @since 2021/5/25 22:44
*/ */
LoginResponse LoginWithToken(LoginWithTokenRequest loginWithTokenRequest); LoginResponse LoginWithToken(LoginWithTokenRequest loginWithTokenRequest);
@ -81,7 +81,7 @@ public interface AuthServiceApi {
* 退 * 退
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/10/19 14:16 * @since 2020/10/19 14:16
*/ */
void logout(); void logout();
@ -90,7 +90,7 @@ public interface AuthServiceApi {
* *
* @param token token * @param token token
* @author fengshuonan * @author fengshuonan
* @date 2020/10/19 14:16 * @since 2020/10/19 14:16
*/ */
void logoutWithToken(String token); void logoutWithToken(String token);
@ -103,7 +103,7 @@ public interface AuthServiceApi {
* @return token * @return token
* @throws AuthException token * @throws AuthException token
* @author fengshuonan * @author fengshuonan
* @date 2020/10/19 14:16 * @since 2020/10/19 14:16
*/ */
DefaultJwtPayload validateToken(String token) throws AuthException; DefaultJwtPayload validateToken(String token) throws AuthException;
@ -113,7 +113,7 @@ public interface AuthServiceApi {
* @param token token * @param token token
* @param requestUrl url * @param requestUrl url
* @author fengshuonan * @author fengshuonan
* @date 2020/10/22 16:03 * @since 2020/10/22 16:03
*/ */
void checkAuth(String token, String requestUrl); void checkAuth(String token, String requestUrl);
@ -121,7 +121,7 @@ public interface AuthServiceApi {
* *
* *
* @author xixiaowei * @author xixiaowei
* @date 2022/1/22 16:37 * @since 2022/1/22 16:37
*/ */
void cancelFreeze(LoginRequest loginRequest); void cancelFreeze(LoginRequest loginRequest);
@ -132,7 +132,7 @@ public interface AuthServiceApi {
* @param defaultJwtPayload jwtpayload * @param defaultJwtPayload jwtpayload
* @return * @return
* @author fengshuonan * @author fengshuonan
* @date 2022/10/17 0:04 * @since 2022/10/17 0:04
*/ */
LoginUser createNewLoginInfo(String token, DefaultJwtPayload defaultJwtPayload); LoginUser createNewLoginInfo(String token, DefaultJwtPayload defaultJwtPayload);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,7 @@ import javax.servlet.http.Cookie;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/27 13:28 * @since 2020/12/27 13:28
*/ */
public abstract class SessionCookieCreator { public abstract class SessionCookieCreator {
@ -45,7 +45,7 @@ public abstract class SessionCookieCreator {
* @param cookieValue cookie * @param cookieValue cookie
* @param sessionExpiredSeconds cookie * @param sessionExpiredSeconds cookie
* @author fengshuonan * @author fengshuonan
* @date 2020/12/27 13:29 * @since 2020/12/27 13:29
*/ */
public Cookie createCookie(String cookieName, String cookieValue, Integer sessionExpiredSeconds) { public Cookie createCookie(String cookieName, String cookieValue, Integer sessionExpiredSeconds) {
Cookie cookie = new Cookie(cookieName, cookieValue); Cookie cookie = new Cookie(cookieName, cookieValue);
@ -58,7 +58,7 @@ public abstract class SessionCookieCreator {
* cookie * cookie
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/27 13:41 * @since 2020/12/27 13:41
*/ */
public abstract void expandCookieProp(Cookie cookie); 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 * @author fengshuonan
* @date 2020/11/5 15:22 * @since 2020/11/5 15:22
*/ */
@Getter @Getter
public enum DataScopeTypeEnum { public enum DataScopeTypeEnum {
@ -76,7 +76,7 @@ public enum DataScopeTypeEnum {
* code * code
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/10/29 18:59 * @since 2020/10/29 18:59
*/ */
public static DataScopeTypeEnum codeToEnum(Integer code) { public static DataScopeTypeEnum codeToEnum(Integer code) {
if (null != code) { if (null != code) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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