Browse Source

统一规范,为bean加上final关键字,非强迫症可无视

test
smallchill 5 years ago
parent
commit
048320e3db
  1. 12
      blade-auth/src/main/java/org/springblade/auth/config/BladeAuthorizationServerConfiguration.java
  2. 2
      blade-auth/src/main/java/org/springblade/auth/config/BladeResourceServerConfiguration.java
  3. 2
      blade-auth/src/main/java/org/springblade/auth/endpoint/BladeTokenEndPoint.java
  4. 6
      blade-auth/src/main/java/org/springblade/auth/handler/AppLoginInSuccessHandler.java
  5. 20
      blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetails.java
  6. 4
      blade-auth/src/main/java/org/springblade/auth/service/BladeUserDetailsServiceImpl.java
  7. 4
      blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java
  8. 50
      blade-gateway/src/main/java/org/springblade/gateway/provider/AuthProvider.java
  9. 2
      blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java
  10. 2
      blade-ops-api/blade-flow-api/src/main/java/org/springblade/flow/core/constant/ProcessConstant.java
  11. 1
      blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Oss.java
  12. 1
      blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/entity/Sms.java
  13. 1
      blade-ops-api/blade-resource-api/src/main/java/org/springblade/resource/vo/SmsVO.java
  14. 10
      blade-ops/blade-admin/src/main/java/org/springblade/admin/notifier/CustomNotifier.java
  15. 4
      blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/CodeController.java
  16. 2
      blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/DatasourceController.java
  17. 2
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/FlowableAutoConfiguration.java
  18. 2
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/config/StaticResourceConfig.java
  19. 10
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/constant/FlowableConstant.java
  20. 4
      blade-ops/blade-flow-design/src/main/java/org/springblade/flow/filter/UserHandlerInterceptor.java
  21. 6
      blade-ops/blade-flow/src/main/java/org/springblade/flow/business/controller/WorkController.java
  22. 6
      blade-ops/blade-flow/src/main/java/org/springblade/flow/business/feign/FlowClient.java
  23. 4
      blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
  24. 2
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/config/FlowableConfiguration.java
  25. 2
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowFollowController.java
  26. 2
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowManagerController.java
  27. 2
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowModelController.java
  28. 10
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/controller/FlowProcessController.java
  29. 18
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowEngineServiceImpl.java
  30. 2
      blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogApiController.java
  31. 2
      blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogErrorController.java
  32. 2
      blade-ops/blade-log/src/main/java/org/springblade/core/log/controller/LogUsualController.java
  33. 6
      blade-ops/blade-log/src/main/java/org/springblade/core/log/feign/LogClient.java
  34. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java
  35. 6
      blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java
  36. 3
      blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java
  37. 3
      blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java
  38. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java
  39. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java
  40. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/feign/SmsClient.java
  41. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java
  42. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java
  43. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java
  44. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java
  45. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java
  46. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java
  47. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java
  48. 1
      blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java
  49. 88
      blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/config/XxlJobConfig.java
  50. 4
      blade-ops/blade-xxljob/src/main/java/org/springblade/job/executor/jobhandler/SampleXxlJob.java
  51. 1
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/ApiScope.java
  52. 1
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/AuthClient.java
  53. 1
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/DataScope.java
  54. 1
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/entity/TopMenu.java
  55. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/controller/LeaveController.java
  56. 4
      blade-service/blade-desk/src/main/java/org/springblade/desk/controller/NoticeController.java
  57. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/feign/NoticeClient.java
  58. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/service/impl/LeaveServiceImpl.java
  59. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/ApiScopeController.java
  60. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/AuthClientController.java
  61. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DataScopeController.java
  62. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DeptController.java
  63. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DictBizController.java
  64. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/DictController.java
  65. 4
      blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java
  66. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/ParamController.java
  67. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/PostController.java
  68. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/RoleController.java
  69. 2
      blade-service/blade-system/src/main/java/org/springblade/system/controller/TenantController.java
  70. 3
      blade-service/blade-system/src/main/java/org/springblade/system/controller/TopMenuController.java
  71. 2
      blade-service/blade-system/src/main/java/org/springblade/system/feign/DictBizClient.java
  72. 2
      blade-service/blade-system/src/main/java/org/springblade/system/feign/DictClient.java
  73. 12
      blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java
  74. 1
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/ApiScopeMapper.java
  75. 1
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/DataScopeMapper.java
  76. 1
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/TopMenuMapper.java
  77. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/IApiScopeService.java
  78. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/IDataScopeService.java
  79. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/ITopMenuService.java
  80. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ApiScopeServiceImpl.java
  81. 1
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/DataScopeServiceImpl.java
  82. 5
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
  83. 3
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/TopMenuServiceImpl.java
  84. 2
      blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
  85. 2
      blade-service/blade-user/src/main/java/org/springblade/system/user/feign/UserClient.java
  86. 4
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java

12
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) {

2
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

2
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<Authentication> currentUser(Authentication authentication) {

6
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 {

20
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<? extends GrantedAuthority> authorities) {
super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);

4
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

4
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<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {

50
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<String> 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<String> 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<String> getDefaultSkipUrl() {
return defaultSkipUrl;
return DEFAULT_SKIP_URL;
}
}

2
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<SwaggerResource> get() {

2
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";
/**
* 同意标识

1
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")

1
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")

1
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)

10
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:

4
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;
/**
* 详情

2
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;
/**
* 详情

2
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<SpringProcessEngineConfiguration> {
private FlowableProperties flowableProperties;
private final FlowableProperties flowableProperties;
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {

2
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) {

10
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";
}

4
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);

6
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;
/**
* 发起事务列表页

6
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)

4
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<BladeFlow> selectClaimPage(IPage<BladeFlow> page, BladeFlow bladeFlow) {

2
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<SpringProcessEngineConfiguration> {
private FlowableProperties flowableProperties;
private final FlowableProperties flowableProperties;
@Override
public void configure(SpringProcessEngineConfiguration engineConfiguration) {

2
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;
/**
* 流程状态列表

2
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;
/**
* 分页

2
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;
/**
* 分页

10
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;
/**
* 获取流转历史列表

18
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<FlowMapper, FlowModel> 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<FlowModel> selectFlowPage(IPage<FlowModel> page, FlowModel flowModel) {
@ -343,7 +343,7 @@ public class FlowEngineServiceImpl extends ServiceImpl<FlowMapper, FlowModel> 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<FlowMapper, FlowModel> 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");

2
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;
/**
* 查询单条

2
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;
/**
* 查询单条

2
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;
/**
* 查询单条

6
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")

4
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() {

6
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() {

3
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;
/**
* 详情

3
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;
/**
* 详情

2
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;
/**
* 创建存储桶

2
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;
//================================= 短信服务校验 =================================

2
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)

1
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<Oss> {

1
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<Sms> {

1
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<Oss> {

1
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<Sms> {

1
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<OssMapper, Oss> implements IOssService {

1
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<SmsMapper, Sms> implements ISmsService {

1
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<Oss, OssVO> {

1
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<Sms, SmsVO> {

88
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引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
/**
* 针对多网卡容器内部署等情况可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

4
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<String> 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);
}

1
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")

1
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")

1
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")

1
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")

2
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;
/**
* 详情

4
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;
/**
* 详情

2
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)

2
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<LeaveMapper, ProcessLeave> implements ILeaveService {
private IFlowClient flowClient;
private final IFlowClient flowClient;
@Override
@Transactional(rollbackFor = Exception.class)

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

4
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

2
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;
/**
* 详情

3
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;
/**
* 详情

2
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)

2
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)

12
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)

1
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<ApiScope> {

1
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<DataScope> {

1
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<TopMenu> {

1
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<ApiScope> {

1
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<DataScope> {

1
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<TopMenu> {

1
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<ApiScopeMapper, ApiScope> implements IApiScopeService {

1
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<DataScopeMapper, DataScope> implements IDataScopeService {

5
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<RoleMapper, Role> implements IRoleService {
private IRoleMenuService roleMenuService;
private IRoleScopeService roleScopeService;
private final IRoleMenuService roleMenuService;
private final IRoleScopeService roleScopeService;
@Override
public IPage<RoleVO> selectRolePage(IPage<RoleVO> page, RoleVO role) {

3
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<TopMenuMapper, TopMenu> implements ITopMenuService {
private ITopMenuSettingService topMenuSettingService;
private final ITopMenuSettingService topMenuSettingService;
@Override
@Transactional(rollbackFor = Exception.class)

2
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;
/**
* 查询单条

2
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)

4
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<UserMapper, User> implements IUserService {
private IUserDeptService userDeptService;
private ISysClient sysClient;
private final IUserDeptService userDeptService;
private final ISysClient sysClient;
@Override
@Transactional(rollbackFor = Exception.class)

Loading…
Cancel
Save