From 048320e3db7bc5aaf40fca3d7745d4da71a6a2b0 Mon Sep 17 00:00:00 2001 From: smallchill Date: Fri, 24 Apr 2020 00:11:12 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E7=BB=9F=E4=B8=80=E8=A7=84=E8=8C=83?= =?UTF-8?q?=EF=BC=8C=E4=B8=BAbean=E5=8A=A0=E4=B8=8Afinal=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=EF=BC=8C=E9=9D=9E=E5=BC=BA=E8=BF=AB=E7=97=87=E5=8F=AF?= =?UTF-8?q?=E6=97=A0=E8=A7=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...BladeAuthorizationServerConfiguration.java | 12 +-- .../BladeResourceServerConfiguration.java | 2 +- .../auth/endpoint/BladeTokenEndPoint.java | 2 +- .../handler/AppLoginInSuccessHandler.java | 6 +- .../auth/service/BladeUserDetails.java | 20 ++--- .../service/BladeUserDetailsServiceImpl.java | 4 +- .../gateway/filter/AuthFilter.java | 4 +- .../gateway/provider/AuthProvider.java | 50 +++++------ .../gateway/provider/SwaggerProvider.java | 2 +- .../flow/core/constant/ProcessConstant.java | 2 +- .../org/springblade/resource/entity/Oss.java | 1 - .../org/springblade/resource/entity/Sms.java | 1 - .../org/springblade/resource/vo/SmsVO.java | 1 - .../admin/notifier/CustomNotifier.java | 10 +-- .../develop/controller/CodeController.java | 4 +- .../controller/DatasourceController.java | 2 +- .../config/FlowableAutoConfiguration.java | 2 +- .../flow/config/StaticResourceConfig.java | 2 +- .../flow/constant/FlowableConstant.java | 10 +-- .../flow/filter/UserHandlerInterceptor.java | 4 +- .../business/controller/WorkController.java | 6 +- .../flow/business/feign/FlowClient.java | 6 +- .../service/impl/FlowBusinessServiceImpl.java | 4 +- .../engine/config/FlowableConfiguration.java | 2 +- .../controller/FlowFollowController.java | 2 +- .../controller/FlowManagerController.java | 2 +- .../controller/FlowModelController.java | 2 +- .../controller/FlowProcessController.java | 10 +-- .../service/impl/FlowEngineServiceImpl.java | 18 ++-- .../core/log/controller/LogApiController.java | 2 +- .../log/controller/LogErrorController.java | 2 +- .../log/controller/LogUsualController.java | 2 +- .../springblade/core/log/feign/LogClient.java | 6 +- .../config/BladeOssConfiguration.java | 4 +- .../config/BladeSmsConfiguration.java | 6 +- .../resource/controller/OssController.java | 3 +- .../resource/controller/SmsController.java | 3 +- .../resource/endpoint/OssEndpoint.java | 2 +- .../resource/endpoint/SmsEndpoint.java | 2 +- .../springblade/resource/feign/SmsClient.java | 2 +- .../resource/mapper/OssMapper.java | 1 - .../resource/mapper/SmsMapper.java | 1 - .../resource/service/IOssService.java | 1 - .../resource/service/ISmsService.java | 1 - .../resource/service/impl/OssServiceImpl.java | 1 - .../resource/service/impl/SmsServiceImpl.java | 1 - .../resource/wrapper/OssWrapper.java | 1 - .../resource/wrapper/SmsWrapper.java | 1 - .../job/executor/config/XxlJobConfig.java | 88 +++++++++---------- .../job/executor/jobhandler/SampleXxlJob.java | 4 +- .../springblade/system/entity/ApiScope.java | 1 - .../springblade/system/entity/AuthClient.java | 1 - .../springblade/system/entity/DataScope.java | 1 - .../springblade/system/entity/TopMenu.java | 1 - .../desk/controller/LeaveController.java | 2 +- .../desk/controller/NoticeController.java | 4 +- .../springblade/desk/feign/NoticeClient.java | 2 +- .../desk/service/impl/LeaveServiceImpl.java | 2 +- .../system/controller/ApiScopeController.java | 2 +- .../controller/AuthClientController.java | 2 +- .../controller/DataScopeController.java | 2 +- .../system/controller/DeptController.java | 2 +- .../system/controller/DictBizController.java | 2 +- .../system/controller/DictController.java | 2 +- .../system/controller/MenuController.java | 4 +- .../system/controller/ParamController.java | 2 +- .../system/controller/PostController.java | 2 +- .../system/controller/RoleController.java | 2 +- .../system/controller/TenantController.java | 2 +- .../system/controller/TopMenuController.java | 3 +- .../system/feign/DictBizClient.java | 2 +- .../springblade/system/feign/DictClient.java | 2 +- .../springblade/system/feign/SysClient.java | 12 +-- .../system/mapper/ApiScopeMapper.java | 1 - .../system/mapper/DataScopeMapper.java | 1 - .../system/mapper/TopMenuMapper.java | 1 - .../system/service/IApiScopeService.java | 1 - .../system/service/IDataScopeService.java | 1 - .../system/service/ITopMenuService.java | 1 - .../service/impl/ApiScopeServiceImpl.java | 1 - .../service/impl/DataScopeServiceImpl.java | 1 - .../system/service/impl/RoleServiceImpl.java | 5 +- .../service/impl/TopMenuServiceImpl.java | 3 +- .../user/controller/UserController.java | 2 +- .../system/user/feign/UserClient.java | 2 +- .../user/service/impl/UserServiceImpl.java | 4 +- 86 files changed, 190 insertions(+), 218 deletions(-) diff --git a/blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java b/blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java index e4acc619..9dd0dac4 100644 --- a/blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java +++ b/blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java @@ -57,17 +57,17 @@ public class BladeAuthorizationServerConfiguration extends AuthorizationServerCo private final DataSource dataSource; - private AuthenticationManager authenticationManager; + private final AuthenticationManager authenticationManager; - private UserDetailsService userDetailsService; + private final UserDetailsService userDetailsService; - private TokenStore tokenStore; + private final TokenStore tokenStore; - private TokenEnhancer jwtTokenEnhancer; + private final TokenEnhancer jwtTokenEnhancer; - private JwtAccessTokenConverter jwtAccessTokenConverter; + private final JwtAccessTokenConverter jwtAccessTokenConverter; - private BladeRedis bladeRedis; + private final BladeRedis bladeRedis; @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) { diff --git a/blade-auth/src/main/java/org/springblade/auth/config/BladeResourceServerConfiguration.java b/blade-auth/src/main/java/org/springblade/auth/config/BladeResourceServerConfiguration.java index c6054d6b..b04f7419 100644 --- a/blade-auth/src/main/java/org/springblade/auth/config/BladeResourceServerConfiguration.java +++ b/blade-auth/src/main/java/org/springblade/auth/config/BladeResourceServerConfiguration.java @@ -37,7 +37,7 @@ public class BladeResourceServerConfiguration extends ResourceServerConfigurerAd /** * 自定义登录成功处理器 */ - private AuthenticationSuccessHandler appLoginInSuccessHandler; + private final AuthenticationSuccessHandler appLoginInSuccessHandler; @Override @SneakyThrows diff --git a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java index d5347208..bddb44d6 100644 --- a/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java +++ b/blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java @@ -44,7 +44,7 @@ import java.time.Duration; @AllArgsConstructor public class BladeTokenEndPoint { - private BladeRedis bladeRedis; + private final BladeRedis bladeRedis; @GetMapping("/oauth/user-info") public R currentUser(Authentication authentication) { diff --git a/blade-auth/src/main/java/org/springblade/auth/handler/AppLoginInSuccessHandler.java b/blade-auth/src/main/java/org/springblade/auth/handler/AppLoginInSuccessHandler.java index 15dd8ca1..6b602858 100644 --- a/blade-auth/src/main/java/org/springblade/auth/handler/AppLoginInSuccessHandler.java +++ b/blade-auth/src/main/java/org/springblade/auth/handler/AppLoginInSuccessHandler.java @@ -46,11 +46,11 @@ import java.util.HashMap; @Component("appLoginInSuccessHandler") public class AppLoginInSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { - private PasswordEncoder passwordEncoder; + private final PasswordEncoder passwordEncoder; - private ClientDetailsService clientDetailsService; + private final ClientDetailsService clientDetailsService; - private AuthorizationServerTokenServices authorizationServerTokenServices; + private final AuthorizationServerTokenServices authorizationServerTokenServices; @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws ServletException, IOException { diff --git a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetails.java b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetails.java index c5107c31..80db84e2 100644 --- a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetails.java +++ b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetails.java @@ -33,43 +33,43 @@ public class BladeUserDetails extends User { /** * 用户id */ - private Long userId; + private final Long userId; /** * 租户ID */ - private String tenantId; + private final String tenantId; /** * 昵称 */ - private String name; + private final String name; /** * 真名 */ - private String realName; + private final String realName; /** * 账号 */ - private String account; + private final String account; /** * 部门id */ - private String deptId; + private final String deptId; /** * 岗位id */ - private String postId; + private final String postId; /** * 角色id */ - private String roleId; + private final String roleId; /** * 角色名 */ - private String roleName; + private final String roleName; /** * 头像 */ - private String avatar; + private final String avatar; public BladeUserDetails(Long userId, String tenantId, String name, String realName, String deptId, String postId, String roleId, String roleName, String avatar, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection authorities) { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); diff --git a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java index 02e47804..dd7db9dd 100644 --- a/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java +++ b/blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java @@ -48,8 +48,8 @@ import javax.servlet.http.HttpServletRequest; @AllArgsConstructor public class BladeUserDetailsServiceImpl implements UserDetailsService { - private IUserClient userClient; - private ISysClient sysClient; + private final IUserClient userClient; + private final ISysClient sysClient; @Override @SneakyThrows diff --git a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java index a0322f38..766b4601 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java @@ -49,8 +49,8 @@ import java.nio.charset.StandardCharsets; @Component @AllArgsConstructor public class AuthFilter implements GlobalFilter, Ordered { - private AuthProperties authProperties; - private ObjectMapper objectMapper; + private final AuthProperties authProperties; + private final ObjectMapper objectMapper; @Override public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { diff --git a/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java b/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java index 8db17d24..f3bea1ca 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java @@ -28,39 +28,39 @@ import java.util.List; */ public class AuthProvider { - public static String TARGET = "/**"; - public static String REPLACEMENT = ""; - public static String AUTH_KEY = TokenConstant.HEADER; - private static List defaultSkipUrl = new ArrayList<>(); + public static final String TARGET = "/**"; + public static final String REPLACEMENT = ""; + public static final String AUTH_KEY = TokenConstant.HEADER; + private static final List DEFAULT_SKIP_URL = new ArrayList<>(); static { - defaultSkipUrl.add("/example"); - defaultSkipUrl.add("/oauth/token/**"); - defaultSkipUrl.add("/oauth/captcha/**"); - defaultSkipUrl.add("/oauth/clear-cache/**"); - defaultSkipUrl.add("/oauth/user-info"); - defaultSkipUrl.add("/token/**"); - defaultSkipUrl.add("/actuator/health/**"); - defaultSkipUrl.add("/v2/api-docs/**"); - defaultSkipUrl.add("/v2/api-docs-ext/**"); - defaultSkipUrl.add("/auth/**"); - defaultSkipUrl.add("/log/**"); - defaultSkipUrl.add("/menu/routes"); - defaultSkipUrl.add("/menu/auth-routes"); - defaultSkipUrl.add("/menu/top-menu"); - defaultSkipUrl.add("/tenant/info"); - defaultSkipUrl.add("/process/resource-view"); - defaultSkipUrl.add("/process/diagram-view"); - defaultSkipUrl.add("/manager/check-upload"); - defaultSkipUrl.add("/error/**"); - defaultSkipUrl.add("/assets/**"); + DEFAULT_SKIP_URL.add("/example"); + DEFAULT_SKIP_URL.add("/oauth/token/**"); + DEFAULT_SKIP_URL.add("/oauth/captcha/**"); + DEFAULT_SKIP_URL.add("/oauth/clear-cache/**"); + DEFAULT_SKIP_URL.add("/oauth/user-info"); + DEFAULT_SKIP_URL.add("/token/**"); + DEFAULT_SKIP_URL.add("/actuator/health/**"); + DEFAULT_SKIP_URL.add("/v2/api-docs/**"); + DEFAULT_SKIP_URL.add("/v2/api-docs-ext/**"); + DEFAULT_SKIP_URL.add("/auth/**"); + DEFAULT_SKIP_URL.add("/log/**"); + DEFAULT_SKIP_URL.add("/menu/routes"); + DEFAULT_SKIP_URL.add("/menu/auth-routes"); + DEFAULT_SKIP_URL.add("/menu/top-menu"); + DEFAULT_SKIP_URL.add("/tenant/info"); + DEFAULT_SKIP_URL.add("/process/resource-view"); + DEFAULT_SKIP_URL.add("/process/diagram-view"); + DEFAULT_SKIP_URL.add("/manager/check-upload"); + DEFAULT_SKIP_URL.add("/error/**"); + DEFAULT_SKIP_URL.add("/assets/**"); } /** * 默认无需鉴权的API */ public static List getDefaultSkipUrl() { - return defaultSkipUrl; + return DEFAULT_SKIP_URL; } } diff --git a/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java b/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java index 098b1286..68100fd4 100644 --- a/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java +++ b/blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java @@ -38,7 +38,7 @@ import java.util.List; public class SwaggerProvider implements SwaggerResourcesProvider { private static final String API_URI = "/v2/api-docs-ext"; - private RouteProperties routeProperties; + private final RouteProperties routeProperties; @Override public List get() { diff --git a/blade-ops-api/blade-flow-api/src/main/java/org/springblade/flow/core/constant/ProcessConstant.java b/blade-ops-api/blade-flow-api/src/main/java/org/springblade/flow/core/constant/ProcessConstant.java index 54187ee8..8657f7b6 100644 --- a/blade-ops-api/blade-flow-api/src/main/java/org/springblade/flow/core/constant/ProcessConstant.java +++ b/blade-ops-api/blade-flow-api/src/main/java/org/springblade/flow/core/constant/ProcessConstant.java @@ -31,7 +31,7 @@ public interface ProcessConstant { /** * 报销流程标识 */ - String Expense_KEY = "Expense"; + String EXPENSE_KEY = "Expense"; /** * 同意标识 diff --git a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Oss.java b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Oss.java index e193a631..1785fda4 100644 --- a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Oss.java +++ b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Oss.java @@ -27,7 +27,6 @@ import org.springblade.core.tenant.mp.TenantEntity; * 实体类 * * @author BladeX - * @since 2019-05-24 */ @Data @TableName("blade_oss") diff --git a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Sms.java b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Sms.java index c7a18516..c2cb0e2f 100644 --- a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Sms.java +++ b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Sms.java @@ -27,7 +27,6 @@ import org.springblade.core.tenant.mp.TenantEntity; * 短信配置表实体类 * * @author BladeX - * @since 2020-02-20 */ @Data @TableName("blade_sms") diff --git a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/vo/SmsVO.java b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/vo/SmsVO.java index adf860ad..75c89665 100644 --- a/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/vo/SmsVO.java +++ b/blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/vo/SmsVO.java @@ -25,7 +25,6 @@ import org.springblade.resource.entity.Sms; * 短信配置表视图实体类 * * @author BladeX - * @since 2020-02-20 */ @Data @EqualsAndHashCode(callSuper = true) diff --git a/blade-ops/blade-admin/src/main/java/org/springblade/admin/notifier/CustomNotifier.java b/blade-ops/blade-admin/src/main/java/org/springblade/admin/notifier/CustomNotifier.java index 9de5afe3..cfbe7e02 100644 --- a/blade-ops/blade-admin/src/main/java/org/springblade/admin/notifier/CustomNotifier.java +++ b/blade-ops/blade-admin/src/main/java/org/springblade/admin/notifier/CustomNotifier.java @@ -46,7 +46,7 @@ public class CustomNotifier extends AbstractEventNotifier { /** * massage template */ - private static final String template = "服务名:%s(%s) n状态:%s(%s) n服务ip:%s"; + private static final String TEMPLATE = "服务名:%s(%s) n状态:%s(%s) n服务ip:%s"; @Value("${spring.boot.admin.notify.dingtalk.webhook-token}") private String dingTalkToken; @@ -70,25 +70,25 @@ public class CustomNotifier extends AbstractEventNotifier { // 健康检查没通过 case "DOWN": log.info("发送 健康检查没通过 的通知!"); - messageText = String.format(template, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "健康检查没通过", instance.getRegistration().getServiceUrl()); + messageText = String.format(TEMPLATE, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "健康检查没通过", instance.getRegistration().getServiceUrl()); this.sendMessage(messageText); break; // 服务离线 case "OFFLINE": log.info("发送 服务离线 的通知!"); - messageText = String.format(template, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务离线", instance.getRegistration().getServiceUrl()); + messageText = String.format(TEMPLATE, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务离线", instance.getRegistration().getServiceUrl()); this.sendMessage(messageText); break; //服务上线 case "UP": log.info("发送 服务上线 的通知!"); - messageText = String.format(template, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务上线", instance.getRegistration().getServiceUrl()); + messageText = String.format(TEMPLATE, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务上线", instance.getRegistration().getServiceUrl()); this.sendMessage(messageText); break; // 服务未知异常 case "UNKNOWN": log.info("发送 服务未知异常 的通知!"); - messageText = String.format(template, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务未知异常", instance.getRegistration().getServiceUrl()); + messageText = String.format(TEMPLATE, instance.getRegistration().getName(), event.getInstance(), ((InstanceStatusChangedEvent) event).getStatusInfo().getStatus(), "服务未知异常", instance.getRegistration().getServiceUrl()); this.sendMessage(messageText); break; default: diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java index 93d12336..43251f84 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java @@ -51,8 +51,8 @@ import java.util.Map; @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) public class CodeController extends BladeController { - private ICodeService codeService; - private IDatasourceService datasourceService; + private final ICodeService codeService; + private final IDatasourceService datasourceService; /** * 详情 diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java index 8cce760f..68f28f24 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java @@ -45,7 +45,7 @@ import java.util.List; @Api(value = "数据源配置表", tags = "数据源配置表接口") public class DatasourceController extends BladeController { - private IDatasourceService datasourceService; + private final IDatasourceService datasourceService; /** * 详情 diff --git a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/FlowableAutoConfiguration.java b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/FlowableAutoConfiguration.java index 8eedc5b4..014b7a47 100644 --- a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/FlowableAutoConfiguration.java +++ b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/FlowableAutoConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration; @AllArgsConstructor @EnableConfigurationProperties(FlowableProperties.class) public class FlowableAutoConfiguration implements EngineConfigurationConfigurer { - private FlowableProperties flowableProperties; + private final FlowableProperties flowableProperties; @Override public void configure(SpringProcessEngineConfiguration engineConfiguration) { diff --git a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/StaticResourceConfig.java b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/StaticResourceConfig.java index eb5d34d5..0959407d 100644 --- a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/StaticResourceConfig.java +++ b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/StaticResourceConfig.java @@ -34,7 +34,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @AllArgsConstructor public class StaticResourceConfig implements WebMvcConfigurer { - private UserHandlerInterceptor baseInterceptor; + private final UserHandlerInterceptor baseInterceptor; @Override public void addInterceptors(InterceptorRegistry registry) { diff --git a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/constant/FlowableConstant.java b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/constant/FlowableConstant.java index a522767e..5c6f5d9c 100644 --- a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/constant/FlowableConstant.java +++ b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/constant/FlowableConstant.java @@ -24,9 +24,9 @@ package org.springblade.flow.constant; public interface FlowableConstant { String FLOWABLE_BASE_PACKAGES = "org.flowable.ui"; - String css = ".css"; - String js = ".js"; - String jpg = ".jpg"; - String png = ".png"; - String app = "/app"; + String CSS = ".css"; + String JS = ".js"; + String JPG = ".jpg"; + String PNG = ".png"; + String APP = "/app"; } diff --git a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java index 55932852..8c137a7b 100644 --- a/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java +++ b/blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java @@ -39,10 +39,10 @@ public class UserHandlerInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { String servletPath = request.getServletPath(); - if (servletPath.endsWith(css) || servletPath.endsWith(js) || servletPath.endsWith(jpg) || servletPath.endsWith(png)) { + if (servletPath.endsWith(CSS) || servletPath.endsWith(JS) || servletPath.endsWith(JPG) || servletPath.endsWith(PNG)) { return true; } - if (servletPath.startsWith(app)) { + if (servletPath.startsWith(APP)) { User user = new UserEntityImpl(); user.setId("admin"); SecurityUtils.assumeUser(user); diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java index 2b7e195c..22889f24 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java @@ -44,9 +44,9 @@ import org.springframework.web.bind.annotation.*; @Api(value = "流程事务通用接口", tags = "流程事务通用接口") public class WorkController { - private TaskService taskService; - private FlowEngineService flowEngineService; - private FlowBusinessService flowBusinessService; + private final TaskService taskService; + private final FlowEngineService flowEngineService; + private final FlowBusinessService flowBusinessService; /** * 发起事务列表页 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java index 7e0f43fe..5097c7e4 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java @@ -44,9 +44,9 @@ import java.util.Map; @AllArgsConstructor public class FlowClient implements IFlowClient { - private RuntimeService runtimeService; - private IdentityService identityService; - private TaskService taskService; + private final RuntimeService runtimeService; + private final IdentityService identityService; + private final TaskService taskService; @Override @PostMapping(START_PROCESS_INSTANCE_BY_ID) diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java index fe263449..f72aca41 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java @@ -52,8 +52,8 @@ import java.util.Map; @AllArgsConstructor public class FlowBusinessServiceImpl implements FlowBusinessService { - private TaskService taskService; - private HistoryService historyService; + private final TaskService taskService; + private final HistoryService historyService; @Override public IPage selectClaimPage(IPage page, BladeFlow bladeFlow) { diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java index 1bc6d72a..84039245 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration; @AllArgsConstructor @EnableConfigurationProperties(FlowableProperties.class) public class FlowableConfiguration implements EngineConfigurationConfigurer { - private FlowableProperties flowableProperties; + private final FlowableProperties flowableProperties; @Override public void configure(SpringProcessEngineConfiguration engineConfiguration) { diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java index 361faf53..3b8635b7 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java @@ -41,7 +41,7 @@ import org.springframework.web.bind.annotation.*; @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) public class FlowFollowController { - private FlowEngineService flowEngineService; + private final FlowEngineService flowEngineService; /** * 流程状态列表 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java index 1e88f161..144dc72f 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java @@ -50,7 +50,7 @@ import java.util.Objects; @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) public class FlowManagerController { - private FlowEngineService flowEngineService; + private final FlowEngineService flowEngineService; /** * 分页 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java index a6e6fe2f..d34d6b0b 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java @@ -47,7 +47,7 @@ import java.util.Map; @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) public class FlowModelController { - private FlowEngineService flowEngineService; + private final FlowEngineService flowEngineService; /** * 分页 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java index 7eb07e4d..2aaf0a68 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java @@ -57,11 +57,11 @@ public class FlowProcessController { private static final String XML_NAME = "xml"; private static final Integer INT_1024 = 1024; - private RepositoryService repositoryService; - private RuntimeService runtimeService; - private HistoryService historyService; - private ProcessEngine processEngine; - private FlowEngineService flowEngineService; + private final RepositoryService repositoryService; + private final RuntimeService runtimeService; + private final HistoryService historyService; + private final ProcessEngine processEngine; + private final FlowEngineService flowEngineService; /** * 获取流转历史列表 diff --git a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowEngineServiceImpl.java b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowEngineServiceImpl.java index 70270036..1aa31c37 100644 --- a/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowEngineServiceImpl.java +++ b/blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowEngineServiceImpl.java @@ -75,13 +75,13 @@ import java.util.*; @Service @AllArgsConstructor public class FlowEngineServiceImpl extends ServiceImpl implements FlowEngineService { - private static BpmnJsonConverter bpmnJsonConverter = new BpmnJsonConverter(); - private static BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter(); - private ObjectMapper objectMapper; - private RepositoryService repositoryService; - private RuntimeService runtimeService; - private HistoryService historyService; - private TaskService taskService; + private static final BpmnJsonConverter BPMN_JSON_CONVERTER = new BpmnJsonConverter(); + private static final BpmnXMLConverter BPMN_XML_CONVERTER = new BpmnXMLConverter(); + private final ObjectMapper objectMapper; + private final RepositoryService repositoryService; + private final RuntimeService runtimeService; + private final HistoryService historyService; + private final TaskService taskService; @Override public IPage selectFlowPage(IPage page, FlowModel flowModel) { @@ -343,7 +343,7 @@ public class FlowEngineServiceImpl extends ServiceImpl im } } } - return bpmnXMLConverter.convertToXML(bpmnModel); + return BPMN_XML_CONVERTER.convertToXML(bpmnModel); } private BpmnModel getBpmnModel(FlowModel model) { @@ -380,7 +380,7 @@ public class FlowEngineServiceImpl extends ServiceImpl im for (FlowModel decisionTableModel : decisionTableMap.values()) { decisionTableKeyMap.put(decisionTableModel.getId(), decisionTableModel.getModelKey()); } - return bpmnJsonConverter.convertToBpmnModel(editorJsonNode, formKeyMap, decisionTableKeyMap); + return BPMN_JSON_CONVERTER.convertToBpmnModel(editorJsonNode, formKeyMap, decisionTableKeyMap); } catch (Exception e) { log.error("Could not generate BPMN 2.0 model for {}", model.getId(), e); throw new ServiceException("Could not generate BPMN 2.0 model"); diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java index 58c0fe1d..056a9f36 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java @@ -42,7 +42,7 @@ import java.util.Map; @RequestMapping("/api") public class LogApiController { - private ILogApiService logService; + private final ILogApiService logService; /** * 查询单条 diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java index 89792c0c..4a25c579 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java @@ -42,7 +42,7 @@ import java.util.Map; @RequestMapping("/error") public class LogErrorController { - private ILogErrorService errorLogService; + private final ILogErrorService errorLogService; /** * 查询单条 diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java index 35696c38..e1528b7c 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java @@ -42,7 +42,7 @@ import java.util.Map; @RequestMapping("/usual") public class LogUsualController { - private ILogUsualService logService; + private final ILogUsualService logService; /** * 查询单条 diff --git a/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java b/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java index c5a51c2e..905442fc 100644 --- a/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java +++ b/blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java @@ -37,11 +37,11 @@ import org.springframework.web.bind.annotation.RestController; @AllArgsConstructor public class LogClient implements ILogClient { - ILogUsualService usualLogService; + private final ILogUsualService usualLogService; - ILogApiService apiLogService; + private final ILogApiService apiLogService; - ILogErrorService errorLogService; + private final ILogErrorService errorLogService; @Override @PostMapping(API_PREFIX + "/saveUsualLog") diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java index 127918dd..2ac744b1 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java @@ -32,9 +32,9 @@ import org.springframework.context.annotation.Configuration; @AllArgsConstructor public class BladeOssConfiguration { - private OssProperties ossProperties; + private final OssProperties ossProperties; - private IOssService ossService; + private final IOssService ossService; @Bean public OssBuilder ossBuilder() { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java index bacb2dd4..9aa1f155 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java @@ -33,11 +33,11 @@ import org.springframework.context.annotation.Configuration; @AllArgsConstructor public class BladeSmsConfiguration { - private SmsProperties smsProperties; + private final SmsProperties smsProperties; - private ISmsService smsService; + private final ISmsService smsService; - private BladeRedis bladeRedis; + private final BladeRedis bladeRedis; @Bean public SmsBuilder smsBuilder() { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java index 803b1e80..09b6cc87 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java @@ -45,7 +45,6 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; * 控制器 * * @author BladeX - * @since 2019-05-26 */ @ApiIgnore @RestController @@ -55,7 +54,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; @Api(value = "对象存储接口", tags = "对象存储接口") public class OssController extends BladeController { - private IOssService ossService; + private final IOssService ossService; /** * 详情 diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java index d4b706de..5ee51786 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java @@ -45,7 +45,6 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; * 短信配置表 控制器 * * @author BladeX - * @since 2020-02-20 */ @ApiIgnore @RestController @@ -55,7 +54,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE; @Api(value = "短信配置表", tags = "短信配置表接口") public class SmsController extends BladeController { - private ISmsService smsService; + private final ISmsService smsService; /** * 详情 diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java index 91566fd5..193290f5 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java @@ -43,7 +43,7 @@ public class OssEndpoint { /** * 对象存储构建类 */ - private OssBuilder ossBuilder; + private final OssBuilder ossBuilder; /** * 创建存储桶 diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java index bd1a9343..734c64d2 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java @@ -50,7 +50,7 @@ public class SmsEndpoint { /** * 短信服务构建类 */ - private SmsBuilder smsBuilder; + private final SmsBuilder smsBuilder; //================================= 短信服务校验 ================================= diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java index 52728b59..5c1847c4 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java @@ -40,7 +40,7 @@ import static org.springblade.resource.utils.SmsUtil.*; @AllArgsConstructor public class SmsClient implements ISmsClient { - private SmsBuilder smsBuilder; + private final SmsBuilder smsBuilder; @Override @PostMapping(SEND_MESSAGE) diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java index af7619f4..01b2d4aa 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java @@ -27,7 +27,6 @@ import java.util.List; * Mapper 接口 * * @author BladeX - * @since 2019-05-24 */ public interface OssMapper extends BaseMapper { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java index 4d0588af..174c3d1c 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java @@ -26,7 +26,6 @@ import java.util.List; * 短信配置表 Mapper 接口 * * @author BladeX - * @since 2020-02-20 */ public interface SmsMapper extends BaseMapper { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java index 7e9661dc..c2178af5 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java @@ -25,7 +25,6 @@ import org.springblade.resource.vo.OssVO; * 服务类 * * @author BladeX - * @since 2019-05-24 */ public interface IOssService extends BaseService { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java index 38aea52a..8e4105d9 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java @@ -25,7 +25,6 @@ import org.springblade.resource.vo.SmsVO; * 短信配置表 服务类 * * @author BladeX - * @since 2020-02-20 */ public interface ISmsService extends BaseService { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java index cba83f24..53ffdae2 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java @@ -34,7 +34,6 @@ import org.springframework.transaction.annotation.Transactional; * 服务实现类 * * @author BladeX - * @since 2019-05-24 */ @Service public class OssServiceImpl extends BaseServiceImpl implements IOssService { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java index ecfcaf45..bf2fcac7 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java @@ -34,7 +34,6 @@ import org.springframework.transaction.annotation.Transactional; * 短信配置表 服务实现类 * * @author BladeX - * @since 2020-02-20 */ @Service public class SmsServiceImpl extends BaseServiceImpl implements ISmsService { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java index 838bb04f..a457999f 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java @@ -28,7 +28,6 @@ import java.util.Objects; * 包装类,返回视图层所需的字段 * * @author BladeX - * @since 2019-05-26 */ public class OssWrapper extends BaseEntityWrapper { diff --git a/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java b/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java index b6b55c55..158c6c29 100644 --- a/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java +++ b/blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java @@ -28,7 +28,6 @@ import java.util.Objects; * 短信配置表包装类,返回视图层所需的字段 * * @author BladeX - * @since 2020-02-20 */ public class SmsWrapper extends BaseEntityWrapper { diff --git a/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/config/XxlJobConfig.java b/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/config/XxlJobConfig.java index fc8ac04a..acd172cd 100644 --- a/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/config/XxlJobConfig.java +++ b/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/config/XxlJobConfig.java @@ -14,61 +14,61 @@ import org.springframework.context.annotation.Configuration; */ @Configuration public class XxlJobConfig { - private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class); + private final Logger logger = LoggerFactory.getLogger(XxlJobConfig.class); - @Value("${xxl.job.admin.addresses}") - private String adminAddresses; + @Value("${xxl.job.admin.addresses}") + private String adminAddresses; - @Value("${xxl.job.executor.appname}") - private String appName; + @Value("${xxl.job.executor.appname}") + private String appName; - @Value("${xxl.job.executor.ip}") - private String ip; + @Value("${xxl.job.executor.ip}") + private String ip; - @Value("${xxl.job.executor.port}") - private int port; + @Value("${xxl.job.executor.port}") + private int port; - @Value("${xxl.job.accessToken}") - private String accessToken; + @Value("${xxl.job.accessToken}") + private String accessToken; - @Value("${xxl.job.executor.logpath}") - private String logPath; + @Value("${xxl.job.executor.logpath}") + private String logPath; - @Value("${xxl.job.executor.logretentiondays}") - private int logRetentionDays; + @Value("${xxl.job.executor.logretentiondays}") + private int logRetentionDays; - @Bean - public XxlJobSpringExecutor xxlJobExecutor() { - logger.info(">>>>>>>>>>> xxl-job config init."); - XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); - xxlJobSpringExecutor.setAdminAddresses(adminAddresses); - xxlJobSpringExecutor.setAppName(appName); - xxlJobSpringExecutor.setIp(ip); - xxlJobSpringExecutor.setPort(port); - xxlJobSpringExecutor.setAccessToken(accessToken); - xxlJobSpringExecutor.setLogPath(logPath); - xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); + @Bean + public XxlJobSpringExecutor xxlJobExecutor() { + logger.info(">>>>>>>>>>> xxl-job config init."); + XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); + xxlJobSpringExecutor.setAdminAddresses(adminAddresses); + xxlJobSpringExecutor.setAppName(appName); + xxlJobSpringExecutor.setIp(ip); + xxlJobSpringExecutor.setPort(port); + xxlJobSpringExecutor.setAccessToken(accessToken); + xxlJobSpringExecutor.setLogPath(logPath); + xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays); - return xxlJobSpringExecutor; - } + return xxlJobSpringExecutor; + } - /** - * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP; - * - * 1、引入依赖: - * - * org.springframework.cloud - * spring-cloud-commons - * ${version} - * - * - * 2、配置文件,或者容器启动变量 - * spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.' - * - * 3、获取IP - * String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); - */ + /** + * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP; + * + * 1、引入依赖: + * + * org.springframework.cloud + * spring-cloud-commons + * ${version} + * + * + * 2、配置文件,或者容器启动变量 + * spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.' + * + * 3、获取IP + * String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress(); + */ } diff --git a/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/jobhandler/SampleXxlJob.java b/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/jobhandler/SampleXxlJob.java index 4c9d2502..bb089e77 100644 --- a/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/jobhandler/SampleXxlJob.java +++ b/blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/jobhandler/SampleXxlJob.java @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit; */ @Component public class SampleXxlJob { - private static Logger logger = LoggerFactory.getLogger(SampleXxlJob.class); + private static final Logger logger = LoggerFactory.getLogger(SampleXxlJob.class); /** @@ -38,7 +38,7 @@ public class SampleXxlJob { public ReturnT demoJobHandler(String param) throws Exception { XxlJobLogger.log("XXL-JOB, Hello World."); - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 5; i++) { XxlJobLogger.log("beat at:" + i); TimeUnit.SECONDS.sleep(2); } diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/ApiScope.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/ApiScope.java index cd7993dd..ea742438 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/ApiScope.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/ApiScope.java @@ -27,7 +27,6 @@ import org.springblade.core.mp.base.BaseEntity; * 实体类 * * @author BladeX - * @since 2019-06-23 */ @Data @TableName("blade_scope_api") diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java index 00be4f45..96bdd8e1 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java @@ -27,7 +27,6 @@ import org.springblade.core.mp.base.BaseEntity; * 实体类 * * @author BladeX - * @since 2019-03-24 */ @Data @TableName("blade_client") diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java index 42c43a7e..1fced27e 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java @@ -27,7 +27,6 @@ import org.springblade.core.mp.base.BaseEntity; * 实体类 * * @author BladeX - * @since 2019-06-23 */ @Data @TableName("blade_scope_data") diff --git a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/TopMenu.java b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/TopMenu.java index e2ae9e6c..37f5af75 100644 --- a/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/TopMenu.java +++ b/blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/TopMenu.java @@ -27,7 +27,6 @@ import org.springblade.core.tenant.mp.TenantEntity; * 顶部菜单表实体类 * * @author BladeX - * @since 2019-07-14 */ @Data @TableName("blade_top_menu") diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java index ea6bc587..aa830a23 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java @@ -37,7 +37,7 @@ import springfox.documentation.annotations.ApiIgnore; @AllArgsConstructor public class LeaveController extends BladeController implements CacheNames { - private ILeaveService leaveService; + private final ILeaveService leaveService; /** * 详情 diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java index 07b7eb12..9b7f621e 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java @@ -47,9 +47,9 @@ import java.util.Map; @Api(value = "用户博客", tags = "博客接口") public class NoticeController extends BladeController { - private INoticeService noticeService; + private final INoticeService noticeService; - private INoticeClient noticeClient; + private final INoticeClient noticeClient; /** * 详情 diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java index 74fb2890..b3ad8db6 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java @@ -37,7 +37,7 @@ import springfox.documentation.annotations.ApiIgnore; @AllArgsConstructor public class NoticeClient implements INoticeClient { - private INoticeService service; + private final INoticeService service; @Override @GetMapping(TOP) diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/LeaveServiceImpl.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/LeaveServiceImpl.java index 25b36a31..155e168a 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/LeaveServiceImpl.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/LeaveServiceImpl.java @@ -46,7 +46,7 @@ import org.springframework.transaction.annotation.Transactional; @AllArgsConstructor public class LeaveServiceImpl extends BaseServiceImpl implements ILeaveService { - private IFlowClient flowClient; + private final IFlowClient flowClient; @Override @Transactional(rollbackFor = Exception.class) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java index de76daf9..31825cb3 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java @@ -49,7 +49,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @Api(value = "接口权限", tags = "接口权限") public class ApiScopeController extends BladeController { - private IApiScopeService apiScopeService; + private final IApiScopeService apiScopeService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java index 24857e6e..72208188 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java @@ -49,7 +49,7 @@ import javax.validation.Valid; @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) public class AuthClientController extends BladeController { - private IAuthClientService clientService; + private final IAuthClientService clientService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java index 2296dc5f..913b60ce 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java @@ -49,7 +49,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @Api(value = "数据权限", tags = "数据权限") public class DataScopeController extends BladeController { - private IDataScopeService dataScopeService; + private final IDataScopeService dataScopeService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java index 02aa997c..d1675ee5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java @@ -56,7 +56,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public class DeptController extends BladeController { - private IDeptService deptService; + private final IDeptService deptService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java index 98979c25..d79d236f 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java @@ -49,7 +49,7 @@ import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; @Api(value = "业务字典", tags = "业务字典") public class DictBizController extends BladeController { - private IDictBizService dictService; + private final IDictBizService dictService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java index d6fc0cf5..c52594b1 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java @@ -50,7 +50,7 @@ import static org.springblade.core.cache.constant.CacheConstant.DICT_CACHE; @Api(value = "字典", tags = "字典") public class DictController extends BladeController { - private IDictService dictService; + private final IDictService dictService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java index 54624a88..13d1d3e1 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java @@ -57,8 +57,8 @@ import static org.springblade.core.cache.constant.CacheConstant.MENU_CACHE; @Api(value = "菜单", tags = "菜单") public class MenuController extends BladeController { - private IMenuService menuService; - private ITopMenuService topMenuService; + private final IMenuService menuService; + private final ITopMenuService topMenuService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java index 4c28e47b..cd9a606b 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java @@ -47,7 +47,7 @@ import static org.springblade.core.cache.constant.CacheConstant.PARAM_CACHE; @Api(value = "参数管理", tags = "接口") public class ParamController extends BladeController { - private IParamService paramService; + private final IParamService paramService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java index c9e784bb..90dd9e7c 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java @@ -52,7 +52,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @Api(value = "岗位表", tags = "岗位表接口") public class PostController extends BladeController { - private IPostService postService; + private final IPostService postService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java index 61205f6c..28cb3cbb 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java @@ -55,7 +55,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public class RoleController extends BladeController { - private IRoleService roleService; + private final IRoleService roleService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java index 7b571d07..477683f0 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java @@ -57,7 +57,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @Api(value = "租户管理", tags = "接口") public class TenantController extends BladeController { - private ITenantService tenantService; + private final ITenantService tenantService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java index 3bc2f08b..6a76f6be 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java @@ -43,7 +43,6 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; * 顶部菜单表 控制器 * * @author BladeX - * @since 2019-07-14 */ @RestController @AllArgsConstructor @@ -52,7 +51,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; @PreAuth(RoleConstant.HAS_ROLE_ADMIN) public class TopMenuController extends BladeController { - private ITopMenuService topMenuService; + private final ITopMenuService topMenuService; /** * 详情 diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java index 7f83916e..874087c3 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java @@ -38,7 +38,7 @@ import java.util.List; @AllArgsConstructor public class DictBizClient implements IDictBizClient { - private IDictBizService service; + private final IDictBizService service; @Override @GetMapping(GET_BY_ID) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java index 4ca9f736..94f4f487 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java @@ -38,7 +38,7 @@ import java.util.List; @AllArgsConstructor public class DictClient implements IDictClient { - private IDictService service; + private final IDictService service; @Override @GetMapping(GET_BY_ID) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java index 51c4b5d3..476bb1ab 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java @@ -36,17 +36,17 @@ import java.util.List; @AllArgsConstructor public class SysClient implements ISysClient { - private IDeptService deptService; + private final IDeptService deptService; - private IPostService postService; + private final IPostService postService; - private IRoleService roleService; + private final IRoleService roleService; - private IMenuService menuService; + private final IMenuService menuService; - private ITenantService tenantService; + private final ITenantService tenantService; - private IParamService paramService; + private final IParamService paramService; @Override @GetMapping(MENU) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/ApiScopeMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/ApiScopeMapper.java index 1d5e4ee3..3904a058 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/ApiScopeMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/ApiScopeMapper.java @@ -23,7 +23,6 @@ import org.springblade.system.entity.ApiScope; * Mapper 接口 * * @author BladeX - * @since 2019-06-23 */ public interface ApiScopeMapper extends BaseMapper { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java index 959ef558..8df5a4e5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java @@ -23,7 +23,6 @@ import org.springblade.system.entity.DataScope; * Mapper 接口 * * @author BladeX - * @since 2019-06-23 */ public interface DataScopeMapper extends BaseMapper { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TopMenuMapper.java b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TopMenuMapper.java index 5ca71d59..c0352918 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TopMenuMapper.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/mapper/TopMenuMapper.java @@ -23,7 +23,6 @@ import org.springblade.system.entity.TopMenu; * 顶部菜单表 Mapper 接口 * * @author BladeX - * @since 2019-07-14 */ public interface TopMenuMapper extends BaseMapper { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IApiScopeService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IApiScopeService.java index fc59d7c5..293b3e53 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IApiScopeService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IApiScopeService.java @@ -23,7 +23,6 @@ import org.springblade.system.entity.ApiScope; * 服务类 * * @author BladeX - * @since 2019-06-23 */ public interface IApiScopeService extends BaseService { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java index 7b674dc4..4babdcbb 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java @@ -23,7 +23,6 @@ import org.springblade.system.entity.DataScope; * 服务类 * * @author BladeX - * @since 2019-06-23 */ public interface IDataScopeService extends BaseService { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/ITopMenuService.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/ITopMenuService.java index 47e3b8c0..66fbad15 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/ITopMenuService.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/ITopMenuService.java @@ -26,7 +26,6 @@ import java.util.List; * 顶部菜单表 服务类 * * @author BladeX - * @since 2019-07-14 */ public interface ITopMenuService extends BaseService { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ApiScopeServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ApiScopeServiceImpl.java index 7599211b..4f7d23a5 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ApiScopeServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ApiScopeServiceImpl.java @@ -26,7 +26,6 @@ import org.springframework.stereotype.Service; * 服务实现类 * * @author BladeX - * @since 2019-06-23 */ @Service public class ApiScopeServiceImpl extends BaseServiceImpl implements IApiScopeService { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java index e69a4c38..a1d96c66 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java @@ -26,7 +26,6 @@ import org.springframework.stereotype.Service; * 服务实现类 * * @author BladeX - * @since 2019-06-23 */ @Service public class DataScopeServiceImpl extends BaseServiceImpl implements IDataScopeService { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java index 9f7296b6..76143b51 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java @@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.AllArgsConstructor; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.secure.utils.AuthUtil; -import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.constant.RoleConstant; import org.springblade.core.tool.node.ForestNodeMerger; @@ -58,8 +57,8 @@ import static org.springblade.common.constant.CommonConstant.DATA_SCOPE_CATEGORY @AllArgsConstructor public class RoleServiceImpl extends ServiceImpl implements IRoleService { - private IRoleMenuService roleMenuService; - private IRoleScopeService roleScopeService; + private final IRoleMenuService roleMenuService; + private final IRoleScopeService roleScopeService; @Override public IPage selectRolePage(IPage page, RoleVO role) { diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TopMenuServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TopMenuServiceImpl.java index 0a6d86ff..134252c6 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TopMenuServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TopMenuServiceImpl.java @@ -35,13 +35,12 @@ import java.util.List; * 顶部菜单表 服务实现类 * * @author BladeX - * @since 2019-07-14 */ @Service @AllArgsConstructor public class TopMenuServiceImpl extends BaseServiceImpl implements ITopMenuService { - private ITopMenuSettingService topMenuSettingService; + private final ITopMenuSettingService topMenuSettingService; @Override @Transactional(rollbackFor = Exception.class) diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java index a1208b7d..83dfae90 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java +++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java @@ -65,7 +65,7 @@ import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE; @AllArgsConstructor public class UserController { - private IUserService userService; + private final IUserService userService; /** * 查询单条 diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java index 4775e4a1..42bf64be 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java +++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java @@ -37,7 +37,7 @@ import org.springframework.web.bind.annotation.RestController; @AllArgsConstructor public class UserClient implements IUserClient { - private IUserService service; + private final IUserService service; @Override @GetMapping(USER_INFO_BY_ID) diff --git a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java b/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java index 641c2897..2ea6e05f 100644 --- a/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java +++ b/blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java @@ -58,8 +58,8 @@ import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSW @AllArgsConstructor public class UserServiceImpl extends BaseServiceImpl implements IUserService { - private IUserDeptService userDeptService; - private ISysClient sysClient; + private final IUserDeptService userDeptService; + private final ISysClient sysClient; @Override @Transactional(rollbackFor = Exception.class)