api-common包拆分

目前api-common所有的功能

Feature Classes Description
EnableFastoneWeb EnableFastoneWeb 废弃
Cmd CmdArgs, CmdRunner, CmdRunnerHelper 移动到common-cmd
Jpa AuditingDateTimeProvider, AuditingUserProvider, JpaAuditConfiguration \
Jwt JwtProperties, SecurityConfiguration \
Controller ... \
Service ... \
Repository ... \
Domain ... \
Dto ... \
Enumeration ... \
Exception ... \
Fsagent FsAgentClient 移动到common-fsagent
Query BooleanExpressionGenerator, QuerydslQueryProcessor ... \
Security CurrentUser, FastoneUserDetailsService ... \
Shell ShellHelper 移动到common-ssh
Ssh SshArgs, SshClient, SshConfiguration, SshHelper 移动到common-ssh
Util NetHelper, BeanUtils 移动到common-util

拆分后大概分为

Module Features Description
api-common Controller, Service, Repository, Domain, Dto, Enumeration, Exception, Jwt, Jpa, Security 原地不动
cmd-lib Cmd Cmd
ssh-common Shell, ssh Ssh公共库
common-util Util 工具类公共库
fsagent-lib Fsagent fsagent公共库

其中api-common还需要细拆分

Feature Classes Description
db- common BaseDomain, AuditingDateTimeProvider, Notification, CrudService
security-common AuthController, AuthService, JwtTokenProvider, User, UserRepository, Role, RoleName ... 安全相关
api-common FastoneJob, JobInput, Cluster, ClusterRequest, ComputeNodeSpec, DataSet, JobInput, JobOption, JobOutput, JobProperty, StorageInfo, BasePathService Scheduler和Api公共的
api App, CloudAccount, CloudProvider, FastoneBillingService, FastoneBudgetService, FastoneClusterService, ForgotPassword, Industry 这些类移动到api中

UserService所有方法

方法 调用方 Description
init(), initRole(), initUser(), doInitUser(AuthInfoDto authInfo), createIfNotExist(User user, Set roleNames) ALL 移动到UserInitService
getCurrentUserId() ALL 移动到AuthService
findByUsernameOrEmail(String usernameOrEmail) API&Scheduler 提到公共库中
create(User user) API 移动到API的userService中
create(User user, boolean hasClusterService) API
createServiceUser() API
createNotification(Notification notification, Map params) BaseJobService 耦合太强
save(User user) API 移动到API
current() ALL 移动到AuthService
get(Long id) BaseJobService还有BasePathService 耦合太强
delete(Long id) API 移动到API的UserService
delete(User user) API 移动到API的UserService
list(List filters, QueryOperator queryOperator, Pageable pageable) API
update(User user) API
patch(User user) API
getCloudUser() API
getCloudUsers() API
getClusterService(Long id) API
isAdmin() API
listCloudAccounts(Long id, Pageable pageable) API
existsByUsername(String username) API
existsByEmail(String email) API
changePassword(ChangePasswordDTO changePasswordDTO) API

你可能感兴趣的:(api-common包拆分)