Showing preview only (978K chars total). Download the full file or copy to clipboard to get everything.
Repository: elunez/eladmin
Branch: master
Commit: be2f1370f3b9
Files: 305
Total size: 879.7 KB
Directory structure:
gitextract_rbfjroal/
├── .gitignore
├── LICENSE
├── README.md
├── eladmin-common/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── me/
│ │ └── zhengjie/
│ │ ├── annotation/
│ │ │ ├── DataPermission.java
│ │ │ ├── Limit.java
│ │ │ ├── Query.java
│ │ │ └── rest/
│ │ │ ├── AnonymousAccess.java
│ │ │ ├── AnonymousDeleteMapping.java
│ │ │ ├── AnonymousGetMapping.java
│ │ │ ├── AnonymousPatchMapping.java
│ │ │ ├── AnonymousPostMapping.java
│ │ │ └── AnonymousPutMapping.java
│ │ ├── aspect/
│ │ │ ├── LimitAspect.java
│ │ │ └── LimitType.java
│ │ ├── base/
│ │ │ ├── BaseDTO.java
│ │ │ ├── BaseEntity.java
│ │ │ └── BaseMapper.java
│ │ ├── config/
│ │ │ ├── AsyncExecutor.java
│ │ │ ├── AuditorConfig.java
│ │ │ ├── AuthorityConfig.java
│ │ │ ├── CustomP6SpyLogger.java
│ │ │ ├── RedisConfiguration.java
│ │ │ ├── RedissonConfiguration.java
│ │ │ ├── RemoveDruidAdConfig.java
│ │ │ ├── properties/
│ │ │ │ ├── FileProperties.java
│ │ │ │ └── RsaProperties.java
│ │ │ └── webConfig/
│ │ │ ├── ConfigurerAdapter.java
│ │ │ ├── MultipartConfig.java
│ │ │ ├── QueryCustomizer.java
│ │ │ ├── SwaggerConfig.java
│ │ │ ├── SwaggerDataConfig.java
│ │ │ └── WebSocketConfig.java
│ │ ├── exception/
│ │ │ ├── BadRequestException.java
│ │ │ ├── EntityExistException.java
│ │ │ ├── EntityNotFoundException.java
│ │ │ └── handler/
│ │ │ ├── ApiError.java
│ │ │ └── GlobalExceptionHandler.java
│ │ └── utils/
│ │ ├── AnonTagUtils.java
│ │ ├── BigDecimalUtils.java
│ │ ├── CacheKey.java
│ │ ├── CloseUtil.java
│ │ ├── DateUtil.java
│ │ ├── ElConstant.java
│ │ ├── EncryptUtils.java
│ │ ├── FileUtil.java
│ │ ├── PageResult.java
│ │ ├── PageUtil.java
│ │ ├── QueryHelp.java
│ │ ├── RedisUtils.java
│ │ ├── RequestHolder.java
│ │ ├── RsaUtils.java
│ │ ├── SecurityUtils.java
│ │ ├── SpringBeanHolder.java
│ │ ├── StringUtils.java
│ │ ├── ThrowableUtil.java
│ │ ├── ValidationUtil.java
│ │ └── enums/
│ │ ├── CodeBiEnum.java
│ │ ├── CodeEnum.java
│ │ ├── DataScopeEnum.java
│ │ └── RequestMethodEnum.java
│ └── test/
│ └── java/
│ └── me/
│ └── zhengjie/
│ └── utils/
│ ├── DateUtilsTest.java
│ ├── EncryptUtilsTest.java
│ ├── FileUtilTest.java
│ └── StringUtilsTest.java
├── eladmin-generator/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── me/
│ │ └── zhengjie/
│ │ ├── domain/
│ │ │ ├── ColumnInfo.java
│ │ │ ├── GenConfig.java
│ │ │ └── vo/
│ │ │ └── TableInfo.java
│ │ ├── repository/
│ │ │ ├── ColumnInfoRepository.java
│ │ │ └── GenConfigRepository.java
│ │ ├── rest/
│ │ │ ├── GenConfigController.java
│ │ │ └── GeneratorController.java
│ │ ├── service/
│ │ │ ├── GenConfigService.java
│ │ │ ├── GeneratorService.java
│ │ │ └── impl/
│ │ │ ├── GenConfigServiceImpl.java
│ │ │ └── GeneratorServiceImpl.java
│ │ └── utils/
│ │ ├── ColUtil.java
│ │ └── GenUtil.java
│ └── resources/
│ ├── gen.properties
│ └── template/
│ ├── admin/
│ │ ├── Controller.ftl
│ │ ├── Dto.ftl
│ │ ├── Entity.ftl
│ │ ├── Mapper.ftl
│ │ ├── QueryCriteria.ftl
│ │ ├── Repository.ftl
│ │ ├── Service.ftl
│ │ └── ServiceImpl.ftl
│ └── front/
│ ├── api.ftl
│ └── index.ftl
├── eladmin-logging/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── zhengjie/
│ ├── annotation/
│ │ └── Log.java
│ ├── aspect/
│ │ └── LogAspect.java
│ ├── domain/
│ │ └── SysLog.java
│ ├── repository/
│ │ └── LogRepository.java
│ ├── rest/
│ │ └── SysLogController.java
│ └── service/
│ ├── SysLogService.java
│ ├── dto/
│ │ ├── SysLogErrorDto.java
│ │ ├── SysLogQueryCriteria.java
│ │ └── SysLogSmallDto.java
│ ├── impl/
│ │ └── SysLogServiceImpl.java
│ └── mapstruct/
│ ├── LogErrorMapper.java
│ └── LogSmallMapper.java
├── eladmin-system/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── me/
│ │ │ └── zhengjie/
│ │ │ ├── AppRun.java
│ │ │ ├── modules/
│ │ │ │ ├── maint/
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── App.java
│ │ │ │ │ │ ├── Database.java
│ │ │ │ │ │ ├── Deploy.java
│ │ │ │ │ │ ├── DeployHistory.java
│ │ │ │ │ │ ├── ServerDeploy.java
│ │ │ │ │ │ └── enums/
│ │ │ │ │ │ └── DataTypeEnum.java
│ │ │ │ │ ├── repository/
│ │ │ │ │ │ ├── AppRepository.java
│ │ │ │ │ │ ├── DatabaseRepository.java
│ │ │ │ │ │ ├── DeployHistoryRepository.java
│ │ │ │ │ │ ├── DeployRepository.java
│ │ │ │ │ │ └── ServerDeployRepository.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── AppController.java
│ │ │ │ │ │ ├── DatabaseController.java
│ │ │ │ │ │ ├── DeployController.java
│ │ │ │ │ │ ├── DeployHistoryController.java
│ │ │ │ │ │ └── ServerDeployController.java
│ │ │ │ │ ├── service/
│ │ │ │ │ │ ├── AppService.java
│ │ │ │ │ │ ├── DatabaseService.java
│ │ │ │ │ │ ├── DeployHistoryService.java
│ │ │ │ │ │ ├── DeployService.java
│ │ │ │ │ │ ├── ServerDeployService.java
│ │ │ │ │ │ ├── dto/
│ │ │ │ │ │ │ ├── AppDto.java
│ │ │ │ │ │ │ ├── AppQueryCriteria.java
│ │ │ │ │ │ │ ├── DatabaseDto.java
│ │ │ │ │ │ │ ├── DatabaseQueryCriteria.java
│ │ │ │ │ │ │ ├── DeployDto.java
│ │ │ │ │ │ │ ├── DeployHistoryDto.java
│ │ │ │ │ │ │ ├── DeployHistoryQueryCriteria.java
│ │ │ │ │ │ │ ├── DeployQueryCriteria.java
│ │ │ │ │ │ │ ├── ServerDeployDto.java
│ │ │ │ │ │ │ └── ServerDeployQueryCriteria.java
│ │ │ │ │ │ ├── impl/
│ │ │ │ │ │ │ ├── AppServiceImpl.java
│ │ │ │ │ │ │ ├── DatabaseServiceImpl.java
│ │ │ │ │ │ │ ├── DeployHistoryServiceImpl.java
│ │ │ │ │ │ │ ├── DeployServiceImpl.java
│ │ │ │ │ │ │ └── ServerDeployServiceImpl.java
│ │ │ │ │ │ └── mapstruct/
│ │ │ │ │ │ ├── AppMapper.java
│ │ │ │ │ │ ├── DatabaseMapper.java
│ │ │ │ │ │ ├── DeployHistoryMapper.java
│ │ │ │ │ │ ├── DeployMapper.java
│ │ │ │ │ │ └── ServerDeployMapper.java
│ │ │ │ │ ├── util/
│ │ │ │ │ │ ├── ExecuteShellUtil.java
│ │ │ │ │ │ ├── ScpClientUtil.java
│ │ │ │ │ │ └── SqlUtils.java
│ │ │ │ │ └── websocket/
│ │ │ │ │ ├── MsgType.java
│ │ │ │ │ ├── SocketMsg.java
│ │ │ │ │ └── WebSocketServer.java
│ │ │ │ ├── quartz/
│ │ │ │ │ ├── config/
│ │ │ │ │ │ ├── JobRunner.java
│ │ │ │ │ │ └── QuartzConfig.java
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── QuartzJob.java
│ │ │ │ │ │ └── QuartzLog.java
│ │ │ │ │ ├── repository/
│ │ │ │ │ │ ├── QuartzJobRepository.java
│ │ │ │ │ │ └── QuartzLogRepository.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ └── QuartzJobController.java
│ │ │ │ │ ├── service/
│ │ │ │ │ │ ├── QuartzJobService.java
│ │ │ │ │ │ ├── dto/
│ │ │ │ │ │ │ └── JobQueryCriteria.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ └── QuartzJobServiceImpl.java
│ │ │ │ │ ├── task/
│ │ │ │ │ │ └── TestTask.java
│ │ │ │ │ └── utils/
│ │ │ │ │ ├── ExecutionJob.java
│ │ │ │ │ ├── QuartzManage.java
│ │ │ │ │ └── QuartzRunnable.java
│ │ │ │ ├── security/
│ │ │ │ │ ├── config/
│ │ │ │ │ │ ├── CaptchaConfig.java
│ │ │ │ │ │ ├── LoginProperties.java
│ │ │ │ │ │ ├── SecurityProperties.java
│ │ │ │ │ │ ├── SpringSecurityConfig.java
│ │ │ │ │ │ └── enums/
│ │ │ │ │ │ └── LoginCodeEnum.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── AuthController.java
│ │ │ │ │ │ └── OnlineController.java
│ │ │ │ │ ├── security/
│ │ │ │ │ │ ├── JwtAccessDeniedHandler.java
│ │ │ │ │ │ ├── JwtAuthenticationEntryPoint.java
│ │ │ │ │ │ ├── TokenConfigurer.java
│ │ │ │ │ │ ├── TokenFilter.java
│ │ │ │ │ │ └── TokenProvider.java
│ │ │ │ │ └── service/
│ │ │ │ │ ├── OnlineUserService.java
│ │ │ │ │ ├── UserCacheManager.java
│ │ │ │ │ ├── UserDetailsServiceImpl.java
│ │ │ │ │ └── dto/
│ │ │ │ │ ├── AuthUserDto.java
│ │ │ │ │ ├── AuthorityDto.java
│ │ │ │ │ ├── JwtUserDto.java
│ │ │ │ │ └── OnlineUserDto.java
│ │ │ │ └── system/
│ │ │ │ ├── domain/
│ │ │ │ │ ├── Dept.java
│ │ │ │ │ ├── Dict.java
│ │ │ │ │ ├── DictDetail.java
│ │ │ │ │ ├── Job.java
│ │ │ │ │ ├── Menu.java
│ │ │ │ │ ├── Role.java
│ │ │ │ │ ├── User.java
│ │ │ │ │ └── vo/
│ │ │ │ │ ├── MenuMetaVo.java
│ │ │ │ │ ├── MenuVo.java
│ │ │ │ │ └── UserPassVo.java
│ │ │ │ ├── repository/
│ │ │ │ │ ├── DeptRepository.java
│ │ │ │ │ ├── DictDetailRepository.java
│ │ │ │ │ ├── DictRepository.java
│ │ │ │ │ ├── JobRepository.java
│ │ │ │ │ ├── MenuRepository.java
│ │ │ │ │ ├── RoleRepository.java
│ │ │ │ │ └── UserRepository.java
│ │ │ │ ├── rest/
│ │ │ │ │ ├── DeptController.java
│ │ │ │ │ ├── DictController.java
│ │ │ │ │ ├── DictDetailController.java
│ │ │ │ │ ├── JobController.java
│ │ │ │ │ ├── LimitController.java
│ │ │ │ │ ├── MenuController.java
│ │ │ │ │ ├── MonitorController.java
│ │ │ │ │ ├── RoleController.java
│ │ │ │ │ ├── UserController.java
│ │ │ │ │ └── VerifyController.java
│ │ │ │ └── service/
│ │ │ │ ├── DataService.java
│ │ │ │ ├── DeptService.java
│ │ │ │ ├── DictDetailService.java
│ │ │ │ ├── DictService.java
│ │ │ │ ├── JobService.java
│ │ │ │ ├── MenuService.java
│ │ │ │ ├── MonitorService.java
│ │ │ │ ├── RoleService.java
│ │ │ │ ├── UserService.java
│ │ │ │ ├── VerifyService.java
│ │ │ │ ├── dto/
│ │ │ │ │ ├── DeptDto.java
│ │ │ │ │ ├── DeptQueryCriteria.java
│ │ │ │ │ ├── DeptSmallDto.java
│ │ │ │ │ ├── DictDetailDto.java
│ │ │ │ │ ├── DictDetailQueryCriteria.java
│ │ │ │ │ ├── DictDto.java
│ │ │ │ │ ├── DictQueryCriteria.java
│ │ │ │ │ ├── DictSmallDto.java
│ │ │ │ │ ├── JobDto.java
│ │ │ │ │ ├── JobQueryCriteria.java
│ │ │ │ │ ├── JobSmallDto.java
│ │ │ │ │ ├── MenuDto.java
│ │ │ │ │ ├── MenuQueryCriteria.java
│ │ │ │ │ ├── RoleDto.java
│ │ │ │ │ ├── RoleQueryCriteria.java
│ │ │ │ │ ├── RoleSmallDto.java
│ │ │ │ │ ├── UserDto.java
│ │ │ │ │ └── UserQueryCriteria.java
│ │ │ │ ├── impl/
│ │ │ │ │ ├── DataServiceImpl.java
│ │ │ │ │ ├── DeptServiceImpl.java
│ │ │ │ │ ├── DictDetailServiceImpl.java
│ │ │ │ │ ├── DictServiceImpl.java
│ │ │ │ │ ├── JobServiceImpl.java
│ │ │ │ │ ├── MenuServiceImpl.java
│ │ │ │ │ ├── MonitorServiceImpl.java
│ │ │ │ │ ├── RoleServiceImpl.java
│ │ │ │ │ ├── UserServiceImpl.java
│ │ │ │ │ └── VerifyServiceImpl.java
│ │ │ │ └── mapstruct/
│ │ │ │ ├── DeptMapper.java
│ │ │ │ ├── DeptSmallMapper.java
│ │ │ │ ├── DictDetailMapper.java
│ │ │ │ ├── DictMapper.java
│ │ │ │ ├── DictSmallMapper.java
│ │ │ │ ├── JobMapper.java
│ │ │ │ ├── JobSmallMapper.java
│ │ │ │ ├── MenuMapper.java
│ │ │ │ ├── RoleMapper.java
│ │ │ │ ├── RoleSmallMapper.java
│ │ │ │ └── UserMapper.java
│ │ │ └── sysrunner/
│ │ │ └── SystemRunner.java
│ │ └── resources/
│ │ ├── banner.txt
│ │ ├── config/
│ │ │ ├── application-dev.yml
│ │ │ ├── application-prod.yml
│ │ │ ├── application-quartz.yml
│ │ │ └── application.yml
│ │ ├── logback.xml
│ │ ├── spy.properties
│ │ └── template/
│ │ ├── email.ftl
│ │ └── taskAlarm.ftl
│ └── test/
│ └── java/
│ └── me/
│ └── zhengjie/
│ └── EladminSystemApplicationTests.java
├── eladmin-tools/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── zhengjie/
│ ├── config/
│ │ └── AmzS3Config.java
│ ├── domain/
│ │ ├── AlipayConfig.java
│ │ ├── EmailConfig.java
│ │ ├── LocalStorage.java
│ │ ├── S3Storage.java
│ │ ├── enums/
│ │ │ └── AliPayStatusEnum.java
│ │ └── vo/
│ │ ├── EmailVo.java
│ │ └── TradeVo.java
│ ├── repository/
│ │ ├── AliPayRepository.java
│ │ ├── EmailRepository.java
│ │ ├── LocalStorageRepository.java
│ │ └── S3StorageRepository.java
│ ├── rest/
│ │ ├── AliPayController.java
│ │ ├── EmailController.java
│ │ ├── LocalStorageController.java
│ │ └── S3StorageController.java
│ ├── service/
│ │ ├── AliPayService.java
│ │ ├── EmailService.java
│ │ ├── LocalStorageService.java
│ │ ├── S3StorageService.java
│ │ ├── dto/
│ │ │ ├── LocalStorageDto.java
│ │ │ ├── LocalStorageQueryCriteria.java
│ │ │ └── S3StorageQueryCriteria.java
│ │ ├── impl/
│ │ │ ├── AliPayServiceImpl.java
│ │ │ ├── EmailServiceImpl.java
│ │ │ ├── LocalStorageServiceImpl.java
│ │ │ └── S3StorageServiceImpl.java
│ │ └── mapstruct/
│ │ └── LocalStorageMapper.java
│ └── utils/
│ └── AlipayUtils.java
├── pom.xml
└── sql/
├── eladmin.sql
└── quartz.sql
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
### IDEA ###
.idea/*
*.iml
*/target/*
*/*.iml
/.gradle/
/application.pid
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "{}" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright 2019-2023 Zheng Jie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
<h1 style="text-align: center">ELADMIN 后台管理系统</h1>
<div style="text-align: center">
[](https://github.com/elunez/eladmin/blob/master/LICENSE)
[](https://gitee.com/elunez/eladmin)
[](https://github.com/elunez/eladmin)
[](https://github.com/elunez/eladmin)
</div>
#### 项目简介
一个基于 Spring Boot 2.7.18 、 Spring Boot Jpa、 JWT、Spring Security、Redis、Vue的前后端分离的后台管理系统
现已发布基于 mybatis-plus 版本,项目地址:[https://github.com/elunez/eladmin-mp](https://github.com/elunez/eladmin-mp)、[https://gitee.com/elunez/eladmin-mp](https://gitee.com/elunez/eladmin-mp)。
**开发文档:** [https://eladmin.vip](https://eladmin.vip)
**体验地址:** [https://eladmin.vip/demo](https://eladmin.vip/demo)
**账号密码:** `admin / 123456`
#### 项目源码
| | 后端源码 | 前端源码 |
|--- |--- | --- |
| github | https://github.com/elunez/eladmin | https://github.com/elunez/eladmin-web |
| 码云 | https://gitee.com/elunez/eladmin | https://gitee.com/elunez/eladmin-web |
#### VPS推荐
<a href="https://bwh81.net/aff.php?aff=70876" target="_blank">
<img src="https://eladmin.vip/images/banner/side.jpeg" style="width: 435px;border-radius: 2px;">
</a>
使用优惠码: `BWHCGLUKKB`,可获得 6.81% 的折扣 [查看介绍](https://bwhstock.in/)
#### 主要特性
- 使用最新技术栈,社区资源丰富。
- 高效率开发,代码生成器可一键生成前后端代码
- 支持数据字典,可方便地对一些状态进行管理
- 支持接口限流,避免恶意请求导致服务层压力过大
- 支持接口级别的功能权限与数据权限,可自定义操作
- 自定义权限注解与匿名接口注解,可快速对接口拦截与放行
- 对一些常用地前端组件封装:表格数据请求、数据字典等
- 前后端统一异常拦截处理,统一输出异常,避免繁琐的判断
- 支持在线用户管理与服务器性能监控,支持限制单用户登录
- 支持运维管理,可方便地对远程服务器的应用进行部署与管理
#### 系统功能
- 用户管理:提供用户的相关配置,新增用户后,默认密码为123456
- 角色管理:对权限与菜单进行分配,可根据部门设置角色的数据权限
- 菜单管理:已实现菜单动态路由,后端可配置化,支持多级菜单
- 部门管理:可配置系统组织架构,树形表格展示
- 岗位管理:配置各个部门的职位
- 字典管理:可维护常用一些固定的数据,如:状态,性别等
- 系统日志:记录用户操作日志与异常日志,方便开发人员定位排错
- SQL监控:采用druid 监控数据库访问性能,默认用户名admin,密码123456
- 定时任务:整合Quartz做定时任务,加入任务日志,任务运行情况一目了然
- 代码生成:高灵活度生成前后端代码,减少大量重复的工作任务
- 邮件工具:配合富文本,发送html格式的邮件
- 亚马逊S3云存储:支持市面上大多数对象存储,兼容亚马逊S3协议,如七牛云,阿里云等
- 支付宝支付:整合了支付宝支付并且提供了测试账号,可自行测试
- 服务监控:监控服务器的负载情况
- 运维管理:一键部署你的应用
#### 项目结构
项目采用按功能分模块的开发方式,结构如下
- `eladmin-common` 为系统的公共模块,各种工具类,公共配置存在该模块
- `eladmin-system` 为系统核心模块也是项目入口模块,也是最终需要打包部署的模块
- `eladmin-logging` 为系统的日志模块,其他模块如果需要记录日志需要引入该模块
- `eladmin-tools` 为第三方工具模块,包含:邮件、亚马逊S3云存储、本地存储、支付宝
- `eladmin-generator` 为系统的代码生成模块,支持生成前后端CRUD代码
#### 详细结构
```
- eladmin-common 公共模块
- annotation 为系统自定义注解
- aspect 自定义注解的切面
- base 提供了Entity、DTO基类和mapstruct的通用mapper
- config 项目通用配置
- Web配置跨域与静态资源映射、Swagger配置,文件上传临时路径配置
- Redis配置,Redission配置, 异步线程池配置
- 权限拦截配置、AuthorityConfig、Druid 删除广告配置
- exception 项目统一异常的处理
- utils 系统通用工具类,列举一些常用的工具类
- BigDecimaUtils 金额计算工具类
- RequestHolder 请求工具类
- SecurityUtils 安全工具类
- StringUtils 字符串工具类
- SpringBeanHolder Spring Bean工具类
- RedisUtils Redis工具类
- EncryptUtils 加密工具类
- FileUtil 文件工具类
- eladmin-system 系统核心模块(系统启动入口)
- sysrunner 程序启动后处理数据
- modules 系统相关模块(登录授权、系统监控、定时任务、系统模块、运维模块)
- eladmin-logging 系统日志模块
- eladmin-tools 系统第三方工具模块
- email 邮件工具
- amazon 亚马逊S3云存储工具
- alipay 支付宝支付工具
- local-storage 本地存储工具
- eladmin-generator 系统代码生成模块
```
#### 特别鸣谢
- 感谢 [PanJiaChen](https://github.com/PanJiaChen/vue-element-admin) 大佬提供的前端模板
- 感谢 [Moxun](https://github.com/moxun1639) 大佬提供的前端 Curd 通用组件
- 感谢 [zhy6599](https://gitee.com/zhy6599) 大佬提供的后端运维管理相关功能
- 感谢 [j.yao.SUSE](https://github.com/everhopingandwaiting) 大佬提供的匿名接口与Redis限流等功能
- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
#### 项目捐赠
项目的发展离不开你的支持,请作者喝杯咖啡吧☕ [Donate](https://eladmin.vip/pages/030101/)
#### 反馈交流
- QQ交流群:891137268 、947578238、659622532
================================================
FILE: eladmin-common/pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>eladmin</artifactId>
<groupId>me.zhengjie</groupId>
<version>2.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<hutool.version>5.8.35</hutool.version>
</properties>
<artifactId>eladmin-common</artifactId>
<name>公共模块</name>
<dependencies>
<!--工具包-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
</dependencies>
</project>
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/DataPermission.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* <p>
* 用于判断是否过滤数据权限
* 1、如果没有用到 @OneToOne 这种关联关系,只需要填写 fieldName [参考:DeptQueryCriteria.class]
* 2、如果用到了 @OneToOne ,fieldName 和 joinName 都需要填写,拿UserQueryCriteria.class举例:
* 应该是 @DataPermission(joinName = "dept", fieldName = "id")
* </p>
* @author Zheng Jie
* @website <a href="https://eladmin.vip">...</a>
* @date 2020-05-07
**/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface DataPermission {
/**
* Entity 中的字段名称
*/
String fieldName() default "";
/**
* Entity 中与部门关联的字段名称
*/
String joinName() default "";
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation;
import me.zhengjie.aspect.LimitType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author jacky
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Limit {
// 资源名称,用于描述接口功能
String name() default "";
// 资源 key
String key() default "";
// key prefix
String prefix() default "";
// 时间的,单位秒
int period();
// 限制访问次数
int count();
// 限制类型
LimitType limitType() default LimitType.CUSTOMER;
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/Query.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Zheng Jie
* @date 2019-6-4 13:52:30
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Query {
// Dong ZhaoYang 2017/8/7 基本对象的属性名
String propName() default "";
// Dong ZhaoYang 2017/8/7 查询方式
Type type() default Type.EQUAL;
/**
* 连接查询的属性名,如User类中的dept
*/
String joinName() default "";
/**
* 默认左连接
*/
Join join() default Join.LEFT;
/**
* 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username")
*/
String blurry() default "";
enum Type {
// jie 2019/6/4 相等
EQUAL
// Dong ZhaoYang 2017/8/7 大于等于
, GREATER_THAN
// Dong ZhaoYang 2017/8/7 小于等于
, LESS_THAN
// Dong ZhaoYang 2017/8/7 中模糊查询
, INNER_LIKE
// Dong ZhaoYang 2017/8/7 左模糊查询
, LEFT_LIKE
// Dong ZhaoYang 2017/8/7 右模糊查询
, RIGHT_LIKE
// Dong ZhaoYang 2017/8/7 小于
, LESS_THAN_NQ
// jie 2019/6/4 包含
, IN
// 不包含
, NOT_IN
// 不等于
,NOT_EQUAL
// between
,BETWEEN
// 不为空
,NOT_NULL
// 为空
,IS_NULL,
// Aborn Jiang 2022/06/01, 对应SQL: SELECT * FROM table WHERE FIND_IN_SET('querytag', table.tags);
FIND_IN_SET
}
/**
* @author Zheng Jie
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
*/
enum Join {
/** jie 2019-6-4 13:18:30 */
LEFT, RIGHT, INNER
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousAccess.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.*;
/**
* @author jacky
* 用于标记匿名访问方法
*/
@Inherited
@Documented
@Target({ElementType.METHOD,ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface AnonymousAccess {
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java
================================================
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Annotation for mapping HTTP {@code DELETE} requests onto specific handler
* methods.
* 支持匿名访问 DeleteMapping
*
* @author liaojinlong
* @see AnonymousGetMapping
* @see AnonymousPostMapping
* @see AnonymousPutMapping
* @see AnonymousPatchMapping
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.DELETE)
public @interface AnonymousDeleteMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java
================================================
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Annotation for mapping HTTP {@code GET} requests onto specific handler
* methods.
* <p>
* 支持匿名访问 GetMapping
*
* @author liaojinlong
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.GET)
public @interface AnonymousGetMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*
* @since 4.3.5
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java
================================================
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Annotation for mapping HTTP {@code PATCH} requests onto specific handler
* methods.
* * 支持匿名访问 PatchMapping
*
* @author liaojinlong
* @see AnonymousGetMapping
* @see AnonymousPostMapping
* @see AnonymousPutMapping
* @see AnonymousDeleteMapping
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.PATCH)
public @interface AnonymousPatchMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java
================================================
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Annotation for mapping HTTP {@code POST} requests onto specific handler
* methods.
* 支持匿名访问 PostMapping
*
* @author liaojinlong
* @see AnonymousGetMapping
* @see AnonymousPostMapping
* @see AnonymousPutMapping
* @see AnonymousDeleteMapping
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.POST)
public @interface AnonymousPostMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java
================================================
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.annotation.rest;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
* Annotation for mapping HTTP {@code PUT} requests onto specific handler
* methods.
* * 支持匿名访问 PutMapping
*
* @author liaojinlong
* @see AnonymousGetMapping
* @see AnonymousPostMapping
* @see AnonymousPutMapping
* @see AnonymousDeleteMapping
* @see RequestMapping
*/
@AnonymousAccess
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping(method = RequestMethod.PUT)
public @interface AnonymousPutMapping {
/**
* Alias for {@link RequestMapping#name}.
*/
@AliasFor(annotation = RequestMapping.class)
String name() default "";
/**
* Alias for {@link RequestMapping#value}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] value() default {};
/**
* Alias for {@link RequestMapping#path}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
/**
* Alias for {@link RequestMapping#params}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] params() default {};
/**
* Alias for {@link RequestMapping#headers}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.aspect;
import cn.hutool.core.util.ObjUtil;
import com.google.common.collect.ImmutableList;
import me.zhengjie.annotation.Limit;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.utils.RequestHolder;
import me.zhengjie.utils.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.data.redis.core.script.RedisScript;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
/**
* @author /
*/
@Aspect
@Component
public class LimitAspect {
private final RedisTemplate<Object,Object> redisTemplate;
private static final Logger logger = LoggerFactory.getLogger(LimitAspect.class);
public LimitAspect(RedisTemplate<Object,Object> redisTemplate) {
this.redisTemplate = redisTemplate;
}
@Pointcut("@annotation(me.zhengjie.annotation.Limit)")
public void pointcut() {
}
@Around("pointcut()")
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
HttpServletRequest request = RequestHolder.getHttpServletRequest();
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method signatureMethod = signature.getMethod();
Limit limit = signatureMethod.getAnnotation(Limit.class);
LimitType limitType = limit.limitType();
String key = limit.key();
if (StringUtils.isEmpty(key)) {
if (limitType == LimitType.IP) {
key = StringUtils.getIp(request);
} else {
key = signatureMethod.getName();
}
}
ImmutableList<Object> keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replace("/","_")));
String luaScript = buildLuaScript();
RedisScript<Long> redisScript = new DefaultRedisScript<>(luaScript, Long.class);
Long count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period());
if (ObjUtil.isNotNull(count) && count.intValue() <= limit.count()) {
logger.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name());
return joinPoint.proceed();
} else {
throw new BadRequestException("访问次数受限制");
}
}
/**
* 限流脚本
*/
private String buildLuaScript() {
return "local c" +
"\nc = redis.call('get',KEYS[1])" +
"\nif c and tonumber(c) > tonumber(ARGV[1]) then" +
"\nreturn c;" +
"\nend" +
"\nc = redis.call('incr',KEYS[1])" +
"\nif tonumber(c) == 1 then" +
"\nredis.call('expire',KEYS[1],ARGV[2])" +
"\nend" +
"\nreturn c;";
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.aspect;
/**
* 限流枚举
* @author /
*/
public enum LimitType {
// 默认
CUSTOMER,
// by ip addr
IP
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java
================================================
package me.zhengjie.base;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.sql.Timestamp;
/**
* @author Zheng Jie
* @date 2019年10月24日20:48:53
*/
@Getter
@Setter
public class BaseDTO implements Serializable {
@ApiModelProperty(value = "创建人")
private String createBy;
@ApiModelProperty(value = "修改人")
private String updateBy;
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp createTime;
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp updateTime;
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
Field[] fields = this.getClass().getDeclaredFields();
try {
for (Field f : fields) {
f.setAccessible(true);
builder.append(f.getName(), f.get(this)).append("\n");
}
} catch (Exception e) {
builder.append("toString builder encounter an error");
}
return builder.toString();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.base;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.sql.Timestamp;
/**
* 通用字段, is_del 根据需求自行添加
* @author Zheng Jie
* @date 2019年10月24日20:46:32
*/
@Getter
@Setter
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class BaseEntity implements Serializable {
@CreatedBy
@Column(name = "create_by", updatable = false)
@ApiModelProperty(value = "创建人", hidden = true)
private String createBy;
@LastModifiedBy
@Column(name = "update_by")
@ApiModelProperty(value = "更新人", hidden = true)
private String updateBy;
@CreationTimestamp
@Column(name = "create_time", updatable = false)
@ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp createTime;
@UpdateTimestamp
@Column(name = "update_time")
@ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp updateTime;
/* 分组校验 */
public @interface Create {}
/* 分组校验 */
public @interface Update {}
@Override
public String toString() {
ToStringBuilder builder = new ToStringBuilder(this);
Field[] fields = this.getClass().getDeclaredFields();
try {
for (Field f : fields) {
f.setAccessible(true);
builder.append(f.getName(), f.get(this)).append("\n");
}
} catch (Exception e) {
builder.append("toString builder encounter an error");
}
return builder.toString();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.base;
import java.util.List;
/**
* @author Zheng Jie
* @date 2018-11-23
*/
public interface BaseMapper<D, E> {
/**
* DTO转Entity
* @param dto /
* @return /
*/
E toEntity(D dto);
/**
* Entity转DTO
* @param entity /
* @return /
*/
D toDto(E entity);
/**
* DTO集合转Entity集合
* @param dtoList /
* @return /
*/
List <E> toEntity(List<D> dtoList);
/**
* Entity集合转DTO集合
* @param entityList /
* @return /
*/
List <D> toDto(List<E> entityList);
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/AsyncExecutor.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 创建自定义的线程池
* @author Zheng Jie
* @description
* @date 2023-06-08
**/
@EnableAsync
@Configuration
public class AsyncExecutor implements AsyncConfigurer {
public static int corePoolSize;
public static int maxPoolSize;
public static int keepAliveSeconds;
public static int queueCapacity;
@Value("${task.pool.core-pool-size}")
public void setCorePoolSize(int corePoolSize) {
AsyncExecutor.corePoolSize = corePoolSize;
}
@Value("${task.pool.max-pool-size}")
public void setMaxPoolSize(int maxPoolSize) {
AsyncExecutor.maxPoolSize = maxPoolSize;
}
@Value("${task.pool.keep-alive-seconds}")
public void setKeepAliveSeconds(int keepAliveSeconds) {
AsyncExecutor.keepAliveSeconds = keepAliveSeconds;
}
@Value("${task.pool.queue-capacity}")
public void setQueueCapacity(int queueCapacity) {
AsyncExecutor.queueCapacity = queueCapacity;
}
/**
* 定义自定义异步处理线程池,线程名的标号自增计数器
*/
private static AtomicInteger atomicInteger = new AtomicInteger(1);
/**
* 自定义线程池,用法 @Async
* @return Executor
*/
@Override
public Executor getAsyncExecutor() {
// 自定义工厂
ThreadFactory factory = r -> new Thread(r, "el-async-" + atomicInteger.getAndIncrement());
// 自定义线程池
return new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveSeconds,
TimeUnit.SECONDS, new ArrayBlockingQueue<>(queueCapacity), factory,
new ThreadPoolExecutor.CallerRunsPolicy());
}
/**
* 自定义线程池,用法,注入到类中使用
* private ThreadPoolTaskExecutor taskExecutor;
* @return ThreadPoolTaskExecutor
*/
@Bean("taskAsync")
public ThreadPoolTaskExecutor taskAsync() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(2);
executor.setMaxPoolSize(4);
executor.setQueueCapacity(20);
executor.setKeepAliveSeconds(60);
executor.setThreadNamePrefix("el-task-");
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
return executor;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
import java.util.Optional;
/**
* @description : 设置审计
* @author : Dong ZhaoYang
* @date : 2019/10/28
*/
@Component("auditorAware")
public class AuditorConfig implements AuditorAware<String> {
/**
* 返回操作员标志信息
*
* @return /
*/
@Override
public Optional<String> getCurrentAuditor() {
try {
// 这里应根据实际业务情况获取具体信息
return Optional.of(SecurityUtils.getCurrentUsername());
}catch (Exception ignored){}
// 用户定时任务,或者无Token调用的情况
return Optional.of("System");
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Zheng Jie
*/
@Service(value = "el")
public class AuthorityConfig {
/**
* 判断接口是否有权限
* @param permissions 权限
* @return /
*/
public Boolean check(String ...permissions){
// 获取当前用户的所有权限
List<String> elPermissions = SecurityUtils.getCurrentUser().getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList());
// 判断当前用户的所有权限是否包含接口上定义的权限
return elPermissions.contains("admin") || Arrays.stream(permissions).anyMatch(elPermissions::contains);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/CustomP6SpyLogger.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import cn.hutool.core.util.StrUtil;
import com.p6spy.engine.spy.appender.MessageFormattingStrategy;
import lombok.extern.slf4j.Slf4j;
/**
* @author Zheng Jie
* @description 自定义 p6spy sql输出格式
* @date 2024-12-26
**/
@Slf4j
public class CustomP6SpyLogger implements MessageFormattingStrategy {
// 重置颜色
private static final String RESET = "\u001B[0m";
// 红色
private static final String RED = "\u001B[31m";
// 绿色
private static final String GREEN = "\u001B[32m";
/**
* 格式化 sql
* @param connectionId 连接id
* @param now 当前时间
* @param elapsed 执行时长
* @param category sql分类
* @param prepared 预编译sql
* @param sql 执行sql
* @param url 数据库连接url
* @return 格式化后的sql
*/
@Override
public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) {
// 去掉换行和多余空格
if(StrUtil.isNotBlank(sql)){
sql = sql.replaceAll("\\s+", " ").trim();
}
// 格式化并加上颜色
return String.format(
"%s[Time: %dms]%s - %s%s%s;",
GREEN, elapsed, RESET, RED, sql, RESET
);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONFactory;
import com.alibaba.fastjson2.JSONWriter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.MurmurHash3;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.Cache;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.cache.interceptor.SimpleCacheErrorHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheConfiguration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
/**
* @author Zheng Jie
* @date 2025-01-13
*/
@Slf4j
@Configuration
@EnableCaching
@AutoConfigureBefore(RedisAutoConfiguration.class)
public class RedisConfiguration extends CachingConfigurerSupport {
// 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
private static final String[] WHITELIST_STR = {"me.zhengjie" };
/**
* 设置 redis 数据默认过期时间,默认2小时
* 设置@cacheable 序列化方式
*/
@Bean
public RedisCacheConfiguration redisCacheConfiguration(){
FastJsonRedisSerializer<Object> fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class);
RedisCacheConfiguration configuration = RedisCacheConfiguration.defaultCacheConfig();
configuration = configuration.serializeValuesWith(RedisSerializationContext.
SerializationPair.fromSerializer(fastJsonRedisSerializer)).entryTtl(Duration.ofHours(2));
return configuration;
}
@Bean(name = "redisTemplate")
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate<Object, Object> template = new RedisTemplate<>();
// 指定 key 和 value 的序列化方案
FastJsonRedisSerializer<Object> fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class);
// value值的序列化采用fastJsonRedisSerializer
template.setValueSerializer(fastJsonRedisSerializer);
template.setHashValueSerializer(fastJsonRedisSerializer);
// 设置fastJson的序列化白名单
for (String pack : WHITELIST_STR) {
JSONFactory.getDefaultObjectReaderProvider().addAutoTypeAccept(pack);
}
// key的序列化采用StringRedisSerializer
template.setKeySerializer(new StringRedisSerializer());
template.setHashKeySerializer(new StringRedisSerializer());
template.setConnectionFactory(redisConnectionFactory);
return template;
}
/**
* 缓存管理器
* @param redisConnectionFactory /
* @return 缓存管理器
*/
@Bean
public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) {
RedisCacheConfiguration config = redisCacheConfiguration();
return RedisCacheManager.builder(redisConnectionFactory)
.cacheDefaults(config)
.build();
}
/**
* 自定义缓存key生成策略
*/
@Bean
public KeyGenerator keyGenerator() {
return (target, method, params) -> {
Map<String,Object> container = new HashMap<>(8);
Class<?> targetClassClass = target.getClass();
// 类地址
container.put("class",targetClassClass.toGenericString());
// 方法名称
container.put("methodName",method.getName());
// 包名称
container.put("package",targetClassClass.getPackage());
// 参数列表
for (int i = 0; i < params.length; i++) {
container.put(String.valueOf(i),params[i]);
}
// 转为JSON字符串
String jsonString = JSON.toJSONString(container);
// 使用 MurmurHash 生成 hash
return Integer.toHexString(MurmurHash3.hash32x86(jsonString.getBytes()));
};
}
@Bean
@SuppressWarnings({"unchecked","all"})
public CacheErrorHandler errorHandler() {
return new SimpleCacheErrorHandler() {
@Override
public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
// 处理缓存读取错误
log.error("Cache Get Error: {}",exception.getMessage());
}
@Override
public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
// 处理缓存写入错误
log.error("Cache Put Error: {}",exception.getMessage());
}
@Override
public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
// 处理缓存删除错误
log.error("Cache Evict Error: {}",exception.getMessage());
}
@Override
public void handleCacheClearError(RuntimeException exception, Cache cache) {
// 处理缓存清除错误
log.error("Cache Clear Error: {}",exception.getMessage());
}
};
}
/**
* Value 序列化
*
* @param <T>
* @author /
*/
static class FastJsonRedisSerializer<T> implements RedisSerializer<T> {
private final Class<T> clazz;
FastJsonRedisSerializer(Class<T> clazz) {
super();
this.clazz = clazz;
}
@Override
public byte[] serialize(T t) throws SerializationException
{
if (t == null) {
return new byte[0];
}
return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(StandardCharsets.UTF_8);
}
@Override
public T deserialize(byte[] bytes) throws SerializationException
{
if (bytes == null || bytes.length == 0) {
return null;
}
String str = new String(bytes, StandardCharsets.UTF_8);
return JSON.parseObject(str, clazz);
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/RedissonConfiguration.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config;
import cn.hutool.core.util.StrUtil;
import lombok.Data;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Data
@Configuration
@AutoConfigureBefore(RedisAutoConfiguration.class)
public class RedissonConfiguration {
@Value("${spring.redis.host}")
private String redisHost;
@Value("${spring.redis.port}")
private int redisPort;
@Value("${spring.redis.database}")
private int redisDatabase;
@Value("${spring.redis.password:}")
private String redisPassword;
@Value("${spring.redis.timeout:5000}")
private int timeout;
@Value("${spring.redis.lettuce.pool.max-active:64}")
private int connectionPoolSize;
@Value("${spring.redis.lettuce.pool.min-idle:16}")
private int connectionMinimumIdleSize;
@Bean
public RedissonClient redissonClient() {
Config config = new Config();
config.useSingleServer()
.setAddress("redis://" + redisHost + ":" + redisPort)
.setDatabase(redisDatabase)
.setTimeout(timeout)
.setConnectionPoolSize(connectionPoolSize)
.setConnectionMinimumIdleSize(connectionMinimumIdleSize);
if(StrUtil.isNotBlank(redisPassword)){
config.useSingleServer().setPassword(redisPassword);
}
return Redisson.create(config);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java
================================================
package me.zhengjie.config;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
import com.alibaba.druid.util.Utils;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author Zheng Jie
* @description
* @date 2025-01-11
**/
@Configuration
@SuppressWarnings({"unchecked","all"})
@ConditionalOnWebApplication
@AutoConfigureAfter(DruidDataSourceAutoConfigure.class)
@ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled",
havingValue = "true", matchIfMissing = true)
public class RemoveDruidAdConfig {
/**
* 方法名: removeDruidAdFilterRegistrationBean
* 方法描述 除去页面底部的广告
* @param properties com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties
* @return org.springframework.boot.web.servlet.FilterRegistrationBean
*/
@Bean
public FilterRegistrationBean removeDruidAdFilterRegistrationBean(DruidStatProperties properties) {
// 获取web监控页面的参数
DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
// 提取common.js的配置路径
String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*";
String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
final String filePath = "support/http/resources/js/common.js";
//创建filter进行过滤
Filter filter = new Filter() {
@Override
public void init(FilterConfig filterConfig) throws ServletException {}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
if (httpRequest.getRequestURI().endsWith("js/common.js")) {
// 获取common.js
String text = Utils.readFromResource(filePath);
// 正则替换banner, 除去底部的广告信息
text = text.replaceAll("<a.*?druid_banner\"></a><br/>", "");
text = text.replaceAll("powered by.*?shrek.wang</a>", "");
httpResponse.setContentType("application/javascript");
httpResponse.setCharacterEncoding("UTF-8");
httpResponse.getWriter().write(text);
} else {
chain.doFilter(request, response);
}
}
@Override
public void destroy() {}
};
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(filter);
registrationBean.addUrlPatterns(commonJsPattern);
return registrationBean;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/properties/FileProperties.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.properties;
import lombok.Data;
import me.zhengjie.utils.ElConstant;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @author Zheng Jie
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "file")
public class FileProperties {
/** 文件大小限制 */
private Long maxSize;
/** 头像大小限制 */
private Long avatarMaxSize;
private ElPath mac;
private ElPath linux;
private ElPath windows;
public ElPath getPath(){
String os = System.getProperty("os.name");
if(os.toLowerCase().startsWith(ElConstant.WIN)) {
return windows;
} else if(os.toLowerCase().startsWith(ElConstant.MAC)){
return mac;
}
return linux;
}
@Data
public static class ElPath{
private String path;
private String avatar;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/properties/RsaProperties.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.properties;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* @author Zheng Jie
* @website https://eladmin.vip
* @description
* @date 2020-05-18
**/
@Data
@Component
public class RsaProperties {
public static String privateKey;
@Value("${rsa.private_key}")
public void setPrivateKey(String privateKey) {
RsaProperties.privateKey = privateKey;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/ConfigurerAdapter.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.webConfig;
import com.alibaba.fastjson2.JSONWriter;
import com.alibaba.fastjson2.support.config.FastJsonConfig;
import com.alibaba.fastjson2.support.spring.http.converter.FastJsonHttpMessageConverter;
import me.zhengjie.config.properties.FileProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* WebMvcConfigurer
*
* @author Zheng Jie
* @date 2018-11-30
*/
@Configuration
@EnableWebMvc
public class ConfigurerAdapter implements WebMvcConfigurer {
/** 文件配置 */
private final FileProperties properties;
public ConfigurerAdapter(FileProperties properties) {
this.properties = properties;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOriginPattern("*");
config.addAllowedHeader("*");
config.addAllowedMethod("*");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
FileProperties.ElPath path = properties.getPath();
String avatarUtl = "file:" + path.getAvatar().replace("\\","/");
String pathUtl = "file:" + path.getPath().replace("\\","/");
registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0);
registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0);
registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0);
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// 配置 FastJsonHttpMessageConverter
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
List<MediaType> supportMediaTypeList = new ArrayList<>();
supportMediaTypeList.add(MediaType.APPLICATION_JSON);
FastJsonConfig config = new FastJsonConfig();
config.setDateFormat("yyyy-MM-dd HH:mm:ss");
// 开启引用检测
config.setWriterFeatures(JSONWriter.Feature.ReferenceDetection);
converter.setFastJsonConfig(config);
converter.setSupportedMediaTypes(supportMediaTypeList);
converter.setDefaultCharset(StandardCharsets.UTF_8);
converters.add(converter);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/MultipartConfig.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.webConfig;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.MultipartConfigElement;
import java.io.File;
/**
* @date 2018-12-28
* @author <a href="https://blog.csdn.net/llibin1024530411/article/details/79474953">...</a>
*/
@Configuration
public class MultipartConfig {
/**
* 文件上传临时路径
*/
@Bean
MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
String location = System.getProperty("user.home") + "/.eladmin/file/tmp";
File tmpFile = new File(location);
if (!tmpFile.exists()) {
if (!tmpFile.mkdirs()) {
System.out.println("create was not successful.");
}
}
factory.setLocation(location);
return factory.createMultipartConfig();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/QueryCustomizer.java
================================================
/*
* Copyright 2019-2023 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.webConfig;
import org.apache.catalina.connector.Connector;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.context.annotation.Configuration;
/**
* @author bearBoy80
*/
@Configuration(proxyBeanMethods = false)
public class QueryCustomizer implements TomcatConnectorCustomizer {
@Override
public void customize(Connector connector) {
connector.setProperty("relaxedQueryChars", "[]{}");
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerConfig.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.webConfig;
import lombok.RequiredArgsConstructor;
import me.zhengjie.utils.AnonTagUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.ReflectionUtils;
import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.service.SecurityScheme;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* api页面 /doc.html
* @author Zheng Jie
* @date 2018-11-23
*/
@Configuration
@EnableSwagger2
@RequiredArgsConstructor
public class SwaggerConfig {
@Value("${jwt.header}")
private String tokenHeader;
@Value("${swagger.enabled}")
private Boolean enabled;
@Value("${server.servlet.context-path:}")
private String apiPath;
private final ApplicationContext applicationContext;
@Bean
@SuppressWarnings({"unchecked","all"})
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.enable(enabled)
.pathMapping("/")
.apiInfo(apiInfo())
.select()
.paths(PathSelectors.regex("^(?!/error).*"))
.paths(PathSelectors.any())
.build()
//添加登陆认证
.securitySchemes(securitySchemes())
.securityContexts(securityContexts());
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.description("一个简单且易上手的 Spring boot 后台管理框架")
.title("ELADMIN 接口文档")
.version("2.7")
.build();
}
private List<SecurityScheme> securitySchemes() {
//设置请求头信息
List<SecurityScheme> securitySchemes = new ArrayList<>();
ApiKey apiKey = new ApiKey(tokenHeader, tokenHeader, "header");
securitySchemes.add(apiKey);
return securitySchemes;
}
private List<SecurityContext> securityContexts() {
//设置需要登录认证的路径
List<SecurityContext> securityContexts = new ArrayList<>();
securityContexts.add(getContextByPath());
return securityContexts;
}
private SecurityContext getContextByPath() {
Set<String> urls = AnonTagUtils.getAllAnonymousUrl(applicationContext);
urls = urls.stream().filter(url -> !url.equals("/")).collect(Collectors.toSet());
String regExp = "^(?!" + apiPath + String.join("|" + apiPath, urls) + ").*$";
return SecurityContext.builder()
.securityReferences(defaultAuth())
.operationSelector(o->o.requestMappingPattern()
// 排除不需要认证的接口
.matches(regExp))
.build();
}
private List<SecurityReference> defaultAuth() {
List<SecurityReference> securityReferences = new ArrayList<>();
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
securityReferences.add(new SecurityReference(tokenHeader, authorizationScopes));
return securityReferences;
}
/**
* 解决Springfox与SpringBoot集成后,WebMvcRequestHandlerProvider和WebFluxRequestHandlerProvider冲突问题
* @return /
*/
@Bean
@SuppressWarnings({"all"})
public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
return new BeanPostProcessor() {
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
}
return bean;
}
private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
List<T> filteredMappings = mappings.stream()
.filter(mapping -> mapping.getPatternParser() == null)
.collect(Collectors.toList());
mappings.clear();
mappings.addAll(filteredMappings);
}
private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
if (field != null) {
field.setAccessible(true);
try {
return (List<RequestMappingInfoHandlerMapping>) field.get(bean);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Failed to access handlerMappings field", e);
}
}
return Collections.emptyList();
}
};
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerDataConfig.java
================================================
package me.zhengjie.config.webConfig;
import cn.hutool.core.collection.CollUtil;
import com.fasterxml.classmate.TypeResolver;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.data.domain.Pageable;
import springfox.documentation.schema.AlternateTypeRule;
import springfox.documentation.schema.AlternateTypeRuleConvention;
import java.util.List;
import static springfox.documentation.schema.AlternateTypeRules.newRule;
/**
* 将Pageable转换展示在swagger中
*/
@Configuration
public class SwaggerDataConfig {
@Bean
public AlternateTypeRuleConvention pageableConvention(final TypeResolver resolver) {
return new AlternateTypeRuleConvention() {
@Override
public int getOrder() {
return Ordered.HIGHEST_PRECEDENCE;
}
@Override
public List<AlternateTypeRule> rules() {
return CollUtil.newArrayList(newRule(resolver.resolve(Pageable.class), resolver.resolve(Page.class)));
}
};
}
@ApiModel
@Data
private static class Page {
@ApiModelProperty("页码 (0..N)")
private Integer page;
@ApiModelProperty("每页显示的数目")
private Integer size;
@ApiModelProperty("以下列格式排序标准:property[,asc | desc]。 默认排序顺序为升序。 支持多种排序条件:如:id,asc")
private List<String> sort;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.config.webConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
/**
* @author ZhangHouYing
* @date 2019-08-24 15:44
*/
@Configuration
public class WebSocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.exception;
import lombok.Getter;
import org.springframework.http.HttpStatus;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
/**
* @author Zheng Jie
* @date 2018-11-23
* 统一异常处理
*/
@Getter
public class BadRequestException extends RuntimeException{
private Integer status = BAD_REQUEST.value();
public BadRequestException(String msg){
super(msg);
}
public BadRequestException(HttpStatus status,String msg){
super(msg);
this.status = status.value();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.exception;
import org.springframework.util.StringUtils;
/**
* @author Zheng Jie
* @date 2018-11-23
*/
public class EntityExistException extends RuntimeException {
public EntityExistException(Class clazz, String field, String val) {
super(EntityExistException.generateMessage(clazz.getSimpleName(), field, val));
}
private static String generateMessage(String entity, String field, String val) {
return StringUtils.capitalize(entity)
+ " with " + field + " "+ val + " existed";
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.exception;
import org.springframework.util.StringUtils;
/**
* @author Zheng Jie
* @date 2018-11-23
*/
public class EntityNotFoundException extends RuntimeException {
public EntityNotFoundException(Class clazz, String field, String val) {
super(EntityNotFoundException.generateMessage(clazz.getSimpleName(), field, val));
}
private static String generateMessage(String entity, String field, String val) {
return StringUtils.capitalize(entity)
+ " with " + field + " "+ val + " does not exist";
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.exception.handler;
import lombok.Data;
/**
* @author Zheng Jie
* @date 2018-11-23
*/
@Data
public class ApiError {
private Integer status = 400;
private Long timestamp;
private String message;
private ApiError() {
timestamp = System.currentTimeMillis();
}
public static ApiError error(String message){
ApiError apiError = new ApiError();
apiError.setMessage(message);
return apiError;
}
public static ApiError error(Integer status, String message){
ApiError apiError = new ApiError();
apiError.setStatus(status);
apiError.setMessage(message);
return apiError;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.exception.handler;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
import me.zhengjie.exception.EntityNotFoundException;
import me.zhengjie.utils.ThrowableUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import static org.springframework.http.HttpStatus.*;
/**
* @author Zheng Jie
* @date 2018-11-23
*/
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {
/**
* 处理所有不可知的异常
*/
@ExceptionHandler(Throwable.class)
public ResponseEntity<ApiError> handleException(Throwable e){
// 打印堆栈信息
log.error(ThrowableUtil.getStackTrace(e));
return buildResponseEntity(ApiError.error(e.getMessage()));
}
/**
* BadCredentialsException
*/
@ExceptionHandler(BadCredentialsException.class)
public ResponseEntity<ApiError> badCredentialsException(BadCredentialsException e){
// 打印堆栈信息
String message = "坏的凭证".equals(e.getMessage()) ? "用户名或密码不正确" : e.getMessage();
log.error(message);
return buildResponseEntity(ApiError.error(message));
}
/**
* 处理自定义异常
*/
@ExceptionHandler(value = BadRequestException.class)
public ResponseEntity<ApiError> badRequestException(BadRequestException e) {
// 打印堆栈信息
log.error(ThrowableUtil.getStackTrace(e));
return buildResponseEntity(ApiError.error(e.getStatus(),e.getMessage()));
}
/**
* 处理 EntityExist
*/
@ExceptionHandler(value = EntityExistException.class)
public ResponseEntity<ApiError> entityExistException(EntityExistException e) {
// 打印堆栈信息
log.error(ThrowableUtil.getStackTrace(e));
return buildResponseEntity(ApiError.error(e.getMessage()));
}
/**
* 处理 EntityNotFound
*/
@ExceptionHandler(value = EntityNotFoundException.class)
public ResponseEntity<ApiError> entityNotFoundException(EntityNotFoundException e) {
// 打印堆栈信息
log.error(ThrowableUtil.getStackTrace(e));
return buildResponseEntity(ApiError.error(NOT_FOUND.value(),e.getMessage()));
}
/**
* 处理所有接口数据验证异常
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<ApiError> handleMethodArgumentNotValidException(MethodArgumentNotValidException e){
// 打印堆栈信息
log.error(ThrowableUtil.getStackTrace(e));
ObjectError objectError = e.getBindingResult().getAllErrors().get(0);
String message = objectError.getDefaultMessage();
if (objectError instanceof FieldError) {
message = ((FieldError) objectError).getField() + ": " + message;
}
return buildResponseEntity(ApiError.error(message));
}
/**
* 统一返回
*/
private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) {
return new ResponseEntity<>(apiError, HttpStatus.valueOf(apiError.getStatus()));
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/AnonTagUtils.java
================================================
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import me.zhengjie.annotation.rest.AnonymousAccess;
import me.zhengjie.utils.enums.RequestMethodEnum;
import org.springframework.context.ApplicationContext;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import java.util.*;
/**
* @author Zheng Jie
* @description 匿名标记工具
* @date 2025-01-13
**/
public class AnonTagUtils {
/**
* 获取匿名标记的URL
* @param applicationContext /
* @return /
*/
public static Map<String, Set<String>> getAnonymousUrl(ApplicationContext applicationContext){
RequestMappingHandlerMapping requestMappingHandlerMapping = (RequestMappingHandlerMapping) applicationContext.getBean("requestMappingHandlerMapping");
Map<RequestMappingInfo, HandlerMethod> handlerMethodMap = requestMappingHandlerMapping.getHandlerMethods();
Map<String, Set<String>> anonymousUrls = new HashMap<>(8);
// 获取匿名标记
Set<String> get = new HashSet<>();
Set<String> post = new HashSet<>();
Set<String> put = new HashSet<>();
Set<String> patch = new HashSet<>();
Set<String> delete = new HashSet<>();
Set<String> all = new HashSet<>();
for (Map.Entry<RequestMappingInfo, HandlerMethod> infoEntry : handlerMethodMap.entrySet()) {
HandlerMethod handlerMethod = infoEntry.getValue();
AnonymousAccess anonymousAccess = handlerMethod.getMethodAnnotation(AnonymousAccess.class);
if (null != anonymousAccess) {
List<RequestMethod> requestMethods = new ArrayList<>(infoEntry.getKey().getMethodsCondition().getMethods());
RequestMethodEnum request = RequestMethodEnum.find(requestMethods.isEmpty() ? RequestMethodEnum.ALL.getType() : requestMethods.get(0).name());
if (infoEntry.getKey().getPatternsCondition()!=null) {
switch (Objects.requireNonNull(request)) {
case GET:
get.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
case POST:
post.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
case PUT:
put.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
case PATCH:
patch.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
case DELETE:
delete.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
default:
all.addAll(infoEntry.getKey().getPatternsCondition().getPatterns());
break;
}
}
}
}
anonymousUrls.put(RequestMethodEnum.GET.getType(), get);
anonymousUrls.put(RequestMethodEnum.POST.getType(), post);
anonymousUrls.put(RequestMethodEnum.PUT.getType(), put);
anonymousUrls.put(RequestMethodEnum.PATCH.getType(), patch);
anonymousUrls.put(RequestMethodEnum.DELETE.getType(), delete);
anonymousUrls.put(RequestMethodEnum.ALL.getType(), all);
return anonymousUrls;
}
/**
* 获取所有匿名标记的URL
* @param applicationContext /
* @return /
*/
public static Set<String> getAllAnonymousUrl(ApplicationContext applicationContext){
Set<String> allUrl = new HashSet<>();
Map<String, Set<String>> anonymousUrls = getAnonymousUrl(applicationContext);
for (String key : anonymousUrls.keySet()) {
allUrl.addAll(anonymousUrls.get(key));
}
return allUrl;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/BigDecimalUtils.java
================================================
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* @author Zheng Jie
* @description 计算类
* @date 2024-12-27
**/
public class BigDecimalUtils {
/**
* 将对象转换为 BigDecimal
* @param obj 输入对象
* @return 转换后的 BigDecimal
*/
private static BigDecimal toBigDecimal(Object obj) {
if (obj instanceof BigDecimal) {
return (BigDecimal) obj;
} else if (obj instanceof Long) {
return BigDecimal.valueOf((Long) obj);
} else if (obj instanceof Integer) {
return BigDecimal.valueOf((Integer) obj);
} else if (obj instanceof Double) {
return new BigDecimal(String.valueOf(obj));
} else {
throw new IllegalArgumentException("Unsupported type");
}
}
/**
* 加法
* @param a 加数
* @param b 加数
* @return 两个加数的和,保留两位小数
*/
public static BigDecimal add(Object a, Object b) {
BigDecimal bdA = toBigDecimal(a);
BigDecimal bdB = toBigDecimal(b);
return bdA.add(bdB).setScale(2, RoundingMode.HALF_UP);
}
/**
* 减法
* @param a 被减数
* @param b 减数
* @return 两数的差,保留两位小数
*/
public static BigDecimal subtract(Object a, Object b) {
BigDecimal bdA = toBigDecimal(a);
BigDecimal bdB = toBigDecimal(b);
return bdA.subtract(bdB).setScale(2, RoundingMode.HALF_UP);
}
/**
* 乘法
* @param a 乘数
* @param b 乘数
* @return 两个乘数的积,保留两位小数
*/
public static BigDecimal multiply(Object a, Object b) {
BigDecimal bdA = toBigDecimal(a);
BigDecimal bdB = toBigDecimal(b);
return bdA.multiply(bdB).setScale(2, RoundingMode.HALF_UP);
}
/**
* 除法
* @param a 被除数
* @param b 除数
* @return 两数的商,保留两位小数
*/
public static BigDecimal divide(Object a, Object b) {
BigDecimal bdA = toBigDecimal(a);
BigDecimal bdB = toBigDecimal(b);
return bdA.divide(bdB, 2, RoundingMode.HALF_UP);
}
/**
* 除法
* @param a 被除数
* @param b 除数
* @param scale 保留小数位数
* @return 两数的商,保留两位小数
*/
public static BigDecimal divide(Object a, Object b, int scale) {
BigDecimal bdA = toBigDecimal(a);
BigDecimal bdB = toBigDecimal(b);
return bdA.divide(bdB, scale, RoundingMode.HALF_UP);
}
/**
* 分转元
* @param obj 分的金额
* @return 转换后的元,保留两位小数
*/
public static BigDecimal centsToYuan(Object obj) {
BigDecimal cents = toBigDecimal(obj);
return cents.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP);
}
/**
* 元转分
* @param obj 元的金额
* @return 转换后的分
*/
public static Long yuanToCents(Object obj) {
BigDecimal yuan = toBigDecimal(obj);
return yuan.multiply(BigDecimal.valueOf(100)).setScale(0, RoundingMode.HALF_UP).longValue();
}
public static void main(String[] args) {
BigDecimal num1 = new BigDecimal("10.123");
BigDecimal num2 = new BigDecimal("2.456");
System.out.println("加法结果: " + add(num1, num2));
System.out.println("减法结果: " + subtract(num1, num2));
System.out.println("乘法结果: " + multiply(num1, num2));
System.out.println("除法结果: " + divide(num1, num2));
Long cents = 12345L;
System.out.println("分转元结果: " + centsToYuan(cents));
BigDecimal yuan = new BigDecimal("123.45");
System.out.println("元转分结果: " + yuanToCents(yuan));
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java
================================================
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
/**
* @author liaojinlong
* @date 2020/6/11 15:49
* @description 关于缓存的Key集合
*/
public interface CacheKey {
/**
* 用户
*/
String USER_ID = "user::id:";
/**
* 数据
*/
String DATA_USER = "data::user:";
/**
* 菜单
*/
String MENU_ID = "menu::id:";
String MENU_USER = "menu::user:";
/**
* 角色授权
*/
String ROLE_AUTH = "role::auth:";
String ROLE_USER = "role::user:";
/**
* 角色信息
*/
String ROLE_ID = "role::id:";
/**
* 部门
*/
String DEPT_ID = "dept::id:";
/**
* 岗位
*/
String JOB_ID = "job::id:";
/**
* 数据字典
*/
String DICT_NAME = "dict::name:";
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import java.io.Closeable;
/**
* @author Zheng Jie
* @website https://eladmin.vip
* @description 用于关闭各种连接,缺啥补啥
* @date 2021-03-05
**/
public class CloseUtil {
public static void close(Closeable closeable) {
if (null != closeable) {
try {
closeable.close();
} catch (Exception e) {
// 静默关闭
}
}
}
public static void close(AutoCloseable closeable) {
if (null != closeable) {
try {
closeable.close();
} catch (Exception e) {
// 静默关闭
}
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java
================================================
/*
* Copyright 2019-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.Date;
/**
* @author: liaojinlong
* @date: 2020/6/11 16:28
* @apiNote: JDK 8 新日期类 格式化与字符串转换 工具类
*/
public class DateUtil {
public static final DateTimeFormatter DFY_MD_HMS = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
public static final DateTimeFormatter DFY_MD = DateTimeFormatter.ofPattern("yyyy-MM-dd");
/**
* LocalDateTime 转时间戳
*
* @param localDateTime /
* @return /
*/
public static Long getTimeStamp(LocalDateTime localDateTime) {
return localDateTime.atZone(ZoneId.systemDefault()).toEpochSecond();
}
/**
* 时间戳转LocalDateTime
*
* @param timeStamp /
* @return /
*/
public static LocalDateTime fromTimeStamp(Long timeStamp) {
return LocalDateTime.ofEpochSecond(timeStamp, 0, OffsetDateTime.now().getOffset());
}
/**
* LocalDateTime 转 Date
* Jdk8 后 不推荐使用 {@link Date} Date
*
* @param localDateTime /
* @return /
*/
public static Date toDate(LocalDateTime localDateTime) {
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
/**
* LocalDate 转 Date
* Jdk8 后 不推荐使用 {@link Date} Date
*
* @param localDate /
* @return /
*/
public static Date toDate(LocalDate localDate) {
return toDate(localDate.atTime(LocalTime.now(ZoneId.systemDefault())));
}
/**
* Date转 LocalDateTime
* Jdk8 后 不推荐使用 {@link Date} Date
*
* @param date /
* @return /
*/
public static LocalDateTime toLocalDateTime(Date date) {
return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
}
/**
* 日期 格式化
*
* @param localDateTime /
* @param patten /
* @return /
*/
public static String localDateTimeFormat(LocalDateTime localDateTime, String patten) {
DateTimeFormatter df = DateTimeFormatter.ofPattern(patten);
return df.format(localDateTime);
}
/**
* 日期 格式化
*
* @param localDateTime /
* @param df /
* @return /
*/
public static String localDateTimeFormat(LocalDateTime localDateTime, DateTimeFormatter df) {
return df.format(localDateTime);
}
/**
* 日期格式化 yyyy-MM-dd HH:mm:ss
*
* @param localDateTime /
* @return /
*/
public static String localDateTimeFormatyMdHms(LocalDateTime localDateTime) {
return DFY_MD_HMS.format(localDateTime);
}
/**
* 日期格式化 yyyy-MM-dd
*
* @param localDateTime /
* @return /
*/
public String localDateTimeFormatyMd(LocalDateTime localDateTime) {
return DFY_MD.format(localDateTime);
}
/**
* 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd
*
* @param localDateTime /
* @return /
*/
public static LocalDateTime parseLocalDateTimeFormat(String localDateTime, String pattern) {
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(pattern);
return LocalDateTime.from(dateTimeFormatter.parse(localDateTime));
}
/**
* 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd
*
* @param localDateTime /
* @return /
*/
public static LocalDateTime parseLocalDateTimeFormat(String localDateTime, DateTimeFormatter dateTimeFormatter) {
return LocalDateTime.from(dateTimeFormatter.parse(localDateTime));
}
/**
* 字符串转 LocalDateTime ,字符串格式 yyyy-MM-dd HH:mm:ss
*
* @param localDateTime /
* @return /
*/
public static LocalDateTime parseLocalDateTimeFormatyMdHms(String localDateTime) {
return LocalDateTime.from(DFY_MD_HMS.parse(localDateTime));
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
/**
* 常用静态常量
*
* @author Zheng Jie
* @date 2018-12-26
*/
public class ElConstant {
/**
* win 系统
*/
public static final String WIN = "win";
/**
* mac 系统
*/
public static final String MAC = "mac";
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;
import javax.crypto.spec.IvParameterSpec;
import java.nio.charset.StandardCharsets;
/**
* 加密
* @author Zheng Jie
* @date 2018-11-23
*/
public class EncryptUtils {
private static final String STR_PARAM = "Passw0rd";
private static final IvParameterSpec IV = new IvParameterSpec(STR_PARAM.getBytes(StandardCharsets.UTF_8));
private static DESKeySpec getDesKeySpec(String source) throws Exception {
if (source == null || source.isEmpty()) {
return null;
}
String strKey = "Passw0rd";
return new DESKeySpec(strKey.getBytes(StandardCharsets.UTF_8));
}
/**
* 对称加密
*/
public static String desEncrypt(String source) throws Exception {
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
DESKeySpec desKeySpec = getDesKeySpec(source);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
cipher.init(Cipher.ENCRYPT_MODE, secretKey, IV);
return byte2hex(cipher.doFinal(source.getBytes(StandardCharsets.UTF_8))).toUpperCase();
}
/**
* 对称解密
*/
public static String desDecrypt(String source) throws Exception {
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
byte[] src = hex2byte(source.getBytes(StandardCharsets.UTF_8));
DESKeySpec desKeySpec = getDesKeySpec(source);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
cipher.init(Cipher.DECRYPT_MODE, secretKey, IV);
byte[] retByte = cipher.doFinal(src);
return new String(retByte);
}
private static String byte2hex(byte[] inStr) {
String stmp;
StringBuilder out = new StringBuilder(inStr.length * 2);
for (byte b : inStr) {
stmp = Integer.toHexString(b & 0xFF);
if (stmp.length() == 1) {
out.append("0").append(stmp);
} else {
out.append(stmp);
}
}
return out.toString();
}
private static byte[] hex2byte(byte[] b) {
int size = 2;
if ((b.length % size) != 0) {
throw new IllegalArgumentException("长度不是偶数");
}
byte[] b2 = new byte[b.length / 2];
for (int n = 0; n < b.length; n += size) {
String item = new String(b, n, 2);
b2[n / 2] = (byte) Integer.parseInt(item, 16);
}
return b2;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.poi.excel.BigExcelWriter;
import cn.hutool.poi.excel.ExcelUtil;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.exception.BadRequestException;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* File工具类,扩展 hutool 工具包
*
* @author Zheng Jie
* @date 2018-12-27
*/
@Slf4j
public class FileUtil extends cn.hutool.core.io.FileUtil {
/**
* 系统临时目录
* <br>
* windows 包含路径分割符,但Linux 不包含,
* 在windows \\==\ 前提下,
* 为安全起见 同意拼装 路径分割符,
* <pre>
* java.io.tmpdir
* windows : C:\Users/xxx\AppData\Local\Temp\
* linux: /temp
* </pre>
*/
public static final String SYS_TEM_DIR = System.getProperty("java.io.tmpdir") + File.separator;
/**
* 定义GB的计算常量
*/
private static final int GB = 1024 * 1024 * 1024;
/**
* 定义MB的计算常量
*/
private static final int MB = 1024 * 1024;
/**
* 定义KB的计算常量
*/
private static final int KB = 1024;
/**
* 格式化小数
*/
private static final DecimalFormat DF = new DecimalFormat("0.00");
public static final String IMAGE = "图片";
public static final String TXT = "文档";
public static final String MUSIC = "音乐";
public static final String VIDEO = "视频";
public static final String OTHER = "其他";
/**
* MultipartFile转File
*/
public static File toFile(MultipartFile multipartFile) {
// 获取文件名
String fileName = multipartFile.getOriginalFilename();
// 获取文件后缀
String prefix = "." + getExtensionName(fileName);
File file = null;
try {
// 用uuid作为文件名,防止生成的临时文件重复
file = new File(SYS_TEM_DIR + IdUtil.simpleUUID() + prefix);
// MultipartFile to File
multipartFile.transferTo(file);
} catch (IOException e) {
log.error(e.getMessage(), e);
}
return file;
}
/**
* 获取文件扩展名,不带 .
*/
public static String getExtensionName(String filename) {
if ((filename != null) && (!filename.isEmpty())) {
int dot = filename.lastIndexOf('.');
if ((dot > -1) && (dot < (filename.length() - 1))) {
return filename.substring(dot + 1);
}
}
return filename;
}
/**
* Java文件操作 获取不带扩展名的文件名
*/
public static String getFileNameNoEx(String filename) {
if ((filename != null) && (!filename.isEmpty())) {
int dot = filename.lastIndexOf('.');
if (dot > -1) {
return filename.substring(0, dot);
}
}
return filename;
}
/**
* 文件大小转换
*/
public static String getSize(long size) {
String resultSize;
if (size / GB >= 1) {
//如果当前Byte的值大于等于1GB
resultSize = DF.format(size / (float) GB) + "GB";
} else if (size / MB >= 1) {
//如果当前Byte的值大于等于1MB
resultSize = DF.format(size / (float) MB) + "MB";
} else if (size / KB >= 1) {
//如果当前Byte的值大于等于1KB
resultSize = DF.format(size / (float) KB) + "KB";
} else {
resultSize = size + "B";
}
return resultSize;
}
/**
* inputStream 转 File
*/
static File inputStreamToFile(InputStream ins, String name){
File file = new File(SYS_TEM_DIR + name);
if (file.exists()) {
return file;
}
OutputStream os = null;
try {
os = Files.newOutputStream(file.toPath());
int bytesRead;
int len = 8192;
byte[] buffer = new byte[len];
while ((bytesRead = ins.read(buffer, 0, len)) != -1) {
os.write(buffer, 0, bytesRead);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
CloseUtil.close(os);
CloseUtil.close(ins);
}
return file;
}
/**
* 将文件名解析成文件的上传路径
*/
public static File upload(MultipartFile file, String filePath) {
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddhhmmssS");
// 过滤非法文件名
String name = getFileNameNoEx(verifyFilename(file.getOriginalFilename()));
String suffix = getExtensionName(file.getOriginalFilename());
String nowStr = "-" + format.format(date);
try {
String fileName = name + nowStr + "." + suffix;
String path = filePath + fileName;
// getCanonicalFile 可解析正确各种路径
File dest = new File(path).getCanonicalFile();
// 检测是否存在目录
if (!dest.getParentFile().exists()) {
if (!dest.getParentFile().mkdirs()) {
System.out.println("was not successful.");
}
}
// 文件写入
file.transferTo(dest);
return dest;
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return null;
}
/**
* 防止 CSV/XLSX 注入(CWE-1236)
* <p>
* 当单元格值以 {@code = + - @ \t \r} 开头时,电子表格软件可能将其解释为公式。
* 本方法在这类值前添加单引号前缀,并转义值中已有的单引号,防止公式注入攻击。
* </p>
*
* @param value 原始单元格值
* @return 经过安全处理的单元格值
* @see <a href="https://owasp.org/www-community/attacks/CSV_Injection">OWASP CSV Injection</a>
*/
public static String sanitizeCellValue(String value) {
if (value == null || value.isEmpty()) {
return value;
}
char first = value.charAt(0);
if (first == '=' || first == '+' || first == '-' || first == '@'
|| first == '\t' || first == '\r') {
// 转义值中已有的单引号,防止攻击者利用单引号逃逸
return "'" + value.replace("'", "''");
}
return value;
}
/**
* 导出excel
*/
public static void downloadExcel(List<Map<String, Object>> list, HttpServletResponse response) throws IOException {
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
File file = new File(tempPath);
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
// 处理数据以防止CSV/XLSX注入(CWE-1236)
List<Map<String, Object>> sanitizedList = list.stream().map(map -> {
Map<String, Object> sanitizedMap = new LinkedHashMap<>();
map.forEach((key, value) -> {
if (value instanceof String) {
sanitizedMap.put(key, sanitizeCellValue((String) value));
} else {
sanitizedMap.put(key, value);
}
});
return sanitizedMap;
}).collect(Collectors.toList());
// 一次性写出内容,使用默认样式,强制输出标题
writer.write(sanitizedList, true);
SXSSFSheet sheet = (SXSSFSheet)writer.getSheet();
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
sheet.trackAllColumnsForAutoSizing();
//列宽自适应
writer.autoSizeColumnAll();
//response为HttpServletResponse对象
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
ServletOutputStream out = response.getOutputStream();
// 终止后删除临时文件
file.deleteOnExit();
writer.flush(out, true);
//此处记得关闭输出Servlet流
IoUtil.close(out);
}
public static String getFileType(String type) {
String documents = "txt doc pdf ppt pps xlsx xls docx";
String music = "mp3 wav wma mpa ram ra aac aif m4a";
String video = "avi mpg mpe mpeg asf wmv mov qt rm mp4 flv m4v webm ogv ogg";
String image = "bmp dib pcp dif wmf gif jpg tif eps psd cdr iff tga pcd mpt png jpeg";
if (image.contains(type)) {
return IMAGE;
} else if (documents.contains(type)) {
return TXT;
} else if (music.contains(type)) {
return MUSIC;
} else if (video.contains(type)) {
return VIDEO;
} else {
return OTHER;
}
}
public static void checkSize(long maxSize, long size) {
// 1M
int len = 1024 * 1024;
if (size > (maxSize * len)) {
throw new BadRequestException("文件超出规定大小:" + maxSize + "MB");
}
}
/**
* 判断两个文件是否相同
*/
public static boolean check(File file1, File file2) {
String img1Md5 = getMd5(file1);
String img2Md5 = getMd5(file2);
if(img1Md5 != null){
return img1Md5.equals(img2Md5);
}
return false;
}
/**
* 判断两个文件是否相同
*/
public static boolean check(String file1Md5, String file2Md5) {
return file1Md5.equals(file2Md5);
}
private static byte[] getByte(File file) {
// 得到文件长度
byte[] b = new byte[(int) file.length()];
InputStream in = null;
try {
in = Files.newInputStream(file.toPath());
try {
System.out.println(in.read(b));
} catch (IOException e) {
log.error(e.getMessage(), e);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return null;
} finally {
CloseUtil.close(in);
}
return b;
}
private static String getMd5(byte[] bytes) {
// 16进制字符
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
try {
MessageDigest mdTemp = MessageDigest.getInstance("MD5");
mdTemp.update(bytes);
byte[] md = mdTemp.digest();
int j = md.length;
char[] str = new char[j * 2];
int k = 0;
// 移位 输出字符串
for (byte byte0 : md) {
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
return new String(str);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return null;
}
/**
* 下载文件
*
* @param request /
* @param response /
* @param file /
*/
public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit) {
response.setCharacterEncoding(request.getCharacterEncoding());
response.setContentType("application/octet-stream");
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
response.setHeader("Content-Disposition", "attachment; filename=" + file.getName());
IOUtils.copy(fis, response.getOutputStream());
response.flushBuffer();
} catch (Exception e) {
log.error(e.getMessage(), e);
} finally {
if (fis != null) {
try {
fis.close();
if (deleteOnExit) {
file.deleteOnExit();
}
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
}
/**
* 验证并过滤非法的文件名
* @param fileName 文件名
* @return 文件名
*/
public static String verifyFilename(String fileName) {
// 过滤掉特殊字符
fileName = fileName.replaceAll("[\\\\/:*?\"<>|~\\s]", "");
// 去掉文件名开头和结尾的空格和点
fileName = fileName.trim().replaceAll("^[. ]+|[. ]+$", "");
// 不允许文件名超过255(在Mac和Linux中)或260(在Windows中)个字符
int maxFileNameLength = 255;
if (System.getProperty("os.name").startsWith("Windows")) {
maxFileNameLength = 260;
}
if (fileName.length() > maxFileNameLength) {
fileName = fileName.substring(0, maxFileNameLength);
}
// 过滤掉控制字符
fileName = fileName.replaceAll("[\\p{Cntrl}]", "");
// 过滤掉 ".." 路径
fileName = fileName.replaceAll("\\.{2,}", "");
// 去掉文件名开头的 ".."
fileName = fileName.replaceAll("^\\.+/", "");
// 保留文件名中最后一个 "." 字符,过滤掉其他 "."
fileName = fileName.replaceAll("^(.*)(\\.[^.]*)$", "$1").replaceAll("\\.", "") +
fileName.replaceAll("^(.*)(\\.[^.]*)$", "$2");
return fileName;
}
public static String getMd5(File file) {
return getMd5(getByte(file));
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java
================================================
package me.zhengjie.utils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* 分页结果封装类
* @author Zheng Jie
* @date 2018-11-23
* @param <T>
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> implements Serializable {
private List<T> content;
private long totalElements;
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import org.springframework.data.domain.Page;
import java.util.*;
/**
* 分页工具
* @author Zheng Jie
* @date 2018-12-10
*/
public class PageUtil extends cn.hutool.core.util.PageUtil {
/**
* List 分页
*/
public static <T> List<T> paging(int page, int size , List<T> list) {
int fromIndex = page * size;
int toIndex = page * size + size;
if(fromIndex > list.size()){
return Collections.emptyList();
} else if(toIndex >= list.size()) {
return list.subList(fromIndex,list.size());
} else {
return list.subList(fromIndex,toIndex);
}
}
/**
* Page 数据处理,预防redis反序列化报错
*/
public static <T> PageResult<T> toPage(Page<T> page) {
return new PageResult<>(page.getContent(), page.getTotalElements());
}
/**
* 自定义分页
*/
public static <T> PageResult<T> toPage(List<T> list, long totalElements) {
return new PageResult<>(list, totalElements);
}
/**
* 返回空数据
*/
public static <T> PageResult<T> noData () {
return new PageResult<>(null, 0);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.DataPermission;
import me.zhengjie.annotation.Query;
import javax.persistence.criteria.*;
import java.lang.reflect.Field;
import java.util.*;
/**
* @author Zheng Jie
* @date 2019-6-4 14:59:48
*/
@Slf4j
@SuppressWarnings({"unchecked","all"})
public class QueryHelp {
public static <R, Q> Predicate getPredicate(Root<R> root, Q query, CriteriaBuilder cb) {
List<Predicate> list = new ArrayList<>();
if(query == null){
return cb.and(list.toArray(new Predicate[0]));
}
// 数据权限验证
DataPermission permission = query.getClass().getAnnotation(DataPermission.class);
if(permission != null){
// 获取数据权限
List<Long> dataScopes = SecurityUtils.getCurrentUserDataScope();
if(CollectionUtil.isNotEmpty(dataScopes)){
if(StringUtils.isNotBlank(permission.joinName()) && StringUtils.isNotBlank(permission.fieldName())) {
Join join = root.join(permission.joinName(), JoinType.LEFT);
list.add(getExpression(permission.fieldName(),join, root).in(dataScopes));
} else if (StringUtils.isBlank(permission.joinName()) && StringUtils.isNotBlank(permission.fieldName())) {
list.add(getExpression(permission.fieldName(),null, root).in(dataScopes));
}
}
}
try {
Map<String, Join> joinKey = new HashMap<>();
List<Field> fields = getAllFields(query.getClass(), new ArrayList<>());
for (Field field : fields) {
boolean accessible = field.isAccessible();
// 设置对象的访问权限,保证对private的属性的访
field.setAccessible(true);
Query q = field.getAnnotation(Query.class);
if (q != null) {
String propName = q.propName();
String joinName = q.joinName();
String blurry = q.blurry();
String attributeName = isBlank(propName) ? field.getName() : propName;
Class<?> fieldType = field.getType();
Object val = field.get(query);
if (ObjectUtil.isNull(val) || "".equals(val)) {
continue;
}
Join join = null;
// 模糊多字段
if (ObjectUtil.isNotEmpty(blurry)) {
String[] blurrys = blurry.split(",");
List<Predicate> orPredicate = new ArrayList<>();
for (String s : blurrys) {
orPredicate.add(cb.like(root.get(s).as(String.class), "%" + val.toString() + "%"));
}
Predicate[] p = new Predicate[orPredicate.size()];
list.add(cb.or(orPredicate.toArray(p)));
continue;
}
if (ObjectUtil.isNotEmpty(joinName)) {
join = joinKey.get(joinName);
if(join == null){
String[] joinNames = joinName.split(">");
for (String name : joinNames) {
switch (q.join()) {
case LEFT:
if(ObjectUtil.isNotNull(join) && ObjectUtil.isNotNull(val)){
join = join.join(name, JoinType.LEFT);
} else {
join = root.join(name, JoinType.LEFT);
}
break;
case RIGHT:
if(ObjectUtil.isNotNull(join) && ObjectUtil.isNotNull(val)){
join = join.join(name, JoinType.RIGHT);
} else {
join = root.join(name, JoinType.RIGHT);
}
break;
case INNER:
if(ObjectUtil.isNotNull(join) && ObjectUtil.isNotNull(val)){
join = join.join(name, JoinType.INNER);
} else {
join = root.join(name, JoinType.INNER);
}
break;
default: break;
}
}
joinKey.put(joinName, join);
}
}
switch (q.type()) {
case EQUAL:
list.add(cb.equal(getExpression(attributeName,join,root)
.as((Class<? extends Comparable>) fieldType),val));
break;
case GREATER_THAN:
list.add(cb.greaterThanOrEqualTo(getExpression(attributeName,join,root)
.as((Class<? extends Comparable>) fieldType), (Comparable) val));
break;
case LESS_THAN:
list.add(cb.lessThanOrEqualTo(getExpression(attributeName,join,root)
.as((Class<? extends Comparable>) fieldType), (Comparable) val));
break;
case LESS_THAN_NQ:
list.add(cb.lessThan(getExpression(attributeName,join,root)
.as((Class<? extends Comparable>) fieldType), (Comparable) val));
break;
case INNER_LIKE:
list.add(cb.like(getExpression(attributeName,join,root)
.as(String.class), "%" + val.toString() + "%"));
break;
case LEFT_LIKE:
list.add(cb.like(getExpression(attributeName,join,root)
.as(String.class), "%" + val.toString()));
break;
case RIGHT_LIKE:
list.add(cb.like(getExpression(attributeName,join,root)
.as(String.class), val.toString() + "%"));
break;
case IN:
if (CollUtil.isNotEmpty((Collection<Object>)val)) {
list.add(getExpression(attributeName,join,root).in((Collection<Object>) val));
}
break;
case NOT_IN:
if (CollUtil.isNotEmpty((Collection<Object>)val)) {
list.add(getExpression(attributeName,join,root).in((Collection<Object>) val).not());
}
break;
case NOT_EQUAL:
list.add(cb.notEqual(getExpression(attributeName,join,root), val));
break;
case NOT_NULL:
list.add(cb.isNotNull(getExpression(attributeName,join,root)));
break;
case IS_NULL:
list.add(cb.isNull(getExpression(attributeName,join,root)));
break;
case BETWEEN:
List<Object> between = new ArrayList<>((List<Object>)val);
if(between.size() == 2){
list.add(cb.between(getExpression(attributeName, join, root).as((Class<? extends Comparable>) between.get(0).getClass()),
(Comparable) between.get(0), (Comparable) between.get(1)));
}
break;
case FIND_IN_SET:
list.add(cb.greaterThan(cb.function("FIND_IN_SET", Integer.class,
cb.literal(val.toString()), root.get(attributeName)), 0));
break;
default: break;
}
}
field.setAccessible(accessible);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
int size = list.size();
return cb.and(list.toArray(new Predicate[size]));
}
@SuppressWarnings("unchecked")
private static <T, R> Expression<T> getExpression(String attributeName, Join join, Root<R> root) {
if (ObjectUtil.isNotEmpty(join)) {
return join.get(attributeName);
} else {
return root.get(attributeName);
}
}
private static boolean isBlank(final CharSequence cs) {
int strLen;
if (cs == null || (strLen = cs.length()) == 0) {
return true;
}
for (int i = 0; i < strLen; i++) {
if (!Character.isWhitespace(cs.charAt(i))) {
return false;
}
}
return true;
}
public static List<Field> getAllFields(Class clazz, List<Field> fields) {
if (clazz != null) {
fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
getAllFields(clazz.getSuperclass(), fields);
}
return fields;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* @author /
*/
@Component
@SuppressWarnings({"all"})
public class RedisUtils {
private static final Logger log = LoggerFactory.getLogger(RedisUtils.class);
private RedisTemplate<Object, Object> redisTemplate;
public RedisUtils(RedisTemplate<Object, Object> redisTemplate) {
this.redisTemplate = redisTemplate;
this.redisTemplate.setKeySerializer(new StringRedisSerializer());
this.redisTemplate.setHashKeySerializer(new StringRedisSerializer());
}
/**
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒) 注意:这里将会替换原有的时间
*/
public boolean expire(String key, long time) {
try {
if (time > 0) {
redisTemplate.expire(key, time, TimeUnit.SECONDS);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
return true;
}
/**
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒) 注意:这里将会替换原有的时间
* @param timeUnit 单位
*/
public boolean expire(String key, long time, TimeUnit timeUnit) {
try {
if (time > 0) {
redisTemplate.expire(key, time, timeUnit);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
return true;
}
/**
* 根据 key 获取过期时间
*
* @param key 键 不能为null
* @return 时间(秒) 返回0代表为永久有效
*/
public long getExpire(Object key) {
return redisTemplate.getExpire(key, TimeUnit.SECONDS);
}
/**
* 查找匹配key
*
* @param pattern key
* @return /
*/
public List<String> scan(String pattern) {
ScanOptions options = ScanOptions.scanOptions().match(pattern).build();
RedisConnectionFactory factory = redisTemplate.getConnectionFactory();
RedisConnection rc = Objects.requireNonNull(factory).getConnection();
Cursor<byte[]> cursor = rc.scan(options);
List<String> result = new ArrayList<>();
while (cursor.hasNext()) {
result.add(new String(cursor.next()));
}
try {
RedisConnectionUtils.releaseConnection(rc, factory);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return result;
}
/**
* 分页查询 key
*
* @param patternKey key
* @param page 页码
* @param size 每页数目
* @return /
*/
public List<String> findKeysForPage(String patternKey, int page, int size) {
ScanOptions options = ScanOptions.scanOptions().match(patternKey).build();
RedisConnectionFactory factory = redisTemplate.getConnectionFactory();
RedisConnection rc = Objects.requireNonNull(factory).getConnection();
Cursor<byte[]> cursor = rc.scan(options);
List<String> result = new ArrayList<>(size);
int tmpIndex = 0;
int fromIndex = page * size;
int toIndex = page * size + size;
while (cursor.hasNext()) {
if (tmpIndex >= fromIndex && tmpIndex < toIndex) {
result.add(new String(cursor.next()));
tmpIndex++;
continue;
}
// 获取到满足条件的数据后,就可以退出了
if (tmpIndex >= toIndex) {
break;
}
tmpIndex++;
cursor.next();
}
try {
RedisConnectionUtils.releaseConnection(rc, factory);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return result;
}
/**
* 判断key是否存在
*
* @param key 键
* @return true 存在 false不存在
*/
public boolean hasKey(String key) {
try {
return redisTemplate.hasKey(key);
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 删除缓存
*
* @param key 可以传一个值 或多个
*/
public void del(String... keys) {
if (keys != null && keys.length > 0) {
if (keys.length == 1) {
boolean result = redisTemplate.delete(keys[0]);
log.debug("--------------------------------------------");
log.debug(new StringBuilder("删除缓存:").append(keys[0]).append(",结果:").append(result).toString());
log.debug("--------------------------------------------");
} else {
Set<Object> keySet = new HashSet<>();
for (String key : keys) {
if (redisTemplate.hasKey(key))
keySet.add(key);
}
long count = redisTemplate.delete(keySet);
log.debug("--------------------------------------------");
log.debug("成功删除缓存:" + keySet.toString());
log.debug("缓存删除数量:" + count + "个");
log.debug("--------------------------------------------");
}
}
}
/**
* 批量模糊删除key
* @param pattern
*/
public void scanDel(String pattern){
ScanOptions options = ScanOptions.scanOptions().match(pattern).build();
try (Cursor<byte[]> cursor = redisTemplate.executeWithStickyConnection(
(RedisCallback<Cursor<byte[]>>) connection -> (Cursor<byte[]>) new ConvertingCursor<>(
connection.scan(options), redisTemplate.getKeySerializer()::deserialize))) {
while (cursor.hasNext()) {
redisTemplate.delete(cursor.next());
}
}
}
// ============================String=============================
/**
* 普通缓存获取
*
* @param key 键
* @return 值
*/
public Object get(String key) {
return key == null ? null : redisTemplate.opsForValue().get(key);
}
/**
* 普通缓存获取
*
* @param key 键
* @return 值
*/
public <T> T get(String key, Class<T> clazz) {
Object value = key == null ? null : redisTemplate.opsForValue().get(key);
if (value == null) {
return null;
}
// 如果 value 不是目标类型,则尝试将其反序列化为 clazz 类型
if (!clazz.isInstance(value)) {
return JSON.parseObject(value.toString(), clazz);
} else if (clazz.isInstance(value)) {
return clazz.cast(value);
} else {
return null;
}
}
/**
* 普通缓存获取
*
* @param key 键
* @param clazz 列表中元素的类型
* @return 值
*/
public <T> List<T> getList(String key, Class<T> clazz) {
Object value = key == null ? null : redisTemplate.opsForValue().get(key);
if (value == null) {
return null;
}
if (value instanceof List<?>) {
List<?> list = (List<?>) value;
// 检查每个元素是否为指定类型
if (list.stream().allMatch(clazz::isInstance)) {
return list.stream().map(clazz::cast).collect(Collectors.toList());
}
}
return null;
}
/**
* 普通缓存获取
*
* @param key 键
* @return 值
*/
public String getStr(String key) {
if(StrUtil.isBlank(key)){
return null;
}
Object value = redisTemplate.opsForValue().get(key);
if (value == null) {
return null;
} else {
return String.valueOf(value);
}
}
/**
* 批量获取
*
* @param keys
* @return
*/
public List<Object> multiGet(List<String> keys) {
List list = redisTemplate.opsForValue().multiGet(Sets.newHashSet(keys));
List resultList = Lists.newArrayList();
Optional.ofNullable(list).ifPresent(e-> list.forEach(ele-> Optional.ofNullable(ele).ifPresent(resultList::add)));
return resultList;
}
/**
* 普通缓存放入
*
* @param key 键
* @param value 值
* @return true成功 false失败
*/
public boolean set(String key, Object value) {
int attempt = 0;
while (attempt < 3) {
try {
redisTemplate.opsForValue().set(key, value);
return true;
} catch (Exception e) {
attempt++;
log.error("Attempt {} failed: {}", attempt, e.getMessage(), e);
}
}
return false;
}
/**
* 普通缓存放入并设置时间
*
* @param key 键
* @param value 值
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期,注意:这里将会替换原有的时间
* @return true成功 false 失败
*/
public boolean set(String key, Object value, long time) {
try {
if (time > 0) {
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
} else {
set(key, value);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 普通缓存放入并设置时间
*
* @param key 键
* @param value 值
* @param time 时间,注意:这里将会替换原有的时间
* @param timeUnit 类型
* @return true成功 false 失败
*/
public boolean set(String key, Object value, long time, TimeUnit timeUnit) {
try {
if (time > 0) {
redisTemplate.opsForValue().set(key, value, time, timeUnit);
} else {
set(key, value);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
// ================================Map=================================
/**
* HashGet
*
* @param key 键 不能为null
* @param item 项 不能为null
* @return 值
*/
public Object hget(String key, String item) {
return redisTemplate.opsForHash().get(key, item);
}
/**
* 获取hashKey对应的所有键值
*
* @param key 键
* @return 对应的多个键值
*/
public Map<Object, Object> hmget(String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* HashSet
*
* @param key 键
* @param map 对应多个键值
* @return true 成功 false 失败
*/
public boolean hmset(String key, Map<String, Object> map) {
try {
redisTemplate.opsForHash().putAll(key, map);
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* HashSet
*
* @param key 键
* @param map 对应多个键值
* @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
* @return true成功 false失败
*/
public boolean hmset(String key, Map<String, Object> map, long time) {
try {
redisTemplate.opsForHash().putAll(key, map);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key 键
* @param item 项
* @param value 值
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value) {
try {
redisTemplate.opsForHash().put(key, item, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key 键
* @param item 项
* @param value 值
* @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value, long time) {
try {
redisTemplate.opsForHash().put(key, item, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 删除hash表中的值
*
* @param key 键 不能为null
* @param item 项 可以使多个 不能为null
*/
public void hdel(String key, Object... item) {
redisTemplate.opsForHash().delete(key, item);
}
/**
* 判断hash表中是否有该项的值
*
* @param key 键 不能为null
* @param item 项 不能为null
* @return true 存在 false不存在
*/
public boolean hHasKey(String key, String item) {
return redisTemplate.opsForHash().hasKey(key, item);
}
/**
* hash递增 如果不存在,就会创建一个 并把新增后的值返回
*
* @param key 键
* @param item 项
* @param by 要增加几(大于0)
* @return
*/
public double hincr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, by);
}
/**
* hash递减
*
* @param key 键
* @param item 项
* @param by 要减少记(小于0)
* @return
*/
public double hdecr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, -by);
}
// ============================set=============================
/**
* 根据key获取Set中的所有值
*
* @param key 键
* @return
*/
public Set<Object> sGet(String key) {
try {
return redisTemplate.opsForSet().members(key);
} catch (Exception e) {
log.error(e.getMessage(), e);
return null;
}
}
/**
* 根据value从一个set中查询,是否存在
*
* @param key 键
* @param value 值
* @return true 存在 false不存在
*/
public boolean sHasKey(String key, Object value) {
try {
return redisTemplate.opsForSet().isMember(key, value);
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 将数据放入set缓存
*
* @param key 键
* @param values 值 可以是多个
* @return 成功个数
*/
public long sSet(String key, Object... values) {
try {
return redisTemplate.opsForSet().add(key, values);
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
/**
* 将set数据放入缓存
*
* @param key 键
* @param time 时间(秒) 注意:这里将会替换原有的时间
* @param values 值 可以是多个
* @return 成功个数
*/
public long sSetAndTime(String key, long time, Object... values) {
try {
Long count = redisTemplate.opsForSet().add(key, values);
if (time > 0) {
expire(key, time);
}
return count;
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
/**
* 获取set缓存的长度
*
* @param key 键
* @return
*/
public long sGetSetSize(String key) {
try {
return redisTemplate.opsForSet().size(key);
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
/**
* 移除值为value的
*
* @param key 键
* @param values 值 可以是多个
* @return 移除的个数
*/
public long setRemove(String key, Object... values) {
try {
Long count = redisTemplate.opsForSet().remove(key, values);
return count;
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
// ===============================list=================================
/**
* 获取list缓存的内容
*
* @param key 键
* @param start 开始
* @param end 结束 0 到 -1代表所有值
* @return
*/
public List<Object> lGet(String key, long start, long end) {
try {
return redisTemplate.opsForList().range(key, start, end);
} catch (Exception e) {
log.error(e.getMessage(), e);
return null;
}
}
/**
* 获取list缓存的长度
*
* @param key 键
* @return
*/
public long lGetListSize(String key) {
try {
return redisTemplate.opsForList().size(key);
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
/**
* 通过索引 获取list中的值
*
* @param key 键
* @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
* @return
*/
public Object lGetIndex(String key, long index) {
try {
return redisTemplate.opsForList().index(key, index);
} catch (Exception e) {
log.error(e.getMessage(), e);
return null;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @return
*/
public boolean lSet(String key, Object value) {
try {
redisTemplate.opsForList().rightPush(key, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @param time 时间(秒) 注意:这里将会替换原有的时间
* @return
*/
public boolean lSet(String key, Object value, long time) {
try {
redisTemplate.opsForList().rightPush(key, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @return
*/
public boolean lSet(String key, List<Object> value) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @param time 时间(秒) 注意:这里将会替换原有的时间
* @return
*/
public boolean lSet(String key, List<Object> value, long time) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 根据索引修改list中的某条数据
*
* @param key 键
* @param index 索引
* @param value 值
* @return /
*/
public boolean lUpdateIndex(String key, long index, Object value) {
try {
redisTemplate.opsForList().set(key, index, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(), e);
return false;
}
}
/**
* 移除N个值为value
*
* @param key 键
* @param count 移除多少个
* @param value 值
* @return 移除的个数
*/
public long lRemove(String key, long count, Object value) {
try {
return redisTemplate.opsForList().remove(key, count, value);
} catch (Exception e) {
log.error(e.getMessage(), e);
return 0;
}
}
/**
* @param prefix 前缀
* @param ids id
*/
public void delByKeys(String prefix, Set<Long> ids) {
Set<Object> keys = new HashSet<>();
for (Long id : ids) {
keys.addAll(redisTemplate.keys(new StringBuffer(prefix).append(id).toString()));
}
long count = redisTemplate.delete(keys);
}
// ============================incr=============================
/**
* 递增
* @param key
* @return
*/
public Long increment(String key) {
return redisTemplate.opsForValue().increment(key);
}
/**
* 递减
* @param key
* @return
*/
public Long decrement(String key) {
return redisTemplate.opsForValue().decrement(key);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Objects;
/**
* 获取 HttpServletRequest
* @author Zheng Jie
* @date 2018-11-24
*/
public class RequestHolder {
public static HttpServletRequest getHttpServletRequest() {
return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java
================================================
package me.zhengjie.utils;
import org.apache.commons.codec.binary.Base64;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
/**
* @author https://www.cnblogs.com/nihaorz/p/10690643.html
* @description Rsa 工具类,公钥私钥生成,加解密
* @date 2020-05-18
**/
public class RsaUtils {
private static final String SRC = "123456";
public static void main(String[] args) throws Exception {
System.out.println("\n");
RsaKeyPair keyPair = generateKeyPair();
System.out.println("公钥:" + keyPair.getPublicKey());
System.out.println("私钥:" + keyPair.getPrivateKey());
System.out.println("\n");
test1(keyPair);
System.out.println("\n");
test2(keyPair);
System.out.println("\n");
}
/**
* 公钥加密私钥解密
*/
private static void test1(RsaKeyPair keyPair) throws Exception {
System.out.println("***************** 公钥加密私钥解密开始 *****************");
String text1 = encryptByPublicKey(keyPair.getPublicKey(), RsaUtils.SRC);
String text2 = decryptByPrivateKey(keyPair.getPrivateKey(), text1);
System.out.println("加密前:" + RsaUtils.SRC);
System.out.println("加密后:" + text1);
System.out.println("解密后:" + text2);
if (RsaUtils.SRC.equals(text2)) {
System.out.println("解密字符串和原始字符串一致,解密成功");
} else {
System.out.println("解密字符串和原始字符串不一致,解密失败");
}
System.out.println("***************** 公钥加密私钥解密结束 *****************");
}
/**
* 私钥加密公钥解密
* @throws Exception /
*/
private static void test2(RsaKeyPair keyPair) throws Exception {
System.out.println("***************** 私钥加密公钥解密开始 *****************");
String text1 = encryptByPrivateKey(keyPair.getPrivateKey(), RsaUtils.SRC);
String text2 = decryptByPublicKey(keyPair.getPublicKey(), text1);
System.out.println("加密前:" + RsaUtils.SRC);
System.out.println("加密后:" + text1);
System.out.println("解密后:" + text2);
if (RsaUtils.SRC.equals(text2)) {
System.out.println("解密字符串和原始字符串一致,解密成功");
} else {
System.out.println("解密字符串和原始字符串不一致,解密失败");
}
System.out.println("***************** 私钥加密公钥解密结束 *****************");
}
/**
* 公钥解密
*
* @param publicKeyText 公钥
* @param text 待解密的信息
* @return /
* @throws Exception /
*/
public static String decryptByPublicKey(String publicKeyText, String text) throws Exception {
X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyText));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
byte[] result = doLongerCipherFinal(Cipher.DECRYPT_MODE, cipher, Base64.decodeBase64(text));
return new String(result);
}
/**
* 私钥加密
*
* @param privateKeyText 私钥
* @param text 待加密的信息
* @return /
* @throws Exception /
*/
public static String encryptByPrivateKey(String privateKeyText, String text) throws Exception {
PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyText));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
byte[] result = doLongerCipherFinal(Cipher.ENCRYPT_MODE, cipher, text.getBytes());
return Base64.encodeBase64String(result);
}
/**
* 私钥解密
*
* @param privateKeyText 私钥
* @param text 待解密的文本
* @return /
* @throws Exception /
*/
public static String decryptByPrivateKey(String privateKeyText, String text) throws Exception {
PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyText));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
byte[] result = doLongerCipherFinal(Cipher.DECRYPT_MODE, cipher, Base64.decodeBase64(text));
return new String(result);
}
/**
* 公钥加密
*
* @param publicKeyText 公钥
* @param text 待加密的文本
* @return /
*/
public static String encryptByPublicKey(String publicKeyText, String text) throws Exception {
X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyText));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
byte[] result = doLongerCipherFinal(Cipher.ENCRYPT_MODE, cipher, text.getBytes());
return Base64.encodeBase64String(result);
}
private static byte[] doLongerCipherFinal(int opMode,Cipher cipher, byte[] source) throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
if (opMode == Cipher.DECRYPT_MODE) {
out.write(cipher.doFinal(source));
} else {
int offset = 0;
int totalSize = source.length;
while (totalSize - offset > 0) {
int size = Math.min(cipher.getOutputSize(0) - 11, totalSize - offset);
out.write(cipher.doFinal(source, offset, size));
offset += size;
}
}
out.close();
return out.toByteArray();
}
/**
* 构建RSA密钥对
*
* @return /
* @throws NoSuchAlgorithmException /
*/
public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(1024);
KeyPair keyPair = keyPairGenerator.generateKeyPair();
RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
return new RsaKeyPair(publicKeyString, privateKeyString);
}
/**
* RSA密钥对对象
*/
public static class RsaKeyPair {
private final String publicKey;
private final String privateKey;
public RsaKeyPair(String publicKey, String privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public String getPublicKey() {
return publicKey;
}
public String getPrivateKey() {
return privateKey;
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.jwt.JWT;
import cn.hutool.jwt.JWTUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.utils.enums.DataScopeEnum;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Objects;
/**
* 获取当前登录的用户
* @author Zheng Jie
* @date 2019-01-17
*/
@Slf4j
@Component
public class SecurityUtils {
public static String header;
public static String tokenStartWith;
@Value("${jwt.header}")
public void setHeader(String header) {
SecurityUtils.header = header;
}
@Value("${jwt.token-start-with}")
public void setTokenStartWith(String tokenStartWith) {
SecurityUtils.tokenStartWith = tokenStartWith;
}
/**
* 获取当前登录的用户
* @return UserDetails
*/
public static UserDetails getCurrentUser() {
UserDetailsService userDetailsService = SpringBeanHolder.getBean(UserDetailsService.class);
return userDetailsService.loadUserByUsername(getCurrentUsername());
}
/**
* 获取当前用户的数据权限
* @return /
*/
public static List<Long> getCurrentUserDataScope(){
UserDetails userDetails = getCurrentUser();
// 将 Java 对象转换为 JSONObject 对象
JSONObject jsonObject = (JSONObject) JSON.toJSON(userDetails);
JSONArray jsonArray = jsonObject.getJSONArray("dataScopes");
return JSON.parseArray(jsonArray.toJSONString(), Long.class);
}
/**
* 获取数据权限级别
* @return 级别
*/
public static String getDataScopeType() {
List<Long> dataScopes = getCurrentUserDataScope();
if(CollUtil.isEmpty(dataScopes)){
return "";
}
return DataScopeEnum.ALL.getValue();
}
/**
* 获取用户ID
* @return 系统用户ID
*/
public static Long getCurrentUserId() {
return getCurrentUserId(getToken());
}
/**
* 获取用户ID
* @return 系统用户ID
*/
public static Long getCurrentUserId(String token) {
JWT jwt = JWTUtil.parseToken(token);
return Long.valueOf(jwt.getPayload("userId").toString());
}
/**
* 获取系统用户名称
*
* @return 系统用户名称
*/
public static String getCurrentUsername() {
return getCurrentUsername(getToken());
}
/**
* 获取系统用户名称
*
* @return 系统用户名称
*/
public static String getCurrentUsername(String token) {
JWT jwt = JWTUtil.parseToken(token);
return jwt.getPayload("sub").toString();
}
/**
* 获取Token
* @return /
*/
public static String getToken() {
HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder
.getRequestAttributes())).getRequest();
String bearerToken = request.getHeader(header);
if (bearerToken != null && bearerToken.startsWith(tokenStartWith)) {
// 去掉令牌前缀
return bearerToken.replace(tokenStartWith, "");
} else {
log.debug("非法Token:{}", bearerToken);
}
return null;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/SpringBeanHolder.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author Jie
* @date 2019-01-07
*/
@Slf4j
@SuppressWarnings({"unchecked","all"})
public class SpringBeanHolder implements ApplicationContextAware, DisposableBean {
private static ApplicationContext applicationContext = null;
private static final List<SpringBeanHolder.CallBack> CALL_BACKS = new ArrayList<>();
private static boolean addCallback = true;
/**
* 针对 某些初始化方法,在SpringContextHolder 未初始化时 提交回调方法。
* 在SpringContextHolder 初始化后,进行回调使用
*
* @param callBack 回调函数
*/
public synchronized static void addCallBacks(SpringBeanHolder.CallBack callBack) {
if (addCallback) {
SpringBeanHolder.CALL_BACKS.add(callBack);
} else {
log.warn("CallBack:{} 已无法添加!立即执行", callBack.getCallBackName());
callBack.executor();
}
}
/**
* 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
*/
public static <T> T getBean(String name) {
assertContextInjected();
return (T) applicationContext.getBean(name);
}
/**
* 从静态变量applicationContext中取得Bean, 自动转型为所赋值对象的类型.
*/
public static <T> T getBean(Class<T> requiredType) {
assertContextInjected();
return applicationContext.getBean(requiredType);
}
/**
* 获取SpringBoot 配置信息
*
* @param property 属性key
* @param defaultValue 默认值
* @param requiredType 返回类型
* @return /
*/
public static <T> T getProperties(String property, T defaultValue, Class<T> requiredType) {
T result = defaultValue;
try {
result = getBean(Environment.class).getProperty(property, requiredType);
} catch (Exception ignored) {}
return result;
}
/**
* 获取SpringBoot 配置信息
*
* @param property 属性key
* @return /
*/
public static String getProperties(String property) {
return getProperties(property, null, String.class);
}
/**
* 获取SpringBoot 配置信息
*
* @param property 属性key
* @param requiredType 返回类型
* @return /
*/
public static <T> T getProperties(String property, Class<T> requiredType) {
return getProperties(property, null, requiredType);
}
/**
* 检查ApplicationContext不为空.
*/
private static void assertContextInjected() {
if (applicationContext == null) {
throw new IllegalStateException("applicaitonContext属性未注入, 请在applicationContext" +
".xml中定义SpringContextHolder或在SpringBoot启动类中注册SpringContextHolder.");
}
}
/**
* 清除SpringContextHolder中的ApplicationContext为Null.
*/
private static void clearHolder() {
log.debug("清除SpringContextHolder中的ApplicationContext:"
+ applicationContext);
applicationContext = null;
}
@Override
public void destroy() {
SpringBeanHolder.clearHolder();
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (SpringBeanHolder.applicationContext != null) {
log.warn("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringBeanHolder.applicationContext);
}
SpringBeanHolder.applicationContext = applicationContext;
if (addCallback) {
for (SpringBeanHolder.CallBack callBack : SpringBeanHolder.CALL_BACKS) {
callBack.executor();
}
CALL_BACKS.clear();
}
SpringBeanHolder.addCallback = false;
}
/**
* 获取 @Service 的所有 bean 名称
* @return /
*/
public static List<String> getAllServiceBeanName() {
return new ArrayList<>(Arrays.asList(applicationContext
.getBeanNamesForAnnotation(Service.class)));
}
interface CallBack {
/**
* 回调执行方法
*/
void executor();
/**
* 本回调任务名称
* @return /
*/
default String getCallBackName() {
return Thread.currentThread().getId() + ":" + this.getClass().getName();
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.http.useragent.UserAgent;
import cn.hutool.http.useragent.UserAgentUtil;
import lombok.extern.slf4j.Slf4j;
import net.dreamlu.mica.ip2region.core.Ip2regionSearcher;
import net.dreamlu.mica.ip2region.core.IpInfo;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.UnknownHostException;
import java.util.Calendar;
import java.util.Date;
import java.util.Enumeration;
/**
* @author Zheng Jie
* 字符串工具类, 继承org.apache.commons.lang3.StringUtils类
*/
@Slf4j
public class StringUtils extends org.apache.commons.lang3.StringUtils {
private static final char SEPARATOR = '_';
private static final String UNKNOWN = "unknown";
/**
* 注入bean
*/
private final static Ip2regionSearcher IP_SEARCHER = SpringBeanHolder.getBean(Ip2regionSearcher.class);
/**
* 驼峰命名法工具
*
* @return toCamelCase(" hello_world ") == "helloWorld"
* toCapitalizeCamelCase("hello_world") == "HelloWorld"
* toUnderScoreCase("helloWorld") = "hello_world"
*/
public static String toCamelCase(String s) {
if (s == null) {
return null;
}
s = s.toLowerCase();
StringBuilder sb = new StringBuilder(s.length());
boolean upperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == SEPARATOR) {
upperCase = true;
} else if (upperCase) {
sb.append(Character.toUpperCase(c));
upperCase = false;
} else {
sb.append(c);
}
}
return sb.toString();
}
/**
* 驼峰命名法工具
*
* @return toCamelCase(" hello_world ") == "helloWorld"
* toCapitalizeCamelCase("hello_world") == "HelloWorld"
* toUnderScoreCase("helloWorld") = "hello_world"
*/
public static String toCapitalizeCamelCase(String s) {
if (s == null) {
return null;
}
s = toCamelCase(s);
return s.substring(0, 1).toUpperCase() + s.substring(1);
}
/**
* 驼峰命名法工具
*
* @return toCamelCase(" hello_world ") == "helloWorld"
* toCapitalizeCamelCase("hello_world") == "HelloWorld"
* toUnderScoreCase("helloWorld") = "hello_world"
*/
static String toUnderScoreCase(String s) {
if (s == null) {
return null;
}
StringBuilder sb = new StringBuilder();
boolean upperCase = false;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
boolean nextUpperCase = true;
if (i < (s.length() - 1)) {
nextUpperCase = Character.isUpperCase(s.charAt(i + 1));
}
if ((i > 0) && Character.isUpperCase(c)) {
if (!upperCase || !nextUpperCase) {
sb.append(SEPARATOR);
}
upperCase = true;
} else {
upperCase = false;
}
sb.append(Character.toLowerCase(c));
}
return sb.toString();
}
/**
* 获取ip地址
*/
public static String getIp(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.isEmpty() || UNKNOWN.equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.isEmpty() || UNKNOWN.equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.isEmpty() || UNKNOWN.equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
String comma = ",";
String localhost = "127.0.0.1";
if (ip.contains(comma)) {
ip = ip.split(",")[0];
}
if (localhost.equals(ip)) {
// 获取本机真正的ip地址
try {
ip = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
log.error(e.getMessage(), e);
}
}
return ip;
}
/**
* 根据ip获取详细地址
*/
public static String getCityInfo(String ip) {
IpInfo ipInfo = IP_SEARCHER.memorySearch(ip);
if(ipInfo != null){
return ipInfo.getAddress();
}
return null;
}
/**
* 获取浏览器
*/
public static String getBrowser(HttpServletRequest request) {
UserAgent ua = UserAgentUtil.parse(request.getHeader("User-Agent"));
String browser = ua.getBrowser().toString() + " " + ua.getVersion();
return browser.replace(".0.0.0","");
}
/**
* 获得当天是周几
*/
public static String getWeekDay() {
String[] weekDays = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (w < 0) {
w = 0;
}
return weekDays[w];
}
/**
* 获取当前机器的IP
*
* @return /
*/
public static String getLocalIp() {
try {
InetAddress candidateAddress = null;
// 遍历所有的网络接口
for (Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); interfaces.hasMoreElements();) {
NetworkInterface anInterface = interfaces.nextElement();
// 在所有的接口下再遍历IP
for (Enumeration<InetAddress> inetAddresses = anInterface.getInetAddresses(); inetAddresses.hasMoreElements();) {
InetAddress inetAddr = inetAddresses.nextElement();
// 排除loopback类型地址
if (!inetAddr.isLoopbackAddress()) {
if (inetAddr.isSiteLocalAddress()) {
// 如果是site-local地址,就是它了
return inetAddr.getHostAddress();
} else if (candidateAddress == null) {
// site-local类型的地址未被发现,先记录候选地址
candidateAddress = inetAddr;
}
}
}
}
if (candidateAddress != null) {
return candidateAddress.getHostAddress();
}
// 如果没有发现 non-loopback地址.只能用最次选的方案
InetAddress jdkSuppliedAddress = InetAddress.getLocalHost();
if (jdkSuppliedAddress == null) {
return "";
}
return jdkSuppliedAddress.getHostAddress();
} catch (Exception e) {
return "";
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import java.io.PrintWriter;
import java.io.StringWriter;
/**
* 异常工具 2019-01-06
* @author Zheng Jie
*/
public class ThrowableUtil {
/**
* 获取堆栈信息
*/
public static String getStackTrace(Throwable throwable){
StringWriter sw = new StringWriter();
try (PrintWriter pw = new PrintWriter(sw)) {
throwable.printStackTrace(pw);
return sw.toString();
}
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ValidationUtil.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.ObjectUtil;
import me.zhengjie.exception.BadRequestException;
/**
* 验证工具
*
* @author Zheng Jie
* @date 2018-11-23
*/
public class ValidationUtil {
/**
* 验证空
*/
public static void isNull(Object obj, String entity, String parameter , Object value){
if(ObjectUtil.isNull(obj)){
String msg = entity + " 不存在: "+ parameter +" is "+ value;
throw new BadRequestException(msg);
}
}
/**
* 验证是否为邮箱
*/
public static boolean isEmail(String email) {
return Validator.isEmail(email);
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* <p>
* 验证码业务场景
* </p>
* @author Zheng Jie
* @date 2020-05-02
*/
@Getter
@AllArgsConstructor
public enum CodeBiEnum {
/* 旧邮箱修改邮箱 */
ONE(1, "旧邮箱修改邮箱"),
/* 通过邮箱修改密码 */
TWO(2, "通过邮箱修改密码");
private final Integer code;
private final String description;
public static CodeBiEnum find(Integer code) {
for (CodeBiEnum value : CodeBiEnum.values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* <p>
* 验证码业务场景对应的 Redis 中的 key
* </p>
* @author Zheng Jie
* @date 2020-05-02
*/
@Getter
@AllArgsConstructor
public enum CodeEnum {
/* 通过手机号码重置邮箱 */
PHONE_RESET_EMAIL_CODE("phone_reset_email_code_", "通过手机号码重置邮箱"),
/* 通过旧邮箱重置邮箱 */
EMAIL_RESET_EMAIL_CODE("email_reset_email_code_", "通过旧邮箱重置邮箱"),
/* 通过手机号码重置密码 */
PHONE_RESET_PWD_CODE("phone_reset_pwd_code_", "通过手机号码重置密码"),
/* 通过邮箱重置密码 */
EMAIL_RESET_PWD_CODE("email_reset_pwd_code_", "通过邮箱重置密码");
private final String key;
private final String description;
}
================================================
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java
================================================
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* <p>
* 数据权限枚举
* </p>
* @author Zheng Jie
* @date 2020-05-07
*/
@G
gitextract_rbfjroal/
├── .gitignore
├── LICENSE
├── README.md
├── eladmin-common/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── me/
│ │ └── zhengjie/
│ │ ├── annotation/
│ │ │ ├── DataPermission.java
│ │ │ ├── Limit.java
│ │ │ ├── Query.java
│ │ │ └── rest/
│ │ │ ├── AnonymousAccess.java
│ │ │ ├── AnonymousDeleteMapping.java
│ │ │ ├── AnonymousGetMapping.java
│ │ │ ├── AnonymousPatchMapping.java
│ │ │ ├── AnonymousPostMapping.java
│ │ │ └── AnonymousPutMapping.java
│ │ ├── aspect/
│ │ │ ├── LimitAspect.java
│ │ │ └── LimitType.java
│ │ ├── base/
│ │ │ ├── BaseDTO.java
│ │ │ ├── BaseEntity.java
│ │ │ └── BaseMapper.java
│ │ ├── config/
│ │ │ ├── AsyncExecutor.java
│ │ │ ├── AuditorConfig.java
│ │ │ ├── AuthorityConfig.java
│ │ │ ├── CustomP6SpyLogger.java
│ │ │ ├── RedisConfiguration.java
│ │ │ ├── RedissonConfiguration.java
│ │ │ ├── RemoveDruidAdConfig.java
│ │ │ ├── properties/
│ │ │ │ ├── FileProperties.java
│ │ │ │ └── RsaProperties.java
│ │ │ └── webConfig/
│ │ │ ├── ConfigurerAdapter.java
│ │ │ ├── MultipartConfig.java
│ │ │ ├── QueryCustomizer.java
│ │ │ ├── SwaggerConfig.java
│ │ │ ├── SwaggerDataConfig.java
│ │ │ └── WebSocketConfig.java
│ │ ├── exception/
│ │ │ ├── BadRequestException.java
│ │ │ ├── EntityExistException.java
│ │ │ ├── EntityNotFoundException.java
│ │ │ └── handler/
│ │ │ ├── ApiError.java
│ │ │ └── GlobalExceptionHandler.java
│ │ └── utils/
│ │ ├── AnonTagUtils.java
│ │ ├── BigDecimalUtils.java
│ │ ├── CacheKey.java
│ │ ├── CloseUtil.java
│ │ ├── DateUtil.java
│ │ ├── ElConstant.java
│ │ ├── EncryptUtils.java
│ │ ├── FileUtil.java
│ │ ├── PageResult.java
│ │ ├── PageUtil.java
│ │ ├── QueryHelp.java
│ │ ├── RedisUtils.java
│ │ ├── RequestHolder.java
│ │ ├── RsaUtils.java
│ │ ├── SecurityUtils.java
│ │ ├── SpringBeanHolder.java
│ │ ├── StringUtils.java
│ │ ├── ThrowableUtil.java
│ │ ├── ValidationUtil.java
│ │ └── enums/
│ │ ├── CodeBiEnum.java
│ │ ├── CodeEnum.java
│ │ ├── DataScopeEnum.java
│ │ └── RequestMethodEnum.java
│ └── test/
│ └── java/
│ └── me/
│ └── zhengjie/
│ └── utils/
│ ├── DateUtilsTest.java
│ ├── EncryptUtilsTest.java
│ ├── FileUtilTest.java
│ └── StringUtilsTest.java
├── eladmin-generator/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── me/
│ │ └── zhengjie/
│ │ ├── domain/
│ │ │ ├── ColumnInfo.java
│ │ │ ├── GenConfig.java
│ │ │ └── vo/
│ │ │ └── TableInfo.java
│ │ ├── repository/
│ │ │ ├── ColumnInfoRepository.java
│ │ │ └── GenConfigRepository.java
│ │ ├── rest/
│ │ │ ├── GenConfigController.java
│ │ │ └── GeneratorController.java
│ │ ├── service/
│ │ │ ├── GenConfigService.java
│ │ │ ├── GeneratorService.java
│ │ │ └── impl/
│ │ │ ├── GenConfigServiceImpl.java
│ │ │ └── GeneratorServiceImpl.java
│ │ └── utils/
│ │ ├── ColUtil.java
│ │ └── GenUtil.java
│ └── resources/
│ ├── gen.properties
│ └── template/
│ ├── admin/
│ │ ├── Controller.ftl
│ │ ├── Dto.ftl
│ │ ├── Entity.ftl
│ │ ├── Mapper.ftl
│ │ ├── QueryCriteria.ftl
│ │ ├── Repository.ftl
│ │ ├── Service.ftl
│ │ └── ServiceImpl.ftl
│ └── front/
│ ├── api.ftl
│ └── index.ftl
├── eladmin-logging/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── zhengjie/
│ ├── annotation/
│ │ └── Log.java
│ ├── aspect/
│ │ └── LogAspect.java
│ ├── domain/
│ │ └── SysLog.java
│ ├── repository/
│ │ └── LogRepository.java
│ ├── rest/
│ │ └── SysLogController.java
│ └── service/
│ ├── SysLogService.java
│ ├── dto/
│ │ ├── SysLogErrorDto.java
│ │ ├── SysLogQueryCriteria.java
│ │ └── SysLogSmallDto.java
│ ├── impl/
│ │ └── SysLogServiceImpl.java
│ └── mapstruct/
│ ├── LogErrorMapper.java
│ └── LogSmallMapper.java
├── eladmin-system/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── me/
│ │ │ └── zhengjie/
│ │ │ ├── AppRun.java
│ │ │ ├── modules/
│ │ │ │ ├── maint/
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── App.java
│ │ │ │ │ │ ├── Database.java
│ │ │ │ │ │ ├── Deploy.java
│ │ │ │ │ │ ├── DeployHistory.java
│ │ │ │ │ │ ├── ServerDeploy.java
│ │ │ │ │ │ └── enums/
│ │ │ │ │ │ └── DataTypeEnum.java
│ │ │ │ │ ├── repository/
│ │ │ │ │ │ ├── AppRepository.java
│ │ │ │ │ │ ├── DatabaseRepository.java
│ │ │ │ │ │ ├── DeployHistoryRepository.java
│ │ │ │ │ │ ├── DeployRepository.java
│ │ │ │ │ │ └── ServerDeployRepository.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── AppController.java
│ │ │ │ │ │ ├── DatabaseController.java
│ │ │ │ │ │ ├── DeployController.java
│ │ │ │ │ │ ├── DeployHistoryController.java
│ │ │ │ │ │ └── ServerDeployController.java
│ │ │ │ │ ├── service/
│ │ │ │ │ │ ├── AppService.java
│ │ │ │ │ │ ├── DatabaseService.java
│ │ │ │ │ │ ├── DeployHistoryService.java
│ │ │ │ │ │ ├── DeployService.java
│ │ │ │ │ │ ├── ServerDeployService.java
│ │ │ │ │ │ ├── dto/
│ │ │ │ │ │ │ ├── AppDto.java
│ │ │ │ │ │ │ ├── AppQueryCriteria.java
│ │ │ │ │ │ │ ├── DatabaseDto.java
│ │ │ │ │ │ │ ├── DatabaseQueryCriteria.java
│ │ │ │ │ │ │ ├── DeployDto.java
│ │ │ │ │ │ │ ├── DeployHistoryDto.java
│ │ │ │ │ │ │ ├── DeployHistoryQueryCriteria.java
│ │ │ │ │ │ │ ├── DeployQueryCriteria.java
│ │ │ │ │ │ │ ├── ServerDeployDto.java
│ │ │ │ │ │ │ └── ServerDeployQueryCriteria.java
│ │ │ │ │ │ ├── impl/
│ │ │ │ │ │ │ ├── AppServiceImpl.java
│ │ │ │ │ │ │ ├── DatabaseServiceImpl.java
│ │ │ │ │ │ │ ├── DeployHistoryServiceImpl.java
│ │ │ │ │ │ │ ├── DeployServiceImpl.java
│ │ │ │ │ │ │ └── ServerDeployServiceImpl.java
│ │ │ │ │ │ └── mapstruct/
│ │ │ │ │ │ ├── AppMapper.java
│ │ │ │ │ │ ├── DatabaseMapper.java
│ │ │ │ │ │ ├── DeployHistoryMapper.java
│ │ │ │ │ │ ├── DeployMapper.java
│ │ │ │ │ │ └── ServerDeployMapper.java
│ │ │ │ │ ├── util/
│ │ │ │ │ │ ├── ExecuteShellUtil.java
│ │ │ │ │ │ ├── ScpClientUtil.java
│ │ │ │ │ │ └── SqlUtils.java
│ │ │ │ │ └── websocket/
│ │ │ │ │ ├── MsgType.java
│ │ │ │ │ ├── SocketMsg.java
│ │ │ │ │ └── WebSocketServer.java
│ │ │ │ ├── quartz/
│ │ │ │ │ ├── config/
│ │ │ │ │ │ ├── JobRunner.java
│ │ │ │ │ │ └── QuartzConfig.java
│ │ │ │ │ ├── domain/
│ │ │ │ │ │ ├── QuartzJob.java
│ │ │ │ │ │ └── QuartzLog.java
│ │ │ │ │ ├── repository/
│ │ │ │ │ │ ├── QuartzJobRepository.java
│ │ │ │ │ │ └── QuartzLogRepository.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ └── QuartzJobController.java
│ │ │ │ │ ├── service/
│ │ │ │ │ │ ├── QuartzJobService.java
│ │ │ │ │ │ ├── dto/
│ │ │ │ │ │ │ └── JobQueryCriteria.java
│ │ │ │ │ │ └── impl/
│ │ │ │ │ │ └── QuartzJobServiceImpl.java
│ │ │ │ │ ├── task/
│ │ │ │ │ │ └── TestTask.java
│ │ │ │ │ └── utils/
│ │ │ │ │ ├── ExecutionJob.java
│ │ │ │ │ ├── QuartzManage.java
│ │ │ │ │ └── QuartzRunnable.java
│ │ │ │ ├── security/
│ │ │ │ │ ├── config/
│ │ │ │ │ │ ├── CaptchaConfig.java
│ │ │ │ │ │ ├── LoginProperties.java
│ │ │ │ │ │ ├── SecurityProperties.java
│ │ │ │ │ │ ├── SpringSecurityConfig.java
│ │ │ │ │ │ └── enums/
│ │ │ │ │ │ └── LoginCodeEnum.java
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── AuthController.java
│ │ │ │ │ │ └── OnlineController.java
│ │ │ │ │ ├── security/
│ │ │ │ │ │ ├── JwtAccessDeniedHandler.java
│ │ │ │ │ │ ├── JwtAuthenticationEntryPoint.java
│ │ │ │ │ │ ├── TokenConfigurer.java
│ │ │ │ │ │ ├── TokenFilter.java
│ │ │ │ │ │ └── TokenProvider.java
│ │ │ │ │ └── service/
│ │ │ │ │ ├── OnlineUserService.java
│ │ │ │ │ ├── UserCacheManager.java
│ │ │ │ │ ├── UserDetailsServiceImpl.java
│ │ │ │ │ └── dto/
│ │ │ │ │ ├── AuthUserDto.java
│ │ │ │ │ ├── AuthorityDto.java
│ │ │ │ │ ├── JwtUserDto.java
│ │ │ │ │ └── OnlineUserDto.java
│ │ │ │ └── system/
│ │ │ │ ├── domain/
│ │ │ │ │ ├── Dept.java
│ │ │ │ │ ├── Dict.java
│ │ │ │ │ ├── DictDetail.java
│ │ │ │ │ ├── Job.java
│ │ │ │ │ ├── Menu.java
│ │ │ │ │ ├── Role.java
│ │ │ │ │ ├── User.java
│ │ │ │ │ └── vo/
│ │ │ │ │ ├── MenuMetaVo.java
│ │ │ │ │ ├── MenuVo.java
│ │ │ │ │ └── UserPassVo.java
│ │ │ │ ├── repository/
│ │ │ │ │ ├── DeptRepository.java
│ │ │ │ │ ├── DictDetailRepository.java
│ │ │ │ │ ├── DictRepository.java
│ │ │ │ │ ├── JobRepository.java
│ │ │ │ │ ├── MenuRepository.java
│ │ │ │ │ ├── RoleRepository.java
│ │ │ │ │ └── UserRepository.java
│ │ │ │ ├── rest/
│ │ │ │ │ ├── DeptController.java
│ │ │ │ │ ├── DictController.java
│ │ │ │ │ ├── DictDetailController.java
│ │ │ │ │ ├── JobController.java
│ │ │ │ │ ├── LimitController.java
│ │ │ │ │ ├── MenuController.java
│ │ │ │ │ ├── MonitorController.java
│ │ │ │ │ ├── RoleController.java
│ │ │ │ │ ├── UserController.java
│ │ │ │ │ └── VerifyController.java
│ │ │ │ └── service/
│ │ │ │ ├── DataService.java
│ │ │ │ ├── DeptService.java
│ │ │ │ ├── DictDetailService.java
│ │ │ │ ├── DictService.java
│ │ │ │ ├── JobService.java
│ │ │ │ ├── MenuService.java
│ │ │ │ ├── MonitorService.java
│ │ │ │ ├── RoleService.java
│ │ │ │ ├── UserService.java
│ │ │ │ ├── VerifyService.java
│ │ │ │ ├── dto/
│ │ │ │ │ ├── DeptDto.java
│ │ │ │ │ ├── DeptQueryCriteria.java
│ │ │ │ │ ├── DeptSmallDto.java
│ │ │ │ │ ├── DictDetailDto.java
│ │ │ │ │ ├── DictDetailQueryCriteria.java
│ │ │ │ │ ├── DictDto.java
│ │ │ │ │ ├── DictQueryCriteria.java
│ │ │ │ │ ├── DictSmallDto.java
│ │ │ │ │ ├── JobDto.java
│ │ │ │ │ ├── JobQueryCriteria.java
│ │ │ │ │ ├── JobSmallDto.java
│ │ │ │ │ ├── MenuDto.java
│ │ │ │ │ ├── MenuQueryCriteria.java
│ │ │ │ │ ├── RoleDto.java
│ │ │ │ │ ├── RoleQueryCriteria.java
│ │ │ │ │ ├── RoleSmallDto.java
│ │ │ │ │ ├── UserDto.java
│ │ │ │ │ └── UserQueryCriteria.java
│ │ │ │ ├── impl/
│ │ │ │ │ ├── DataServiceImpl.java
│ │ │ │ │ ├── DeptServiceImpl.java
│ │ │ │ │ ├── DictDetailServiceImpl.java
│ │ │ │ │ ├── DictServiceImpl.java
│ │ │ │ │ ├── JobServiceImpl.java
│ │ │ │ │ ├── MenuServiceImpl.java
│ │ │ │ │ ├── MonitorServiceImpl.java
│ │ │ │ │ ├── RoleServiceImpl.java
│ │ │ │ │ ├── UserServiceImpl.java
│ │ │ │ │ └── VerifyServiceImpl.java
│ │ │ │ └── mapstruct/
│ │ │ │ ├── DeptMapper.java
│ │ │ │ ├── DeptSmallMapper.java
│ │ │ │ ├── DictDetailMapper.java
│ │ │ │ ├── DictMapper.java
│ │ │ │ ├── DictSmallMapper.java
│ │ │ │ ├── JobMapper.java
│ │ │ │ ├── JobSmallMapper.java
│ │ │ │ ├── MenuMapper.java
│ │ │ │ ├── RoleMapper.java
│ │ │ │ ├── RoleSmallMapper.java
│ │ │ │ └── UserMapper.java
│ │ │ └── sysrunner/
│ │ │ └── SystemRunner.java
│ │ └── resources/
│ │ ├── banner.txt
│ │ ├── config/
│ │ │ ├── application-dev.yml
│ │ │ ├── application-prod.yml
│ │ │ ├── application-quartz.yml
│ │ │ └── application.yml
│ │ ├── logback.xml
│ │ ├── spy.properties
│ │ └── template/
│ │ ├── email.ftl
│ │ └── taskAlarm.ftl
│ └── test/
│ └── java/
│ └── me/
│ └── zhengjie/
│ └── EladminSystemApplicationTests.java
├── eladmin-tools/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── me/
│ └── zhengjie/
│ ├── config/
│ │ └── AmzS3Config.java
│ ├── domain/
│ │ ├── AlipayConfig.java
│ │ ├── EmailConfig.java
│ │ ├── LocalStorage.java
│ │ ├── S3Storage.java
│ │ ├── enums/
│ │ │ └── AliPayStatusEnum.java
│ │ └── vo/
│ │ ├── EmailVo.java
│ │ └── TradeVo.java
│ ├── repository/
│ │ ├── AliPayRepository.java
│ │ ├── EmailRepository.java
│ │ ├── LocalStorageRepository.java
│ │ └── S3StorageRepository.java
│ ├── rest/
│ │ ├── AliPayController.java
│ │ ├── EmailController.java
│ │ ├── LocalStorageController.java
│ │ └── S3StorageController.java
│ ├── service/
│ │ ├── AliPayService.java
│ │ ├── EmailService.java
│ │ ├── LocalStorageService.java
│ │ ├── S3StorageService.java
│ │ ├── dto/
│ │ │ ├── LocalStorageDto.java
│ │ │ ├── LocalStorageQueryCriteria.java
│ │ │ └── S3StorageQueryCriteria.java
│ │ ├── impl/
│ │ │ ├── AliPayServiceImpl.java
│ │ │ ├── EmailServiceImpl.java
│ │ │ ├── LocalStorageServiceImpl.java
│ │ │ └── S3StorageServiceImpl.java
│ │ └── mapstruct/
│ │ └── LocalStorageMapper.java
│ └── utils/
│ └── AlipayUtils.java
├── pom.xml
└── sql/
├── eladmin.sql
└── quartz.sql
SYMBOL INDEX (1277 symbols across 267 files)
FILE: eladmin-common/src/main/java/me/zhengjie/annotation/Query.java
type Type (line 51) | enum Type {
type Join (line 86) | enum Join {
FILE: eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java
class LimitAspect (line 41) | @Aspect
method LimitAspect (line 48) | public LimitAspect(RedisTemplate<Object,Object> redisTemplate) {
method pointcut (line 52) | @Pointcut("@annotation(me.zhengjie.annotation.Limit)")
method around (line 56) | @Around("pointcut()")
method buildLuaScript (line 88) | private String buildLuaScript() {
FILE: eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java
type LimitType (line 22) | public enum LimitType {
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java
class BaseDTO (line 16) | @Getter
method toString (line 35) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java
class BaseEntity (line 40) | @Getter
method toString (line 74) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java
type BaseMapper (line 24) | public interface BaseMapper<D, E> {
method toEntity (line 31) | E toEntity(D dto);
method toDto (line 38) | D toDto(E entity);
method toEntity (line 45) | List <E> toEntity(List<D> dtoList);
method toDto (line 52) | List <D> toDto(List<E> entityList);
FILE: eladmin-common/src/main/java/me/zhengjie/config/AsyncExecutor.java
class AsyncExecutor (line 34) | @EnableAsync
method setCorePoolSize (line 46) | @Value("${task.pool.core-pool-size}")
method setMaxPoolSize (line 51) | @Value("${task.pool.max-pool-size}")
method setKeepAliveSeconds (line 56) | @Value("${task.pool.keep-alive-seconds}")
method setQueueCapacity (line 61) | @Value("${task.pool.queue-capacity}")
method getAsyncExecutor (line 75) | @Override
method taskAsync (line 90) | @Bean("taskAsync")
FILE: eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java
class AuditorConfig (line 28) | @Component("auditorAware")
method getCurrentAuditor (line 36) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java
class AuthorityConfig (line 28) | @Service(value = "el")
method check (line 36) | public Boolean check(String ...permissions){
FILE: eladmin-common/src/main/java/me/zhengjie/config/CustomP6SpyLogger.java
class CustomP6SpyLogger (line 27) | @Slf4j
method formatMessage (line 48) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java
class RedisConfiguration (line 50) | @Slf4j
method redisCacheConfiguration (line 63) | @Bean
method redisTemplate (line 72) | @Bean(name = "redisTemplate")
method cacheManager (line 96) | @Bean
method keyGenerator (line 107) | @Bean
method errorHandler (line 129) | @Bean
class FastJsonRedisSerializer (line 162) | static class FastJsonRedisSerializer<T> implements RedisSerializer<T> {
method FastJsonRedisSerializer (line 166) | FastJsonRedisSerializer(Class<T> clazz) {
method serialize (line 171) | @Override
method deserialize (line 180) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/config/RedissonConfiguration.java
class RedissonConfiguration (line 29) | @Data
method redissonClient (line 55) | @Bean
FILE: eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java
class RemoveDruidAdConfig (line 23) | @Configuration
method removeDruidAdFilterRegistrationBean (line 37) | @Bean
FILE: eladmin-common/src/main/java/me/zhengjie/config/properties/FileProperties.java
class FileProperties (line 26) | @Data
method getPath (line 43) | public ElPath getPath(){
class ElPath (line 53) | @Data
FILE: eladmin-common/src/main/java/me/zhengjie/config/properties/RsaProperties.java
class RsaProperties (line 28) | @Data
method setPrivateKey (line 34) | @Value("${rsa.private_key}")
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/ConfigurerAdapter.java
class ConfigurerAdapter (line 42) | @Configuration
method ConfigurerAdapter (line 49) | public ConfigurerAdapter(FileProperties properties) {
method corsFilter (line 53) | @Bean
method addResourceHandlers (line 65) | @Override
method configureMessageConverters (line 75) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/MultipartConfig.java
class MultipartConfig (line 28) | @Configuration
method multipartConfigElement (line 34) | @Bean
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/QueryCustomizer.java
class QueryCustomizer (line 25) | @Configuration(proxyBeanMethods = false)
method customize (line 27) | @Override
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerConfig.java
class SwaggerConfig (line 53) | @Configuration
method createRestApi (line 69) | @Bean
method apiInfo (line 85) | private ApiInfo apiInfo() {
method securitySchemes (line 93) | private List<SecurityScheme> securitySchemes() {
method securityContexts (line 101) | private List<SecurityContext> securityContexts() {
method getContextByPath (line 108) | private SecurityContext getContextByPath() {
method defaultAuth (line 120) | private List<SecurityReference> defaultAuth() {
method springfoxHandlerProviderBeanPostProcessor (line 133) | @Bean
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerDataConfig.java
class SwaggerDataConfig (line 22) | @Configuration
method pageableConvention (line 25) | @Bean
class Page (line 40) | @ApiModel
FILE: eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java
class WebSocketConfig (line 26) | @Configuration
method serverEndpointExporter (line 29) | @Bean
FILE: eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java
class BadRequestException (line 27) | @Getter
method BadRequestException (line 32) | public BadRequestException(String msg){
method BadRequestException (line 36) | public BadRequestException(HttpStatus status,String msg){
FILE: eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java
class EntityExistException (line 24) | public class EntityExistException extends RuntimeException {
method EntityExistException (line 26) | public EntityExistException(Class clazz, String field, String val) {
method generateMessage (line 30) | private static String generateMessage(String entity, String field, Str...
FILE: eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java
class EntityNotFoundException (line 24) | public class EntityNotFoundException extends RuntimeException {
method EntityNotFoundException (line 26) | public EntityNotFoundException(Class clazz, String field, String val) {
method generateMessage (line 30) | private static String generateMessage(String entity, String field, Str...
FILE: eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java
class ApiError (line 24) | @Data
method ApiError (line 31) | private ApiError() {
method error (line 35) | public static ApiError error(String message){
method error (line 41) | public static ApiError error(Integer status, String message){
FILE: eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java
class GlobalExceptionHandler (line 37) | @Slf4j
method handleException (line 44) | @ExceptionHandler(Throwable.class)
method badCredentialsException (line 54) | @ExceptionHandler(BadCredentialsException.class)
method badRequestException (line 65) | @ExceptionHandler(value = BadRequestException.class)
method entityExistException (line 75) | @ExceptionHandler(value = EntityExistException.class)
method entityNotFoundException (line 85) | @ExceptionHandler(value = EntityNotFoundException.class)
method handleMethodArgumentNotValidException (line 95) | @ExceptionHandler(MethodArgumentNotValidException.class)
method buildResponseEntity (line 110) | private ResponseEntity<ApiError> buildResponseEntity(ApiError apiError) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/AnonTagUtils.java
class AnonTagUtils (line 33) | public class AnonTagUtils {
method getAnonymousUrl (line 40) | public static Map<String, Set<String>> getAnonymousUrl(ApplicationCont...
method getAllAnonymousUrl (line 95) | public static Set<String> getAllAnonymousUrl(ApplicationContext applic...
FILE: eladmin-common/src/main/java/me/zhengjie/utils/BigDecimalUtils.java
class BigDecimalUtils (line 26) | public class BigDecimalUtils {
method toBigDecimal (line 33) | private static BigDecimal toBigDecimal(Object obj) {
method add (line 53) | public static BigDecimal add(Object a, Object b) {
method subtract (line 65) | public static BigDecimal subtract(Object a, Object b) {
method multiply (line 77) | public static BigDecimal multiply(Object a, Object b) {
method divide (line 89) | public static BigDecimal divide(Object a, Object b) {
method divide (line 102) | public static BigDecimal divide(Object a, Object b, int scale) {
method centsToYuan (line 113) | public static BigDecimal centsToYuan(Object obj) {
method yuanToCents (line 123) | public static Long yuanToCents(Object obj) {
method main (line 128) | public static void main(String[] args) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java
type CacheKey (line 23) | public interface CacheKey {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java
class CloseUtil (line 26) | public class CloseUtil {
method close (line 28) | public static void close(Closeable closeable) {
method close (line 38) | public static void close(AutoCloseable closeable) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java
class DateUtil (line 28) | public class DateUtil {
method getTimeStamp (line 39) | public static Long getTimeStamp(LocalDateTime localDateTime) {
method fromTimeStamp (line 49) | public static LocalDateTime fromTimeStamp(Long timeStamp) {
method toDate (line 60) | public static Date toDate(LocalDateTime localDateTime) {
method toDate (line 71) | public static Date toDate(LocalDate localDate) {
method toLocalDateTime (line 83) | public static LocalDateTime toLocalDateTime(Date date) {
method localDateTimeFormat (line 94) | public static String localDateTimeFormat(LocalDateTime localDateTime, ...
method localDateTimeFormat (line 106) | public static String localDateTimeFormat(LocalDateTime localDateTime, ...
method localDateTimeFormatyMdHms (line 116) | public static String localDateTimeFormatyMdHms(LocalDateTime localDate...
method localDateTimeFormatyMd (line 126) | public String localDateTimeFormatyMd(LocalDateTime localDateTime) {
method parseLocalDateTimeFormat (line 136) | public static LocalDateTime parseLocalDateTimeFormat(String localDateT...
method parseLocalDateTimeFormat (line 147) | public static LocalDateTime parseLocalDateTimeFormat(String localDateT...
method parseLocalDateTimeFormatyMdHms (line 157) | public static LocalDateTime parseLocalDateTimeFormatyMdHms(String loca...
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java
class ElConstant (line 24) | public class ElConstant {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java
class EncryptUtils (line 30) | public class EncryptUtils {
method getDesKeySpec (line 35) | private static DESKeySpec getDesKeySpec(String source) throws Exception {
method desEncrypt (line 46) | public static String desEncrypt(String source) throws Exception {
method desDecrypt (line 58) | public static String desDecrypt(String source) throws Exception {
method byte2hex (line 69) | private static String byte2hex(byte[] inStr) {
method hex2byte (line 83) | private static byte[] hex2byte(byte[] b) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
class FileUtil (line 44) | @Slf4j
method toFile (line 88) | public static File toFile(MultipartFile multipartFile) {
method getExtensionName (line 108) | public static String getExtensionName(String filename) {
method getFileNameNoEx (line 121) | public static String getFileNameNoEx(String filename) {
method getSize (line 134) | public static String getSize(long size) {
method inputStreamToFile (line 154) | static File inputStreamToFile(InputStream ins, String name){
method upload (line 180) | public static File upload(MultipartFile file, String filePath) {
method sanitizeCellValue (line 218) | public static String sanitizeCellValue(String value) {
method downloadExcel (line 234) | public static void downloadExcel(List<Map<String, Object>> list, HttpS...
method getFileType (line 269) | public static String getFileType(String type) {
method checkSize (line 287) | public static void checkSize(long maxSize, long size) {
method check (line 298) | public static boolean check(File file1, File file2) {
method check (line 310) | public static boolean check(String file1Md5, String file2Md5) {
method getByte (line 314) | private static byte[] getByte(File file) {
method getMd5 (line 334) | private static String getMd5(byte[] bytes) {
method downloadFile (line 363) | public static void downloadFile(HttpServletRequest request, HttpServle...
method verifyFilename (line 393) | public static String verifyFilename(String fileName) {
method getMd5 (line 425) | public static String getMd5(File file) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java
class PageResult (line 16) | @Data
FILE: eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java
class PageUtil (line 26) | public class PageUtil extends cn.hutool.core.util.PageUtil {
method paging (line 31) | public static <T> List<T> paging(int page, int size , List<T> list) {
method toPage (line 46) | public static <T> PageResult<T> toPage(Page<T> page) {
method toPage (line 53) | public static <T> PageResult<T> toPage(List<T> list, long totalElement...
method noData (line 60) | public static <T> PageResult<T> noData () {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java
class QueryHelp (line 32) | @Slf4j
method getPredicate (line 36) | public static <R, Q> Predicate getPredicate(Root<R> root, Q query, Cri...
method getExpression (line 189) | @SuppressWarnings("unchecked")
method isBlank (line 198) | private static boolean isBlank(final CharSequence cs) {
method getAllFields (line 211) | public static List<Field> getAllFields(Class clazz, List<Field> fields) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java
class RedisUtils (line 37) | @Component
method RedisUtils (line 44) | public RedisUtils(RedisTemplate<Object, Object> redisTemplate) {
method expire (line 56) | public boolean expire(String key, long time) {
method expire (line 75) | public boolean expire(String key, long time, TimeUnit timeUnit) {
method getExpire (line 93) | public long getExpire(Object key) {
method scan (line 103) | public List<String> scan(String pattern) {
method findKeysForPage (line 128) | public List<String> findKeysForPage(String patternKey, int page, int s...
method hasKey (line 164) | public boolean hasKey(String key) {
method del (line 178) | public void del(String... keys) {
method scanDel (line 204) | public void scanDel(String pattern){
method get (line 223) | public Object get(String key) {
method get (line 233) | public <T> T get(String key, Class<T> clazz) {
method getList (line 255) | public <T> List<T> getList(String key, Class<T> clazz) {
method getStr (line 277) | public String getStr(String key) {
method multiGet (line 295) | public List<Object> multiGet(List<String> keys) {
method set (line 309) | public boolean set(String key, Object value) {
method set (line 331) | public boolean set(String key, Object value, long time) {
method set (line 354) | public boolean set(String key, Object value, long time, TimeUnit timeU...
method hget (line 377) | public Object hget(String key, String item) {
method hmget (line 387) | public Map<Object, Object> hmget(String key) {
method hmset (line 399) | public boolean hmset(String key, Map<String, Object> map) {
method hmset (line 417) | public boolean hmset(String key, Map<String, Object> map, long time) {
method hset (line 438) | public boolean hset(String key, String item, Object value) {
method hset (line 457) | public boolean hset(String key, String item, Object value, long time) {
method hdel (line 476) | public void hdel(String key, Object... item) {
method hHasKey (line 487) | public boolean hHasKey(String key, String item) {
method hincr (line 499) | public double hincr(String key, String item, double by) {
method hdecr (line 511) | public double hdecr(String key, String item, double by) {
method sGet (line 523) | public Set<Object> sGet(String key) {
method sHasKey (line 539) | public boolean sHasKey(String key, Object value) {
method sSet (line 555) | public long sSet(String key, Object... values) {
method sSetAndTime (line 572) | public long sSetAndTime(String key, long time, Object... values) {
method sGetSetSize (line 591) | public long sGetSetSize(String key) {
method setRemove (line 607) | public long setRemove(String key, Object... values) {
method lGet (line 627) | public List<Object> lGet(String key, long start, long end) {
method lGetListSize (line 642) | public long lGetListSize(String key) {
method lGetIndex (line 658) | public Object lGetIndex(String key, long index) {
method lSet (line 674) | public boolean lSet(String key, Object value) {
method lSet (line 692) | public boolean lSet(String key, Object value, long time) {
method lSet (line 712) | public boolean lSet(String key, List<Object> value) {
method lSet (line 730) | public boolean lSet(String key, List<Object> value, long time) {
method lUpdateIndex (line 751) | public boolean lUpdateIndex(String key, long index, Object value) {
method lRemove (line 769) | public long lRemove(String key, long count, Object value) {
method delByKeys (line 782) | public void delByKeys(String prefix, Set<Long> ids) {
method increment (line 797) | public Long increment(String key) {
method decrement (line 806) | public Long decrement(String key) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java
class RequestHolder (line 28) | public class RequestHolder {
method getHttpServletRequest (line 30) | public static HttpServletRequest getHttpServletRequest() {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java
class RsaUtils (line 17) | public class RsaUtils {
method main (line 21) | public static void main(String[] args) throws Exception {
method test1 (line 36) | private static void test1(RsaKeyPair keyPair) throws Exception {
method test2 (line 55) | private static void test2(RsaKeyPair keyPair) throws Exception {
method decryptByPublicKey (line 78) | public static String decryptByPublicKey(String publicKeyText, String t...
method encryptByPrivateKey (line 96) | public static String encryptByPrivateKey(String privateKeyText, String...
method decryptByPrivateKey (line 114) | public static String decryptByPrivateKey(String privateKeyText, String...
method encryptByPublicKey (line 131) | public static String encryptByPublicKey(String publicKeyText, String t...
method doLongerCipherFinal (line 141) | private static byte[] doLongerCipherFinal(int opMode,Cipher cipher, by...
method generateKeyPair (line 164) | public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmExcep...
class RsaKeyPair (line 179) | public static class RsaKeyPair {
method RsaKeyPair (line 184) | public RsaKeyPair(String publicKey, String privateKey) {
method getPublicKey (line 189) | public String getPublicKey() {
method getPrivateKey (line 193) | public String getPrivateKey() {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java
class SecurityUtils (line 42) | @Slf4j
method setHeader (line 50) | @Value("${jwt.header}")
method setTokenStartWith (line 55) | @Value("${jwt.token-start-with}")
method getCurrentUser (line 64) | public static UserDetails getCurrentUser() {
method getCurrentUserDataScope (line 73) | public static List<Long> getCurrentUserDataScope(){
method getDataScopeType (line 85) | public static String getDataScopeType() {
method getCurrentUserId (line 97) | public static Long getCurrentUserId() {
method getCurrentUserId (line 105) | public static Long getCurrentUserId(String token) {
method getCurrentUsername (line 115) | public static String getCurrentUsername() {
method getCurrentUsername (line 124) | public static String getCurrentUsername(String token) {
method getToken (line 133) | public static String getToken() {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/SpringBeanHolder.java
class SpringBeanHolder (line 33) | @Slf4j
method addCallBacks (line 47) | public synchronized static void addCallBacks(SpringBeanHolder.CallBack...
method getBean (line 59) | public static <T> T getBean(String name) {
method getBean (line 67) | public static <T> T getBean(Class<T> requiredType) {
method getProperties (line 80) | public static <T> T getProperties(String property, T defaultValue, Cla...
method getProperties (line 94) | public static String getProperties(String property) {
method getProperties (line 105) | public static <T> T getProperties(String property, Class<T> requiredTy...
method assertContextInjected (line 112) | private static void assertContextInjected() {
method clearHolder (line 122) | private static void clearHolder() {
method destroy (line 128) | @Override
method setApplicationContext (line 133) | @Override
method getAllServiceBeanName (line 152) | public static List<String> getAllServiceBeanName() {
type CallBack (line 157) | interface CallBack {
method executor (line 162) | void executor();
method getCallBackName (line 168) | default String getCallBackName() {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java
class StringUtils (line 35) | @Slf4j
method toCamelCase (line 53) | public static String toCamelCase(String s) {
method toCapitalizeCamelCase (line 85) | public static String toCapitalizeCamelCase(String s) {
method toUnderScoreCase (line 100) | static String toUnderScoreCase(String s) {
method getIp (line 134) | public static String getIp(HttpServletRequest request) {
method getCityInfo (line 164) | public static String getCityInfo(String ip) {
method getBrowser (line 175) | public static String getBrowser(HttpServletRequest request) {
method getWeekDay (line 184) | public static String getWeekDay() {
method getLocalIp (line 201) | public static String getLocalIp() {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java
class ThrowableUtil (line 25) | public class ThrowableUtil {
method getStackTrace (line 30) | public static String getStackTrace(Throwable throwable){
FILE: eladmin-common/src/main/java/me/zhengjie/utils/ValidationUtil.java
class ValidationUtil (line 28) | public class ValidationUtil {
method isNull (line 33) | public static void isNull(Object obj, String entity, String parameter ...
method isEmail (line 43) | public static boolean isEmail(String email) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java
type CodeBiEnum (line 28) | @Getter
method find (line 41) | public static CodeBiEnum find(Integer code) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java
type CodeEnum (line 28) | @Getter
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java
type DataScopeEnum (line 28) | @Getter
method find (line 44) | public static DataScopeEnum find(String val) {
FILE: eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java
type RequestMethodEnum (line 27) | @Getter
method find (line 66) | public static RequestMethodEnum find(String type) {
FILE: eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java
class DateUtilsTest (line 8) | public class DateUtilsTest {
method test1 (line 9) | @Test
method test2 (line 16) | @Test
FILE: eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java
class EncryptUtilsTest (line 8) | public class EncryptUtilsTest {
method testDesEncrypt (line 13) | @Test
method testDesDecrypt (line 25) | @Test
FILE: eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java
class FileUtilTest (line 9) | public class FileUtilTest {
method testToFile (line 11) | @Test
method testGetExtensionName (line 17) | @Test
method testGetFileNameNoEx (line 23) | @Test
method testGetSize (line 29) | @Test
FILE: eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java
class StringUtilsTest (line 17) | public class StringUtilsTest {
method testToCamelCase (line 19) | @Test
method testToCapitalizeCamelCase (line 24) | @Test
method testToUnderScoreCase (line 30) | @Test
method testGetWeekDay (line 38) | @Test
method testGetIP (line 44) | @Test
FILE: eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java
class ColumnInfo (line 31) | @Getter
method ColumnInfo (line 83) | public ColumnInfo(String tableName, String columnName, Boolean notNull...
FILE: eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java
class GenConfig (line 31) | @Getter
method GenConfig (line 38) | public GenConfig(String tableName) {
FILE: eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java
class TableInfo (line 29) | @Data
FILE: eladmin-generator/src/main/java/me/zhengjie/repository/ColumnInfoRepository.java
type ColumnInfoRepository (line 26) | public interface ColumnInfoRepository extends JpaRepository<ColumnInfo,L...
method findByTableNameOrderByIdAsc (line 33) | List<ColumnInfo> findByTableNameOrderByIdAsc(String tableName);
FILE: eladmin-generator/src/main/java/me/zhengjie/repository/GenConfigRepository.java
type GenConfigRepository (line 25) | public interface GenConfigRepository extends JpaRepository<GenConfig,Lon...
method findByTableName (line 32) | GenConfig findByTableName(String tableName);
FILE: eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java
class GenConfigController (line 32) | @RestController
method queryGenConfig (line 40) | @ApiOperation("查询")
method updateGenConfig (line 46) | @PutMapping
FILE: eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java
class GeneratorController (line 40) | @RestController
method queryAllTables (line 52) | @ApiOperation("查询数据库数据")
method queryTables (line 58) | @ApiOperation("查询数据库数据")
method queryColumns (line 67) | @ApiOperation("查询字段数据")
method saveColumn (line 74) | @ApiOperation("保存字段数据")
method syncColumn (line 81) | @ApiOperation("同步字段数据")
method generatorCode (line 90) | @ApiOperation("生成代码")
FILE: eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java
type GenConfigService (line 24) | public interface GenConfigService {
method find (line 31) | GenConfig find(String tableName);
method update (line 39) | GenConfig update(String tableName, GenConfig genConfig);
FILE: eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java
type GeneratorService (line 31) | public interface GeneratorService {
method getTables (line 39) | PageResult<TableInfo> getTables(String name, int[] startEnd);
method getColumns (line 46) | List<ColumnInfo> getColumns(String name);
method sync (line 53) | void sync(List<ColumnInfo> columnInfos, List<ColumnInfo> columnInfoList);
method save (line 59) | void save(List<ColumnInfo> columnInfos);
method getTables (line 65) | Object getTables();
method generator (line 72) | void generator(GenConfig genConfig, List<ColumnInfo> columns);
method preview (line 80) | ResponseEntity<Object> preview(GenConfig genConfig, List<ColumnInfo> c...
method download (line 89) | void download(GenConfig genConfig, List<ColumnInfo> columns, HttpServl...
method query (line 96) | List<ColumnInfo> query(String table);
FILE: eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java
class GenConfigServiceImpl (line 29) | @Service
method find (line 36) | @Override
method update (line 45) | @Override
FILE: eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java
class GeneratorServiceImpl (line 51) | @Service
method getTables (line 62) | @Override
method getTables (line 72) | @Override
method getColumns (line 96) | @Override
method query (line 107) | @Override
method sync (line 132) | @Override
method save (line 164) | @Override
method generator (line 169) | @Override
method preview (line 182) | @Override
method download (line 191) | @Override
FILE: eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java
class ColUtil (line 28) | public class ColUtil {
method cloToJava (line 37) | static String cloToJava(String type) {
method getConfig (line 46) | public static PropertiesConfiguration getConfig() {
FILE: eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java
class GenUtil (line 40) | @Slf4j
method getAdminTemplateNames (line 57) | private static List<String> getAdminTemplateNames() {
method getFrontTemplateNames (line 75) | private static List<String> getFrontTemplateNames() {
method preview (line 82) | public static List<Map<String, Object>> preview(List<ColumnInfo> colum...
method download (line 108) | public static String download(List<ColumnInfo> columns, GenConfig genC...
method generatorCode (line 148) | public static void generatorCode(List<ColumnInfo> columnInfos, GenConf...
method getGenMap (line 188) | private static Map<String, Object> getGenMap(List<ColumnInfo> columnIn...
method getAdminFilePath (line 350) | private static String getAdminFilePath(String templateName, GenConfig ...
method getFrontFilePath (line 395) | private static String getFrontFilePath(String templateName, String api...
method genFile (line 408) | private static void genFile(File file, Template template, Map<String, ...
FILE: eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java
class LogAspect (line 38) | @Component
method LogAspect (line 47) | public LogAspect(SysLogService sysLogService) {
method logPointcut (line 54) | @Pointcut("@annotation(me.zhengjie.annotation.Log)")
method logAround (line 64) | @Around("logPointcut()")
method logAfterThrowing (line 82) | @AfterThrowing(pointcut = "logPointcut()", throwing = "e")
method getUsername (line 95) | public String getUsername() {
FILE: eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java
class SysLog (line 32) | @Entity
method SysLog (line 81) | public SysLog(String logType, Long time) {
FILE: eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java
type LogRepository (line 29) | @Repository
method deleteByLogType (line 36) | @Modifying
FILE: eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java
class SysLogController (line 39) | @RestController
method exportLog (line 47) | @Log("导出数据")
method exportErrorLog (line 56) | @Log("导出错误数据")
method queryLog (line 64) | @GetMapping
method queryUserLog (line 72) | @GetMapping(value = "/user")
method queryErrorLog (line 80) | @GetMapping(value = "/error")
method queryErrorLogDetail (line 88) | @GetMapping(value = "/error/{id}")
method delAllErrorLog (line 94) | @DeleteMapping(value = "/del/error")
method delAllInfoLog (line 103) | @DeleteMapping(value = "/del/info")
FILE: eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java
type SysLogService (line 34) | public interface SysLogService {
method queryAll (line 42) | Object queryAll(SysLogQueryCriteria criteria, Pageable pageable);
method queryAll (line 49) | List<SysLog> queryAll(SysLogQueryCriteria criteria);
method queryAllByUser (line 57) | PageResult<SysLogSmallDto> queryAllByUser(SysLogQueryCriteria criteria...
method save (line 67) | @Async
method findByErrDetail (line 75) | Object findByErrDetail(Long id);
method download (line 83) | void download(List<SysLog> sysLogs, HttpServletResponse response) thro...
method delAllByError (line 88) | void delAllByError();
method delAllByInfo (line 93) | void delAllByInfo();
FILE: eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogErrorDto.java
class SysLogErrorDto (line 27) | @Data
FILE: eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogQueryCriteria.java
class SysLogQueryCriteria (line 29) | @Data
FILE: eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogSmallDto.java
class SysLogSmallDto (line 27) | @Data
FILE: eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java
class SysLogServiceImpl (line 51) | @Service
method queryAll (line 61) | @Override
method queryAll (line 71) | @Override
method queryAllByUser (line 76) | @Override
method save (line 82) | @Override
method getParameter (line 121) | private JSONObject getParameter(Method method, Object[] args) {
method findByErrDetail (line 164) | @Override
method download (line 172) | @Override
method delAllByError (line 190) | @Override
method delAllByInfo (line 196) | @Override
FILE: eladmin-logging/src/main/java/me/zhengjie/service/mapstruct/LogErrorMapper.java
type LogErrorMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-logging/src/main/java/me/zhengjie/service/mapstruct/LogSmallMapper.java
type LogSmallMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/AppRun.java
class AppRun (line 38) | @Slf4j
method main (line 47) | public static void main(String[] args) {
method springContextHolder (line 60) | @Bean
method index (line 70) | @AnonymousGetMapping("/")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/App.java
class App (line 31) | @Entity
method copy (line 64) | public void copy(App source){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/Database.java
class Database (line 31) | @Entity
method copy (line 54) | public void copy(Database source){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/Deploy.java
class Deploy (line 32) | @Entity
method copy (line 56) | public void copy(Deploy source){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/DeployHistory.java
class DeployHistory (line 32) | @Entity
method copy (line 59) | public void copy(DeployHistory source){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/ServerDeploy.java
class ServerDeploy (line 32) | @Entity
method copy (line 59) | public void copy(ServerDeploy source){
method equals (line 63) | @Override
method hashCode (line 76) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/enums/DataTypeEnum.java
type DataTypeEnum (line 26) | @Slf4j
method DataTypeEnum (line 85) | DataTypeEnum(String feature, String desc, String driver, String keywor...
method urlOf (line 95) | public static DataTypeEnum urlOf(String jdbcUrl) {
method getFeature (line 113) | public String getFeature() {
method getDesc (line 117) | public String getDesc() {
method getDriver (line 121) | public String getDriver() {
method getKeywordPrefix (line 125) | public String getKeywordPrefix() {
method getKeywordSuffix (line 129) | public String getKeywordSuffix() {
method getAliasPrefix (line 133) | public String getAliasPrefix() {
method getAliasSuffix (line 137) | public String getAliasSuffix() {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/AppRepository.java
type AppRepository (line 26) | public interface AppRepository extends JpaRepository<App, Long>, JpaSpec...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DatabaseRepository.java
type DatabaseRepository (line 26) | public interface DatabaseRepository extends JpaRepository<Database, Stri...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DeployHistoryRepository.java
type DeployHistoryRepository (line 26) | public interface DeployHistoryRepository extends JpaRepository<DeployHis...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DeployRepository.java
type DeployRepository (line 26) | public interface DeployRepository extends JpaRepository<Deploy, Long>, J...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/ServerDeployRepository.java
type ServerDeployRepository (line 26) | public interface ServerDeployRepository extends JpaRepository<ServerDepl...
method findByIp (line 33) | ServerDeploy findByIp(String ip);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/AppController.java
class AppController (line 41) | @RestController
method exportApp (line 49) | @ApiOperation("导出应用数据")
method queryApp (line 56) | @ApiOperation(value = "查询应用")
method createApp (line 63) | @Log("新增应用")
method updateApp (line 72) | @Log("修改应用")
method deleteApp (line 81) | @Log("删除应用")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DatabaseController.java
class DatabaseController (line 47) | @Api(tags = "运维:数据库管理")
method exportDatabase (line 56) | @ApiOperation("导出数据库数据")
method queryDatabase (line 63) | @ApiOperation(value = "查询数据库")
method createDatabase (line 70) | @Log("新增数据库")
method updateDatabase (line 79) | @Log("修改数据库")
method deleteDatabase (line 88) | @Log("删除数据库")
method testConnect (line 97) | @Log("测试数据库链接")
method uploadDatabase (line 105) | @Log("执行SQL脚本")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DeployController.java
class DeployController (line 49) | @Slf4j
method exportDeployData (line 60) | @ApiOperation("导出部署数据")
method queryDeployData (line 67) | @ApiOperation(value = "查询部署")
method createDeploy (line 74) | @Log("新增部署")
method updateDeploy (line 83) | @Log("修改部署")
method deleteDeploy (line 92) | @Log("删除部署")
method uploadDeploy (line 101) | @Log("上传文件部署")
method serverReduction (line 124) | @Log("系统还原")
method serverStatus (line 133) | @Log("服务运行状态")
method startServer (line 142) | @Log("启动服务")
method stopServer (line 151) | @Log("停止服务")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DeployHistoryController.java
class DeployHistoryController (line 39) | @RestController
method exportDeployHistory (line 47) | @ApiOperation("导出部署历史数据")
method queryDeployHistory (line 54) | @ApiOperation(value = "查询部署历史")
method deleteDeployHistory (line 61) | @Log("删除DeployHistory")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java
class ServerDeployController (line 41) | @RestController
method exportServerDeploy (line 49) | @ApiOperation("导出服务器数据")
method queryServerDeploy (line 56) | @ApiOperation(value = "查询服务器")
method createServerDeploy (line 63) | @Log("新增服务器")
method updateServerDeploy (line 72) | @Log("修改服务器")
method deleteServerDeploy (line 81) | @Log("删除服务器")
method testConnectServerDeploy (line 90) | @Log("测试连接服务器")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/AppService.java
type AppService (line 33) | public interface AppService {
method queryAll (line 41) | PageResult<AppDto> queryAll(AppQueryCriteria criteria, Pageable pageab...
method queryAll (line 48) | List<AppDto> queryAll(AppQueryCriteria criteria);
method findById (line 55) | AppDto findById(Long id);
method create (line 61) | void create(App resources);
method update (line 67) | void update(App resources);
method delete (line 73) | void delete(Set<Long> ids);
method download (line 81) | void download(List<AppDto> queryAll, HttpServletResponse response) thr...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DatabaseService.java
type DatabaseService (line 33) | public interface DatabaseService {
method queryAll (line 41) | PageResult<DatabaseDto> queryAll(DatabaseQueryCriteria criteria, Pagea...
method queryAll (line 48) | List<DatabaseDto> queryAll(DatabaseQueryCriteria criteria);
method findById (line 55) | DatabaseDto findById(String id);
method create (line 61) | void create(Database resources);
method update (line 67) | void update(Database resources);
method delete (line 73) | void delete(Set<String> ids);
method testConnection (line 80) | boolean testConnection(Database resources);
method download (line 88) | void download(List<DatabaseDto> queryAll, HttpServletResponse response...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DeployHistoryService.java
type DeployHistoryService (line 32) | public interface DeployHistoryService {
method queryAll (line 40) | PageResult<DeployHistoryDto> queryAll(DeployHistoryQueryCriteria crite...
method queryAll (line 47) | List<DeployHistoryDto> queryAll(DeployHistoryQueryCriteria criteria);
method findById (line 54) | DeployHistoryDto findById(String id);
method create (line 60) | void create(DeployHistory resources);
method delete (line 66) | void delete(Set<String> ids);
method download (line 74) | void download(List<DeployHistoryDto> queryAll, HttpServletResponse res...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DeployService.java
type DeployService (line 34) | public interface DeployService {
method queryAll (line 42) | PageResult<DeployDto> queryAll(DeployQueryCriteria criteria, Pageable ...
method queryAll (line 49) | List<DeployDto> queryAll(DeployQueryCriteria criteria);
method findById (line 56) | DeployDto findById(Long id);
method create (line 62) | void create(Deploy resources);
method update (line 69) | void update(Deploy resources);
method delete (line 75) | void delete(Set<Long> ids);
method deploy (line 82) | void deploy(String fileSavePath, Long appId);
method serverStatus (line 89) | String serverStatus(Deploy resources);
method startServer (line 95) | String startServer(Deploy resources);
method stopServer (line 101) | String stopServer(Deploy resources);
method serverReduction (line 108) | String serverReduction(DeployHistory resources);
method download (line 116) | void download(List<DeployDto> queryAll, HttpServletResponse response) ...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/ServerDeployService.java
type ServerDeployService (line 33) | public interface ServerDeployService {
method queryAll (line 41) | PageResult<ServerDeployDto> queryAll(ServerDeployQueryCriteria criteri...
method queryAll (line 48) | List<ServerDeployDto> queryAll(ServerDeployQueryCriteria criteria);
method findById (line 55) | ServerDeployDto findById(Long id);
method create (line 61) | void create(ServerDeploy resources);
method update (line 67) | void update(ServerDeploy resources);
method delete (line 73) | void delete(Set<Long> ids);
method findByIp (line 80) | ServerDeployDto findByIp(String ip);
method testConnect (line 87) | Boolean testConnect(ServerDeploy resources);
method download (line 95) | void download(List<ServerDeployDto> queryAll, HttpServletResponse resp...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/AppDto.java
class AppDto (line 28) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/AppQueryCriteria.java
class AppQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DatabaseDto.java
class DatabaseDto (line 28) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DatabaseQueryCriteria.java
class DatabaseQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployDto.java
class DeployDto (line 33) | @Getter
method getServers (line 52) | public String getServers() {
method equals (line 59) | @Override
method hashCode (line 71) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployHistoryDto.java
class DeployHistoryDto (line 27) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployHistoryQueryCriteria.java
class DeployHistoryQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployQueryCriteria.java
class DeployQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/ServerDeployDto.java
class ServerDeployDto (line 29) | @Getter
method equals (line 51) | @Override
method hashCode (line 64) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/ServerDeployQueryCriteria.java
class ServerDeployQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/AppServiceImpl.java
class AppServiceImpl (line 39) | @Service
method queryAll (line 46) | @Override
method queryAll (line 52) | @Override
method findById (line 57) | @Override
method create (line 64) | @Override
method update (line 76) | @Override
method verification (line 91) | private void verification(App resources){
method delete (line 105) | @Override
method download (line 113) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DatabaseServiceImpl.java
class DatabaseServiceImpl (line 41) | @Slf4j
method queryAll (line 49) | @Override
method queryAll (line 55) | @Override
method findById (line 60) | @Override
method create (line 67) | @Override
method update (line 74) | @Override
method delete (line 83) | @Override
method testConnection (line 91) | @Override
method download (line 101) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployHistoryServiceImpl.java
class DeployHistoryServiceImpl (line 39) | @Service
method queryAll (line 46) | @Override
method queryAll (line 52) | @Override
method findById (line 57) | @Override
method create (line 64) | @Override
method delete (line 71) | @Override
method download (line 79) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployServiceImpl.java
class DeployServiceImpl (line 54) | @Slf4j
method queryAll (line 70) | @Override
method queryAll (line 76) | @Override
method findById (line 81) | @Override
method create (line 88) | @Override
method update (line 94) | @Override
method delete (line 103) | @Override
method deploy (line 111) | @Override
method deployApp (line 120) | private void deployApp(String fileSavePath, Long id) {
method sleep (line 186) | private void sleep(int second) {
method backupApp (line 194) | private void backupApp(ExecuteShellUtil executeShellUtil, String ip, S...
method stopApp (line 218) | private void stopApp(int port, ExecuteShellUtil executeShellUtil) {
method checkIsRunningStatus (line 231) | private boolean checkIsRunningStatus(int port, ExecuteShellUtil execut...
method sendMsg (line 236) | private void sendMsg(String msg, MsgType msgType) {
method serverStatus (line 244) | @Override
method checkFile (line 266) | private boolean checkFile(ExecuteShellUtil executeShellUtil, AppDto ap...
method startServer (line 280) | @Override
method stopServer (line 317) | @Override
method serverReduction (line 343) | @Override
method getExecuteShellUtil (line 394) | private ExecuteShellUtil getExecuteShellUtil(String ip) {
method getScpClientUtil (line 403) | private ScpClientUtil getScpClientUtil(String ip) {
method sendResultMsg (line 412) | private void sendResultMsg(boolean result, StringBuilder sb) {
method download (line 422) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/ServerDeployServiceImpl.java
class ServerDeployServiceImpl (line 39) | @Service
method queryAll (line 46) | @Override
method queryAll (line 52) | @Override
method findById (line 57) | @Override
method findByIp (line 64) | @Override
method testConnect (line 70) | @Override
method create (line 85) | @Override
method update (line 91) | @Override
method delete (line 100) | @Override
method download (line 108) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/AppMapper.java
type AppMapper (line 28) | @Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = Repor...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DatabaseMapper.java
type DatabaseMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DeployHistoryMapper.java
type DeployHistoryMapper (line 28) | @Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = Repor...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DeployMapper.java
type DeployMapper (line 28) | @Mapper(componentModel = "spring",uses = {AppMapper.class, ServerDeployM...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/ServerDeployMapper.java
type ServerDeployMapper (line 28) | @Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = Repor...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/util/ExecuteShellUtil.java
class ExecuteShellUtil (line 32) | @Slf4j
method ExecuteShellUtil (line 39) | public ExecuteShellUtil(final String ipAddress, final String username,...
method execute (line 52) | public int execute(final String command) {
method close (line 85) | public void close(){
method executeForResult (line 91) | public String executeForResult(String command) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/util/ScpClientUtil.java
class ScpClientUtil (line 33) | public class ScpClientUtil {
method getInstance (line 42) | static synchronized public ScpClientUtil getInstance(String ip, int po...
method ScpClientUtil (line 47) | public ScpClientUtil(String ip, int port, String username, String pass...
method getFile (line 54) | public void getFile(String remoteFile, String localTargetDirectory) {
method putFile (line 71) | public void putFile(String localFile, String remoteTargetDirectory) {
method putFile (line 75) | public void putFile(String localFile, String remoteFileName, String re...
method putFile (line 79) | public void putFile(String localFile, String remoteFileName, String re...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/util/SqlUtils.java
class SqlUtils (line 38) | @Slf4j
method getDataSource (line 49) | private static DataSource getDataSource(String jdbcUrl, String userNam...
method getConnection (line 92) | private static Connection getConnection(String jdbcUrl, String userNam...
method releaseConnection (line 113) | private static void releaseConnection(Connection connection) {
method testConnection (line 123) | public static boolean testConnection(String jdbcUrl, String userName, ...
method executeFile (line 138) | public static String executeFile(String jdbcUrl, String userName, Stri...
method batchExecute (line 156) | public static void batchExecute(Connection connection, List<String> sq...
method readSqlList (line 179) | private static List<String> readSqlList(File sqlFile) {
method sanitizeJdbcUrl (line 211) | private static String sanitizeJdbcUrl(String jdbcUrl) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/MsgType.java
type MsgType (line 22) | public enum MsgType {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/SocketMsg.java
class SocketMsg (line 24) | @Data
method SocketMsg (line 29) | public SocketMsg(String msg, MsgType msgType) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/WebSocketServer.java
class WebSocketServer (line 31) | @ServerEndpoint("/webSocket/{sid}")
method onOpen (line 53) | @OnOpen
method onClose (line 65) | @OnClose
method onMessage (line 73) | @OnMessage
method onError (line 86) | @OnError
method sendMessage (line 93) | private void sendMessage(String message) throws IOException {
method sendInfo (line 101) | public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") Stri...
method equals (line 116) | @Override
method hashCode (line 129) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java
class JobRunner (line 33) | @Component
method run (line 45) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java
class QuartzConfig (line 33) | @Slf4j
class QuartzJobFactory (line 41) | @Component("quartzJobFactory")
method QuartzJobFactory (line 46) | @Autowired
method createJobInstance (line 51) | @NonNull
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java
class QuartzJob (line 31) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java
class QuartzLog (line 29) | @Entity
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/repository/QuartzJobRepository.java
type QuartzJobRepository (line 27) | public interface QuartzJobRepository extends JpaRepository<QuartzJob,Lon...
method findByIsPauseIsFalse (line 33) | List<QuartzJob> findByIsPauseIsFalse();
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/repository/QuartzLogRepository.java
type QuartzLogRepository (line 26) | public interface QuartzLogRepository extends JpaRepository<QuartzLog,Lon...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java
class QuartzJobController (line 44) | @Slf4j
method queryQuartzJob (line 54) | @ApiOperation("查询定时任务")
method exportQuartzJob (line 61) | @ApiOperation("导出任务数据")
method exportQuartzJobLog (line 68) | @ApiOperation("导出日志数据")
method queryQuartzJobLog (line 75) | @ApiOperation("查询任务执行日志")
method createQuartzJob (line 82) | @Log("新增定时任务")
method updateQuartzJob (line 96) | @Log("修改定时任务")
method updateQuartzJobStatus (line 107) | @Log("更改定时任务状态")
method executionQuartzJob (line 116) | @Log("执行定时任务")
method deleteQuartzJob (line 125) | @Log("删除定时任务")
method checkBean (line 134) | private void checkBean(String beanName){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java
type QuartzJobService (line 32) | public interface QuartzJobService {
method queryAll (line 40) | PageResult<QuartzJob> queryAll(JobQueryCriteria criteria, Pageable pag...
method queryAll (line 47) | List<QuartzJob> queryAll(JobQueryCriteria criteria);
method queryAllLog (line 55) | PageResult<QuartzLog> queryAllLog(JobQueryCriteria criteria, Pageable ...
method queryAllLog (line 62) | List<QuartzLog> queryAllLog(JobQueryCriteria criteria);
method create (line 68) | void create(QuartzJob resources);
method update (line 74) | void update(QuartzJob resources);
method delete (line 80) | void delete(Set<Long> ids);
method findById (line 87) | QuartzJob findById(Long id);
method updateIsPause (line 93) | void updateIsPause(QuartzJob quartzJob);
method execution (line 99) | void execution(QuartzJob quartzJob);
method download (line 107) | void download(List<QuartzJob> queryAll, HttpServletResponse response) ...
method downloadLog (line 115) | void downloadLog(List<QuartzLog> queryAllLog, HttpServletResponse resp...
method executionSubJob (line 122) | void executionSubJob(String[] tasks) throws InterruptedException;
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/dto/JobQueryCriteria.java
class JobQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java
class QuartzJobServiceImpl (line 42) | @RequiredArgsConstructor
method queryAll (line 51) | @Override
method queryAllLog (line 56) | @Override
method queryAll (line 61) | @Override
method queryAllLog (line 66) | @Override
method findById (line 71) | @Override
method create (line 78) | @Override
method update (line 88) | @Override
method updateIsPause (line 104) | @Override
method execution (line 117) | @Override
method delete (line 122) | @Override
method executionSubJob (line 132) | @Override
method download (line 160) | @Override
method downloadLog (line 178) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java
class TestTask (line 26) | @Slf4j
method run (line 30) | public void run(){
method run1 (line 34) | public void run1(String str){
method run2 (line 38) | public void run2(){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java
class ExecutionJob (line 45) | public class ExecutionJob extends QuartzJobBean {
method executeInternal (line 54) | @Override
method taskAlarm (line 120) | private EmailVo taskAlarm(QuartzJob quartzJob, String msg) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java
class QuartzManage (line 32) | @Slf4j
method addJob (line 41) | public void addJob(QuartzJob quartzJob){
method updateJobCron (line 80) | public void updateJobCron(QuartzJob quartzJob){
method deleteJob (line 111) | public void deleteJob(QuartzJob quartzJob){
method resumeJob (line 126) | public void resumeJob(QuartzJob quartzJob){
method runJobNow (line 146) | public void runJobNow(QuartzJob quartzJob){
method pauseJob (line 168) | public void pauseJob(QuartzJob quartzJob){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java
class QuartzRunnable (line 29) | @Slf4j
method QuartzRunnable (line 36) | QuartzRunnable(String beanName, String methodName, String params)
method call (line 47) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/config/CaptchaConfig.java
class CaptchaConfig (line 35) | @Data
method getCaptcha (line 80) | public Captcha getCaptcha() {
class FixedArithmeticCaptcha (line 114) | static class FixedArithmeticCaptcha extends ArithmeticCaptcha {
method FixedArithmeticCaptcha (line 115) | public FixedArithmeticCaptcha(int width, int height) {
method alphas (line 119) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/config/LoginProperties.java
class LoginProperties (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/config/SecurityProperties.java
class SecurityProperties (line 28) | @Data
method getTokenStartWith (line 73) | public String getTokenStartWith() {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java
class SpringSecurityConfig (line 40) | @Configuration
method grantedAuthorityDefaults (line 53) | @Bean
method passwordEncoder (line 59) | @Bean
method filterChain (line 65) | @Bean
method securityConfigurerAdapter (line 128) | private TokenConfigurer securityConfigurerAdapter() {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/config/enums/LoginCodeEnum.java
type LoginCodeEnum (line 25) | public enum LoginCodeEnum {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthController.java
class AuthController (line 62) | @Slf4j
method login (line 77) | @Log("用户登录")
method getUserInfo (line 118) | @ApiOperation("获取用户信息")
method getCode (line 125) | @ApiOperation("获取验证码")
method logout (line 146) | @ApiOperation("退出登录")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java
class OnlineController (line 37) | @RestController
method queryOnlineUser (line 45) | @ApiOperation("查询在线用户")
method exportOnlineUser (line 52) | @ApiOperation("导出数据")
method deleteOnlineUser (line 59) | @ApiOperation("踢出用户")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java
class JwtAccessDeniedHandler (line 32) | @Component
method handle (line 35) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java
class JwtAuthenticationEntryPoint (line 32) | @Slf4j
method commence (line 36) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java
class TokenConfigurer (line 30) | @RequiredArgsConstructor
method configure (line 37) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java
class TokenFilter (line 38) | public class TokenFilter extends GenericFilterBean {
method TokenFilter (line 51) | public TokenFilter(TokenProvider tokenProvider, SecurityProperties pro...
method doFilter (line 57) | @Override
method resolveToken (line 85) | private String resolveToken(HttpServletRequest request) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java
class TokenProvider (line 41) | @Slf4j
method TokenProvider (line 52) | public TokenProvider(SecurityProperties properties, RedisUtils redisUt...
method afterPropertiesSet (line 57) | @Override
method createToken (line 75) | public String createToken(JwtUserDto user) {
method getAuthentication (line 99) | Authentication getAuthentication(String token) {
method getClaims (line 105) | public Claims getClaims(String token) {
method checkRenewal (line 114) | public void checkRenewal(String token) {
method getToken (line 128) | public String getToken(HttpServletRequest request) {
method loginKey (line 141) | public String loginKey(String token) {
method getId (line 151) | public String getId(String token) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java
class OnlineUserService (line 38) | @Service
method save (line 53) | public void save(JwtUserDto jwtUserDto, String token, HttpServletReque...
method getAll (line 75) | public PageResult<OnlineUserDto> getAll(String username, Pageable page...
method getAll (line 88) | public List<OnlineUserDto> getAll(String username){
method logout (line 105) | public void logout(String token) {
method download (line 116) | public void download(List<OnlineUserDto> all, HttpServletResponse resp...
method getOne (line 136) | public OnlineUserDto getOne(String key) {
method kickOutForUsername (line 144) | public void kickOutForUsername(String username) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java
class UserCacheManager (line 33) | @Component
method getUserCache (line 46) | public JwtUserDto getUserCache(String userName) {
method addUserCache (line 60) | @Async
method cleanUserCache (line 76) | @Async
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java
class UserDetailsServiceImpl (line 35) | @Slf4j
method loadUserByUsername (line 44) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java
class AuthUserDto (line 27) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java
class AuthorityDto (line 29) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java
class JwtUserDto (line 32) | @Getter
method getRoles (line 45) | public Set<String> getRoles() {
method getPassword (line 49) | @Override
method getUsername (line 55) | @Override
method isAccountNonExpired (line 61) | @JSONField(serialize = false)
method isAccountNonLocked (line 67) | @JSONField(serialize = false)
method isCredentialsNonExpired (line 73) | @JSONField(serialize = false)
method isEnabled (line 79) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java
class OnlineUserDto (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java
class Dept (line 34) | @Entity
method equals (line 69) | @Override
method hashCode (line 82) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java
class Dict (line 32) | @Entity
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java
class DictDetail (line 30) | @Entity
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java
class Job (line 32) | @Entity
method equals (line 57) | @Override
method hashCode (line 69) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java
class Menu (line 33) | @Entity
method equals (line 93) | @Override
method hashCode (line 105) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java
class Role (line 37) | @Getter
method equals (line 83) | @Override
method hashCode (line 95) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java
class User (line 35) | @Entity
method equals (line 108) | @Override
method hashCode (line 121) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java
class MenuMetaVo (line 27) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java
class MenuVo (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java
class UserPassVo (line 26) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DeptRepository.java
type DeptRepository (line 30) | public interface DeptRepository extends JpaRepository<Dept, Long>, JpaSp...
method findByPid (line 37) | List<Dept> findByPid(Long id);
method findByPidIsNull (line 43) | List<Dept> findByPidIsNull();
method findByRoleId (line 50) | @Query(value = "select d.* from sys_dept d, sys_roles_depts r where " +
method countByPid (line 59) | int countByPid(Long pid);
method updateSubCntById (line 66) | @Modifying
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DictDetailRepository.java
type DictDetailRepository (line 28) | public interface DictDetailRepository extends JpaRepository<DictDetail, ...
method findByDictName (line 35) | List<DictDetail> findByDictName(String name);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DictRepository.java
type DictRepository (line 29) | public interface DictRepository extends JpaRepository<Dict, Long>, JpaSp...
method deleteByIdIn (line 35) | void deleteByIdIn(Set<Long> ids);
method findByIdIn (line 42) | List<Dict> findByIdIn(Set<Long> ids);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/JobRepository.java
type JobRepository (line 28) | public interface JobRepository extends JpaRepository<Job, Long>, JpaSpec...
method findByName (line 35) | Job findByName(String name);
method deleteAllByIdIn (line 41) | void deleteAllByIdIn(Set<Long> ids);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/MenuRepository.java
type MenuRepository (line 31) | public interface MenuRepository extends JpaRepository<Menu, Long>, JpaSp...
method findByTitle (line 38) | Menu findByTitle(String title);
method findByComponentName (line 45) | Menu findByComponentName(String name);
method findByPidOrderByMenuSort (line 52) | List<Menu> findByPidOrderByMenuSort(long pid);
method findByPidIsNullOrderByMenuSort (line 58) | List<Menu> findByPidIsNullOrderByMenuSort();
method findByRoleIdsAndTypeNot (line 66) | @Query(value = "SELECT m.* FROM sys_menu m, sys_roles_menus r WHERE " +
method countByPid (line 75) | int countByPid(Long id);
method updateSubCntById (line 82) | @Modifying
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/RoleRepository.java
type RoleRepository (line 31) | public interface RoleRepository extends JpaRepository<Role, Long>, JpaSp...
method findByName (line 38) | Role findByName(String name);
method deleteAllByIdIn (line 44) | void deleteAllByIdIn(Set<Long> ids);
method findByUserId (line 51) | @Query(value = "SELECT r.* FROM sys_role r, sys_users_roles u WHERE " +
method untiedMenu (line 59) | @Modifying
method countByDepts (line 68) | @Query(value = "select count(1) from sys_role r, sys_roles_depts d whe...
method findInMenuId (line 77) | @Query(value = "SELECT r.* FROM sys_role r, sys_roles_menus m WHERE " +
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java
type UserRepository (line 31) | public interface UserRepository extends JpaRepository<User, Long>, JpaSp...
method findByUsername (line 38) | User findByUsername(String username);
method findByEmail (line 45) | User findByEmail(String email);
method findByPhone (line 52) | User findByPhone(String phone);
method updatePass (line 60) | @Modifying
method updateEmail (line 69) | @Modifying
method findByRoleId (line 78) | @Query(value = "SELECT u.* FROM sys_user u, sys_users_roles r WHERE" +
method findByRoleDeptId (line 87) | @Query(value = "SELECT u.* FROM sys_user u, sys_users_roles r, sys_rol...
method findByMenuId (line 96) | @Query(value = "SELECT u.* FROM sys_user u, sys_users_roles ur, sys_ro...
method deleteAllByIdIn (line 104) | void deleteAllByIdIn(Set<Long> ids);
method countByJobs (line 111) | @Query(value = "SELECT count(1) FROM sys_user u, sys_users_jobs j WHER...
method countByDepts (line 119) | @Query(value = "SELECT count(1) FROM sys_user u WHERE u.dept_id IN ?1"...
method countByRoles (line 127) | @Query(value = "SELECT count(1) FROM sys_user u, sys_users_roles r WHE...
method resetPwd (line 136) | @Modifying
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DeptController.java
class DeptController (line 43) | @RestController
method exportDept (line 52) | @ApiOperation("导出部门数据")
method queryDept (line 59) | @ApiOperation("查询部门")
method getDeptSuperior (line 67) | @ApiOperation("查询部门:根据ID获取同级与上级数据")
method createDept (line 90) | @Log("新增部门")
method updateDept (line 102) | @Log("修改部门")
method deleteDept (line 111) | @Log("删除部门")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictController.java
class DictController (line 44) | @RestController
method exportDict (line 53) | @ApiOperation("导出字典数据")
method queryAllDict (line 60) | @ApiOperation("查询字典")
method queryDict (line 67) | @ApiOperation("查询字典")
method createDict (line 74) | @Log("新增字典")
method updateDict (line 86) | @Log("修改字典")
method deleteDict (line 95) | @Log("删除字典")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/DictDetailController.java
class DictDetailController (line 44) | @RestController
method queryDictDetail (line 53) | @ApiOperation("查询字典详情")
method getDictDetailMaps (line 60) | @ApiOperation("查询多个字典详情")
method createDictDetail (line 71) | @Log("新增字典详情")
method updateDictDetail (line 83) | @Log("修改字典详情")
method deleteDictDetail (line 92) | @Log("删除字典详情")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/JobController.java
class JobController (line 42) | @RestController
method exportJob (line 51) | @ApiOperation("导出岗位数据")
method queryJob (line 58) | @ApiOperation("查询岗位")
method createJob (line 65) | @Log("新增岗位")
method updateJob (line 77) | @Log("修改岗位")
method deleteJob (line 86) | @Log("删除岗位")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/LimitController.java
class LimitController (line 31) | @RestController
method testLimit (line 41) | @AnonymousGetMapping
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MenuController.java
class MenuController (line 47) | @RestController
method exportMenu (line 57) | @ApiOperation("导出菜单数据")
method buildMenus (line 64) | @GetMapping(value = "/build")
method queryAllMenu (line 72) | @ApiOperation("返回全部的菜单")
method childMenu (line 79) | @ApiOperation("根据菜单ID返回所有子节点ID,包含自身ID")
method queryMenu (line 91) | @GetMapping
method getMenuSuperior (line 99) | @ApiOperation("查询菜单:根据ID获取同级与上级数据")
method createMenu (line 122) | @Log("新增菜单")
method updateMenu (line 134) | @Log("修改菜单")
method deleteMenu (line 143) | @Log("删除菜单")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/MonitorController.java
class MonitorController (line 31) | @RestController
method queryMonitor (line 39) | @GetMapping
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/RoleController.java
class RoleController (line 48) | @RestController
method findRoleById (line 58) | @ApiOperation("获取单个role")
method exportRole (line 65) | @ApiOperation("导出角色数据")
method queryAllRole (line 72) | @ApiOperation("返回全部的角色")
method queryRole (line 79) | @ApiOperation("查询角色")
method getRoleLevel (line 86) | @ApiOperation("获取用户级别")
method createRole (line 92) | @Log("新增角色")
method updateRole (line 105) | @Log("修改角色")
method updateRoleMenu (line 115) | @Log("修改角色菜单")
method deleteRole (line 126) | @Log("删除角色")
method getLevels (line 145) | private int getLevels(Integer level){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java
class UserController (line 58) | @Api(tags = "系统:用户管理")
method exportUser (line 71) | @ApiOperation("导出用户数据")
method queryUser (line 78) | @ApiOperation("查询用户")
method createUser (line 106) | @Log("新增用户")
method updateUser (line 118) | @Log("修改用户")
method centerUser (line 128) | @Log("修改用户:个人中心")
method deleteUser (line 139) | @Log("删除用户")
method updateUserPass (line 155) | @ApiOperation("修改密码")
method resetPwd (line 171) | @ApiOperation("重置密码")
method updateUserAvatar (line 179) | @ApiOperation("修改头像")
method updateUserEmail (line 185) | @Log("修改邮箱")
method checkLevel (line 203) | private void checkLevel(User resources) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/rest/VerifyController.java
class VerifyController (line 35) | @RestController
method resetEmail (line 44) | @PostMapping(value = "/resetEmail")
method resetPass (line 52) | @PostMapping(value = "/email/resetPass")
method validated (line 60) | @GetMapping(value = "/validated")
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/DataService.java
type DataService (line 26) | public interface DataService {
method getDeptIds (line 33) | List<Long> getDeptIds(UserDto user);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/DeptService.java
type DeptService (line 30) | public interface DeptService {
method queryAll (line 39) | List<DeptDto> queryAll(DeptQueryCriteria criteria, Boolean isQuery) th...
method findById (line 46) | DeptDto findById(Long id);
method create (line 52) | void create(Dept resources);
method update (line 58) | void update(Dept resources);
method delete (line 65) | void delete(Set<DeptDto> deptDtos);
method findByPid (line 72) | List<Dept> findByPid(long pid);
method findByRoleId (line 79) | Set<Dept> findByRoleId(Long id);
method download (line 87) | void download(List<DeptDto> queryAll, HttpServletResponse response) th...
method getDeleteDepts (line 95) | Set<DeptDto> getDeleteDepts(List<Dept> deptList, Set<DeptDto> deptDtos);
method getSuperior (line 103) | List<DeptDto> getSuperior(DeptDto deptDto, List<Dept> depts);
method buildTree (line 110) | Object buildTree(List<DeptDto> deptDtos);
method getDeptChildren (line 117) | List<Long> getDeptChildren(List<Dept> deptList);
method verification (line 123) | void verification(Set<DeptDto> deptDtos);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictDetailService.java
type DictDetailService (line 29) | public interface DictDetailService {
method create (line 35) | void create(DictDetail resources);
method update (line 41) | void update(DictDetail resources);
method delete (line 47) | void delete(Long id);
method queryAll (line 55) | PageResult<DictDetailDto> queryAll(DictDetailQueryCriteria criteria, P...
method getDictByName (line 62) | List<DictDetailDto> getDictByName(String name);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/DictService.java
type DictService (line 32) | public interface DictService {
method queryAll (line 40) | PageResult<DictDto> queryAll(DictQueryCriteria criteria, Pageable page...
method queryAll (line 47) | List<DictDto> queryAll(DictQueryCriteria dict);
method create (line 54) | void create(Dict resources);
method update (line 60) | void update(Dict resources);
method delete (line 66) | void delete(Set<Long> ids);
method download (line 74) | void download(List<DictDto> queryAll, HttpServletResponse response) th...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/JobService.java
type JobService (line 32) | public interface JobService {
method findById (line 39) | JobDto findById(Long id);
method create (line 46) | void create(Job resources);
method update (line 52) | void update(Job resources);
method delete (line 58) | void delete(Set<Long> ids);
method queryAll (line 66) | PageResult<JobDto> queryAll(JobQueryCriteria criteria, Pageable pageab...
method queryAll (line 73) | List<JobDto> queryAll(JobQueryCriteria criteria);
method download (line 81) | void download(List<JobDto> queryAll, HttpServletResponse response) thr...
method verification (line 87) | void verification(Set<Long> ids);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/MenuService.java
type MenuService (line 32) | public interface MenuService {
method queryAll (line 41) | List<MenuDto> queryAll(MenuQueryCriteria criteria, Boolean isQuery) th...
method findById (line 48) | MenuDto findById(long id);
method create (line 54) | void create(Menu resources);
method update (line 60) | void update(Menu resources);
method getChildMenus (line 68) | Set<Menu> getChildMenus(List<Menu> menuList, Set<Menu> menuSet);
method buildTree (line 75) | List<MenuDto> buildTree(List<MenuDto> menuDtos);
method buildMenus (line 82) | List<MenuVo> buildMenus(List<MenuDto> menuDtos);
method findOne (line 89) | Menu findOne(Long id);
method delete (line 95) | void delete(Set<Menu> menuSet);
method download (line 103) | void download(List<MenuDto> queryAll, HttpServletResponse response) th...
method getMenus (line 110) | List<MenuDto> getMenus(Long pid);
method getSuperior (line 118) | List<MenuDto> getSuperior(MenuDto menuDto, List<Menu> objects);
method findByUser (line 125) | List<MenuDto> findByUser(Long currentUserId);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/MonitorService.java
type MonitorService (line 24) | public interface MonitorService {
method getServers (line 30) | Map<String,Object> getServers();
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/RoleService.java
type RoleService (line 35) | public interface RoleService {
method queryAll (line 41) | List<RoleDto> queryAll();
method findById (line 48) | RoleDto findById(long id);
method create (line 54) | void create(Role resources);
method update (line 60) | void update(Role resources);
method delete (line 66) | void delete(Set<Long> ids);
method findByUsersId (line 73) | List<RoleSmallDto> findByUsersId(Long userId);
method findByRoles (line 80) | Integer findByRoles(Set<Role> roles);
method updateMenu (line 87) | void updateMenu(Role resources, RoleDto roleDTO);
method untiedMenu (line 93) | void untiedMenu(Long id);
method queryAll (line 101) | PageResult<RoleDto> queryAll(RoleQueryCriteria criteria, Pageable page...
method queryAll (line 108) | List<RoleDto> queryAll(RoleQueryCriteria criteria);
method download (line 116) | void download(List<RoleDto> queryAll, HttpServletResponse response) th...
method buildPermissions (line 123) | List<AuthorityDto> buildPermissions(UserDto user);
method verification (line 129) | void verification(Set<Long> ids);
method findInMenuId (line 136) | List<Role> findInMenuId(List<Long> menuIds);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/UserService.java
type UserService (line 34) | public interface UserService {
method findById (line 41) | UserDto findById(long id);
method create (line 47) | void create(User resources);
method update (line 54) | void update(User resources) throws Exception;
method delete (line 60) | void delete(Set<Long> ids);
method findByName (line 67) | UserDto findByName(String userName);
method getLoginData (line 74) | UserDto getLoginData(String userName);
method updatePass (line 81) | void updatePass(String username, String encryptPassword);
method updateAvatar (line 88) | Map<String, String> updateAvatar(MultipartFile file);
method updateEmail (line 95) | void updateEmail(String username, String email);
method queryAll (line 103) | PageResult<UserDto> queryAll(UserQueryCriteria criteria, Pageable page...
method queryAll (line 110) | List<UserDto> queryAll(UserQueryCriteria criteria);
method download (line 118) | void download(List<UserDto> queryAll, HttpServletResponse response) th...
method updateCenter (line 124) | void updateCenter(User resources);
method resetPwd (line 131) | void resetPwd(Set<Long> ids, String pwd);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/VerifyService.java
type VerifyService (line 24) | public interface VerifyService {
method sendEmail (line 32) | EmailVo sendEmail(String email, String key);
method validated (line 40) | void validated(String key, String code);
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptDto.java
class DeptDto (line 30) | @Getter
method getHasChildren (line 55) | @ApiModelProperty(value = "是否有子节点")
method getLeaf (line 60) | @ApiModelProperty(value = "是否为叶子")
method getLabel (line 65) | @ApiModelProperty(value = "部门全名")
method equals (line 70) | @Override
method hashCode (line 83) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptQueryCriteria.java
class DeptQueryCriteria (line 29) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DeptSmallDto.java
class DeptSmallDto (line 26) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDetailDto.java
class DictDetailDto (line 28) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDetailQueryCriteria.java
class DictDetailQueryCriteria (line 26) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictDto.java
class DictDto (line 29) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictQueryCriteria.java
class DictQueryCriteria (line 26) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/DictSmallDto.java
class DictSmallDto (line 27) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/JobDto.java
class JobDto (line 30) | @Getter
method JobDto (line 47) | public JobDto(String name, Boolean enabled) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/JobQueryCriteria.java
class JobQueryCriteria (line 29) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/JobSmallDto.java
class JobSmallDto (line 27) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/MenuDto.java
class MenuDto (line 31) | @Getter
method getHasChildren (line 81) | @ApiModelProperty(value = "是否存在子节点")
method getLeaf (line 86) | @ApiModelProperty(value = "是否叶子节点")
method getLabel (line 91) | @ApiModelProperty(value = "标题")
method equals (line 96) | @Override
method hashCode (line 108) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/MenuQueryCriteria.java
class MenuQueryCriteria (line 28) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleDto.java
class RoleDto (line 30) | @Getter
method equals (line 55) | @Override
method hashCode (line 67) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleQueryCriteria.java
class RoleQueryCriteria (line 29) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/RoleSmallDto.java
class RoleSmallDto (line 26) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserDto.java
class UserDto (line 31) | @Getter
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/dto/UserQueryCriteria.java
class UserQueryCriteria (line 31) | @Data
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DataServiceImpl.java
class DataServiceImpl (line 38) | @Service
method getDeptIds (line 51) | @Override
method getCustomize (line 86) | public Set<Long> getCustomize(Set<Long> deptIds, RoleSmallDto role){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java
class DeptServiceImpl (line 48) | @Service
method queryAll (line 58) | @Override
method findById (line 89) | @Override
method findByPid (line 101) | @Override
method findByRoleId (line 106) | @Override
method create (line 111) | @Override
method update (line 123) | @Override
method delete (line 143) | @Override
method download (line 154) | @Override
method getDeleteDepts (line 167) | @Override
method getDeptChildren (line 179) | @Override
method getSuperior (line 195) | @Override
method buildTree (line 205) | @Override
method verification (line 241) | @Override
method updateSubCnt (line 252) | private void updateSubCnt(Long deptId){
method deduplication (line 259) | private List<DeptDto> deduplication(List<DeptDto> list) {
method delCaches (line 280) | public void delCaches(Long id){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictDetailServiceImpl.java
class DictDetailServiceImpl (line 41) | @Service
method queryAll (line 50) | @Override
method create (line 56) | @Override
method update (line 64) | @Override
method getDictByName (line 75) | @Override
method delete (line 86) | @Override
method delCaches (line 95) | public void delCaches(DictDetail dictDetail){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DictServiceImpl.java
class DictServiceImpl (line 41) | @Service
method queryAll (line 49) | @Override
method queryAll (line 55) | @Override
method create (line 61) | @Override
method update (line 67) | @Override
method delete (line 79) | @Override
method download (line 90) | @Override
method delCaches (line 117) | public void delCaches(Dict dict){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/JobServiceImpl.java
class JobServiceImpl (line 43) | @Service
method queryAll (line 52) | @Override
method queryAll (line 58) | @Override
method findById (line 64) | @Override
method create (line 76) | @Override
method update (line 86) | @Override
method delete (line 101) | @Override
method download (line 109) | @Override
method verification (line 122) | @Override
method delCaches (line 133) | public void delCaches(Long id){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MenuServiceImpl.java
class MenuServiceImpl (line 51) | @Service
method queryAll (line 67) | @Override
method findById (line 89) | @Override
method findByUser (line 106) | @Override
method create (line 120) | @Override
method update (line 146) | @Override
method getChildMenus (line 200) | @Override
method delete (line 212) | @Override
method getMenus (line 224) | @Override
method getSuperior (line 235) | @Override
method buildTree (line 245) | @Override
method buildMenus (line 269) | @Override
method findOne (line 313) | @Override
method download (line 320) | @Override
method updateSubCnt (line 337) | private void updateSubCnt(Long menuId){
method delCaches (line 348) | public void delCaches(Long id){
method getMenuVo (line 365) | private static MenuVo getMenuVo(MenuDto menuDTO, MenuVo menuVo) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java
class MonitorServiceImpl (line 41) | @Slf4j
method getServers (line 47) | @Override
method getDiskInfo (line 75) | private Map<String,Object> getDiskInfo(OperatingSystem os) {
method getSwapInfo (line 109) | private Map<String,Object> getSwapInfo(GlobalMemory memory) {
method getMemoryInfo (line 130) | private Map<String,Object> getMemoryInfo(GlobalMemory memory) {
method getCpuInfo (line 144) | private Map<String,Object> getCpuInfo(CentralProcessor processor) {
method getSystemInfo (line 181) | private Map<String,Object> getSystemInfo(OperatingSystem os){
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java
class RoleServiceImpl (line 53) | @Service
method queryAll (line 64) | @Override
method queryAll (line 70) | @Override
method queryAll (line 75) | @Override
method findById (line 81) | @Override
method create (line 93) | @Override
method update (line 102) | @Override
method updateMenu (line 123) | @Override
method untiedMenu (line 133) | @Override
method delete (line 140) | @Override
method findByUsersId (line 150) | @Override
method findByRoles (line 161) | @Override
method buildPermissions (line 173) | @Override
method download (line 196) | @Override
method verification (line 210) | @Override
method findInMenuId (line 217) | @Override
method delCaches (line 226) | public void delCaches(Long id, List<User> users) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/UserServiceImpl.java
class UserServiceImpl (line 49) | @Service
method queryAll (line 60) | @Override
method queryAll (line 66) | @Override
method findById (line 72) | @Override
method create (line 85) | @Override
method update (line 100) | @Override
method updateCenter (line 146) | @Override
method delete (line 162) | @Override
method findByName (line 173) | @Override
method getLoginData (line 183) | @Override
method updatePass (line 193) | @Override
method resetPwd (line 200) | @Override
method updateAvatar (line 215) | @Override
method updateEmail (line 242) | @Override
method download (line 249) | @Override
method delCaches (line 274) | public void delCaches(Long id, String username) {
method flushCache (line 284) | private void flushCache(String username) {
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/VerifyServiceImpl.java
class VerifyServiceImpl (line 38) | @Service
method sendEmail (line 46) | @Override
method validated (line 71) | @Override
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DeptMapper.java
type DeptMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DeptSmallMapper.java
type DeptSmallMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictDetailMapper.java
type DictDetailMapper (line 28) | @Mapper(componentModel = "spring", uses = {DictSmallMapper.class}, unmap...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictMapper.java
type DictMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/DictSmallMapper.java
type DictSmallMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/JobMapper.java
type JobMapper (line 28) | @Mapper(componentModel = "spring",uses = {DeptMapper.class},unmappedTarg...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/JobSmallMapper.java
type JobSmallMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/MenuMapper.java
type MenuMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/RoleMapper.java
type RoleMapper (line 28) | @Mapper(componentModel = "spring", uses = {MenuMapper.class, DeptMapper....
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/RoleSmallMapper.java
type RoleSmallMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-system/src/main/java/me/zhengjie/modules/system/service/mapstruct/UserMapper.java
type UserMapper (line 28) | @Mapper(componentModel = "spring",uses = {RoleMapper.class, DeptMapper.c...
FILE: eladmin-system/src/main/java/me/zhengjie/sysrunner/SystemRunner.java
class SystemRunner (line 29) | @Slf4j
method run (line 34) | @Override
FILE: eladmin-system/src/test/java/me/zhengjie/EladminSystemApplicationTests.java
class EladminSystemApplicationTests (line 6) | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
method contextLoads (line 9) | @Test
method main (line 13) | public static void main(String[] args) {
FILE: eladmin-tools/src/main/java/me/zhengjie/config/AmzS3Config.java
class AmzS3Config (line 18) | @Data
method amazonS3Client (line 71) | @Bean
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/AlipayConfig.java
class AlipayConfig (line 29) | @Data
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/EmailConfig.java
class EmailConfig (line 29) | @Entity
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/LocalStorage.java
class LocalStorage (line 30) | @Getter
method LocalStorage (line 61) | public LocalStorage(String realName,String name, String suffix, String...
method copy (line 70) | public void copy(LocalStorage source){
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/S3Storage.java
class S3Storage (line 33) | @Data
method copy (line 69) | public void copy(S3Storage source){
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/enums/AliPayStatusEnum.java
type AliPayStatusEnum (line 23) | public enum AliPayStatusEnum {
method AliPayStatusEnum (line 39) | AliPayStatusEnum(String value) {
method getValue (line 43) | public String getValue() {
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/vo/EmailVo.java
class EmailVo (line 31) | @Data
FILE: eladmin-tools/src/main/java/me/zhengjie/domain/vo/TradeVo.java
class TradeVo (line 29) | @Data
FILE: eladmin-tools/src/main/java/me/zhengjie/repository/AliPayRepository.java
type AliPayRepository (line 25) | public interface AliPayRepository extends JpaRepository<AlipayConfig,Lon...
FILE: eladmin-tools/src/main/java/me/zhengjie/repository/EmailRepository.java
type EmailRepository (line 25) | public interface EmailRepository extends JpaRepository<EmailConfig,Long> {
FILE: eladmin-tools/src/main/java/me/zhengjie/repository/LocalStorageRepository.java
type LocalStorageRepository (line 26) | public interface LocalStorageRepository extends JpaRepository<LocalStora...
FILE: eladmin-tools/src/main/java/me/zhengjie/repository/S3StorageRepository.java
type S3StorageRepository (line 27) | public interface S3StorageRepository extends JpaRepository<S3Storage, Lo...
method selectFilePathById (line 34) | @Query(value = "SELECT file_path FROM s3_storage WHERE id = ?1", nativ...
FILE: eladmin-tools/src/main/java/me/zhengjie/rest/AliPayController.java
class AliPayController (line 45) | @Slf4j
method queryAliConfig (line 55) | @GetMapping
method updateAliPayConfig (line 60) | @Log("配置支付宝")
method toPayAsPc (line 68) | @Log("支付宝PC网页支付")
method toPayAsWeb (line 78) | @Log("支付宝手机网页支付")
method returnPage (line 88) | @ApiIgnore
method notify (line 110) | @ApiIgnore
FILE: eladmin-tools/src/main/java/me/zhengjie/rest/EmailController.java
class EmailController (line 35) | @RestController
method queryEmailConfig (line 43) | @GetMapping
method updateEmailConfig (line 48) | @Log("配置邮件")
method sendEmail (line 56) | @Log("发送邮件")
FILE: eladmin-tools/src/main/java/me/zhengjie/rest/LocalStorageController.java
class LocalStorageController (line 42) | @RestController
method queryFile (line 50) | @GetMapping
method exportFile (line 57) | @ApiOperation("导出数据")
method createFile (line 64) | @PostMapping
method uploadPicture (line 72) | @ApiOperation("上传图片")
method updateFile (line 84) | @PutMapping
method deleteFile (line 93) | @Log("删除文件")
FILE: eladmin-tools/src/main/java/me/zhengjie/rest/S3StorageController.java
class S3StorageController (line 45) | @Slf4j
method exportS3Storage (line 55) | @ApiOperation("导出数据")
method queryS3Storage (line 62) | @GetMapping
method uploadS3Storage (line 69) | @PostMapping
method downloadS3Storage (line 80) | @Log("下载文件")
method deleteAllS3Storage (line 96) | @Log("删除多个文件")
FILE: eladmin-tools/src/main/java/me/zhengjie/service/AliPayService.java
type AliPayService (line 25) | public interface AliPayService {
method find (line 31) | AlipayConfig find();
method config (line 38) | AlipayConfig config(AlipayConfig alipayConfig);
method toPayAsPc (line 47) | String toPayAsPc(AlipayConfig alipay, TradeVo trade) throws Exception;
method toPayAsWeb (line 56) | String toPayAsWeb(AlipayConfig alipay, TradeVo trade) throws Exception;
FILE: eladmin-tools/src/main/java/me/zhengjie/service/EmailService.java
type EmailService (line 25) | public interface EmailService {
method config (line 34) | EmailConfig config(EmailConfig emailConfig, EmailConfig old) throws Ex...
method find (line 40) | EmailConfig find();
method send (line 47) | void send(EmailVo emailVo, EmailConfig emailConfig);
FILE: eladmin-tools/src/main/java/me/zhengjie/service/LocalStorageService.java
type LocalStorageService (line 32) | public interface LocalStorageService {
method queryAll (line 40) | PageResult<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteri...
method queryAll (line 47) | List<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria);
method findById (line 54) | LocalStorageDto findById(Long id);
method create (line 62) | LocalStorage create(String name, MultipartFile file);
method update (line 68) | void update(LocalStorage resources);
method deleteAll (line 74) | void deleteAll(Long[] ids);
method download (line 82) | void download(List<LocalStorageDto> localStorageDtos, HttpServletRespo...
FILE: eladmin-tools/src/main/java/me/zhengjie/service/S3StorageService.java
type S3StorageService (line 33) | public interface S3StorageService {
method queryAll (line 41) | PageResult<S3Storage> queryAll(S3StorageQueryCriteria criteria, Pageab...
method queryAll (line 48) | List<S3Storage> queryAll(S3StorageQueryCriteria criteria);
method deleteAll (line 54) | void deleteAll(List<Long> ids);
method download (line 62) | void download(List<S3Storage> all, HttpServletResponse response) throw...
method privateDownload (line 68) | Map<String, String> privateDownload(Long id);
method upload (line 75) | S3Storage upload(MultipartFile file);
method getById (line 82) | S3Storage getById(Long id);
FILE: eladmin-tools/src/main/java/me/zhengjie/service/dto/LocalStorageDto.java
class LocalStorageDto (line 28) | @Getter
FILE: eladmin-tools/src/main/java/me/zhengjie/service/dto/LocalStorageQueryCriteria.java
class LocalStorageQueryCriteria (line 29) | @Data
FILE: eladmin-tools/src/main/java/me/zhengjie/service/dto/S3StorageQueryCriteria.java
class S3StorageQueryCriteria (line 28) | @Data
FILE: eladmin-tools/src/main/java/me/zhengjie/service/impl/AliPayServiceImpl.java
class AliPayServiceImpl (line 39) | @Service
method find (line 46) | @Override
method config (line 53) | @Override
method toPayAsPc (line 61) | @Override
method toPayAsWeb (line 91) | @Override
FILE: eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java
class EmailServiceImpl (line 38) | @Service
method config (line 45) | @Override
method find (line 57) | @Override
method send (line 64) | @Override
FILE: eladmin-tools/src/main/java/me/zhengjie/service/impl/LocalStorageServiceImpl.java
class LocalStorageServiceImpl (line 46) | @Service
method queryAll (line 54) | @Override
method queryAll (line 60) | @Override
method findById (line 65) | @Override
method create (line 72) | @Override
method update (line 99) | @Override
method deleteAll (line 108) | @Override
method download (line 118) | @Override
FILE: eladmin-tools/src/main/java/me/zhengjie/service/impl/S3StorageServiceImpl.java
class S3StorageServiceImpl (line 50) | @Slf4j
method getById (line 59) | @Override
method queryAll (line 64) | @Override
method queryAll (line 71) | @Override
method deleteAll (line 77) | @Override
method upload (line 109) | @Override
method download (line 156) | @Override
method privateDownload (line 176) | public Map<String, String> privateDownload(Long id) {
method bucketExists (line 216) | @SuppressWarnings({"all"})
method createBucket (line 239) | private boolean createBucket(String bucketName) {
FILE: eladmin-tools/src/main/java/me/zhengjie/service/mapstruct/LocalStorageMapper.java
type LocalStorageMapper (line 28) | @Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy...
FILE: eladmin-tools/src/main/java/me/zhengjie/utils/AlipayUtils.java
class AlipayUtils (line 33) | @Component
method getOrderCode (line 40) | public String getOrderCode() {
method rsaCheck (line 60) | public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){
FILE: sql/eladmin.sql
type `code_column` (line 24) | CREATE TABLE `code_column` (
type `code_config` (line 53) | CREATE TABLE `code_config` (
type `mnt_app` (line 78) | CREATE TABLE `mnt_app` (
type `mnt_database` (line 104) | CREATE TABLE `mnt_database` (
type `mnt_deploy` (line 127) | CREATE TABLE `mnt_deploy` (
type `mnt_deploy_history` (line 148) | CREATE TABLE `mnt_deploy_history` (
type `mnt_deploy_server` (line 168) | CREATE TABLE `mnt_deploy_server` (
type `mnt_server` (line 186) | CREATE TABLE `mnt_server` (
type `sys_dept` (line 211) | CREATE TABLE `sys_dept` (
type `sys_dict` (line 244) | CREATE TABLE `sys_dict` (
type `sys_dict_detail` (line 268) | CREATE TABLE `sys_dict_detail` (
type `sys_job` (line 298) | CREATE TABLE `sys_job` (
type `sys_log` (line 326) | CREATE TABLE `sys_log` (
type `sys_menu` (line 354) | CREATE TABLE `sys_menu` (
type `sys_quartz_job` (line 461) | CREATE TABLE `sys_quartz_job` (
type `sys_quartz_log` (line 496) | CREATE TABLE `sys_quartz_log` (
type `sys_role` (line 520) | CREATE TABLE `sys_role` (
type `sys_roles_depts` (line 547) | CREATE TABLE `sys_roles_depts` (
type `sys_roles_menus` (line 565) | CREATE TABLE `sys_roles_menus` (
type `sys_user` (line 679) | CREATE TABLE `sys_user` (
type `sys_users_jobs` (line 716) | CREATE TABLE `sys_users_jobs` (
type `sys_users_roles` (line 736) | CREATE TABLE `sys_users_roles` (
type `tool_alipay_config` (line 756) | CREATE TABLE `tool_alipay_config` (
type `tool_email_config` (line 781) | CREATE TABLE `tool_email_config` (
type `tool_local_storage` (line 801) | CREATE TABLE `tool_local_storage` (
type `tool_s3_storage` (line 826) | CREATE TABLE `tool_s3_storage` (
FILE: sql/quartz.sql
type qrtz_job_details (line 13) | create table qrtz_job_details(
type qrtz_triggers (line 27) | create table qrtz_triggers (
type qrtz_simple_triggers (line 49) | create table qrtz_simple_triggers (
type qrtz_cron_triggers (line 61) | create table qrtz_cron_triggers (
type qrtz_simprop_triggers (line 72) | create table qrtz_simprop_triggers (
type qrtz_blob_triggers (line 92) | create table qrtz_blob_triggers (
type qrtz_calendars (line 103) | create table qrtz_calendars (
type qrtz_paused_trigger_grps (line 110) | create table qrtz_paused_trigger_grps (
type qrtz_fired_triggers (line 116) | create table qrtz_fired_triggers (
type qrtz_scheduler_state (line 133) | create table qrtz_scheduler_state (
type qrtz_locks (line 141) | create table qrtz_locks (
type idx_qrtz_j_req_recovery (line 147) | create index idx_qrtz_j_req_recovery on qrtz_job_details(sched_name, req...
type idx_qrtz_j_grp (line 148) | create index idx_qrtz_j_grp on qrtz_job_details(sched_name, job_group)
type idx_qrtz_t_j (line 150) | create index idx_qrtz_t_j on qrtz_triggers(sched_name, job_name, job_group)
type idx_qrtz_t_jg (line 151) | create index idx_qrtz_t_jg on qrtz_triggers(sched_name, job_group)
type idx_qrtz_t_c (line 152) | create index idx_qrtz_t_c on qrtz_triggers(sched_name, calendar_name)
type idx_qrtz_t_g (line 153) | create index idx_qrtz_t_g on qrtz_triggers(sched_name, trigger_group)
type idx_qrtz_t_state (line 154) | create index idx_qrtz_t_state on qrtz_triggers(sched_name, trigger_state)
type idx_qrtz_t_n_state (line 155) | create index idx_qrtz_t_n_state on qrtz_triggers(sched_name, trigger_nam...
type idx_qrtz_t_n_g_state (line 156) | create index idx_qrtz_t_n_g_state on qrtz_triggers(sched_name, trigger_g...
type idx_qrtz_t_next_fire_time (line 157) | create index idx_qrtz_t_next_fire_time on qrtz_triggers(sched_name, next...
type idx_qrtz_t_nft_st (line 158) | create index idx_qrtz_t_nft_st on qrtz_triggers(sched_name, trigger_stat...
type idx_qrtz_t_nft_misfire (line 159) | create index idx_qrtz_t_nft_misfire on qrtz_triggers(sched_name, misfire...
type idx_qrtz_t_nft_st_misfire (line 160) | create index idx_qrtz_t_nft_st_misfire on qrtz_triggers(sched_name, misf...
type idx_qrtz_t_nft_st_misfire_grp (line 161) | create index idx_qrtz_t_nft_st_misfire_grp on qrtz_triggers(sched_name, ...
type idx_qrtz_ft_trig_inst_name (line 163) | create index idx_qrtz_ft_trig_inst_name on qrtz_fired_triggers(sched_nam...
type idx_qrtz_ft_inst_job_req_rcvry (line 164) | create index idx_qrtz_ft_inst_job_req_rcvry on qrtz_fired_triggers(sched...
type idx_qrtz_ft_j_g (line 165) | create index idx_qrtz_ft_j_g on qrtz_fired_triggers(sched_name, job_name...
type idx_qrtz_ft_jg (line 166) | create index idx_qrtz_ft_jg on qrtz_fired_triggers(sched_name, job_group)
type idx_qrtz_ft_t_g (line 167) | create index idx_qrtz_ft_t_g on qrtz_fired_triggers(sched_name, trigger_...
type idx_qrtz_ft_tg (line 168) | create index idx_qrtz_ft_tg on qrtz_fired_triggers(sched_name, trigger_g...
Condensed preview — 305 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (968K chars).
[
{
"path": ".gitignore",
"chars": 72,
"preview": "### IDEA ###\n.idea/*\n*.iml\n*/target/*\n*/*.iml\n/.gradle/\n/application.pid"
},
{
"path": "LICENSE",
"chars": 10259,
"preview": "Apache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AN"
},
{
"path": "README.md",
"chars": 3878,
"preview": "<h1 style=\"text-align: center\">ELADMIN 后台管理系统</h1>\n<div style=\"text-align: center\">\n\n[;\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/Limit.java",
"chars": 1234,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/Query.java",
"chars": 2285,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousAccess.java",
"chars": 870,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousDeleteMapping.java",
"chars": 2547,
"preview": "/*\n * Copyright 2002-2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousGetMapping.java",
"chars": 2455,
"preview": "/*\n * Copyright 2002-2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPatchMapping.java",
"chars": 2548,
"preview": "/*\n * Copyright 2002-2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPostMapping.java",
"chars": 2539,
"preview": "/*\n * Copyright 2002-2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/annotation/rest/AnonymousPutMapping.java",
"chars": 2538,
"preview": "/*\n * Copyright 2002-2016 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/aspect/LimitAspect.java",
"chars": 3764,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/aspect/LimitType.java",
"chars": 738,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java",
"chars": 1452,
"preview": "package me.zhengjie.base;\n\nimport com.fasterxml.jackson.annotation.JsonFormat;\nimport io.swagger.annotations.ApiModelPro"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java",
"chars": 2930,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/base/BaseMapper.java",
"chars": 1178,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/AsyncExecutor.java",
"chars": 3239,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/AuditorConfig.java",
"chars": 1325,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java",
"chars": 1414,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/CustomP6SpyLogger.java",
"chars": 1813,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java",
"chars": 7314,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/RedissonConfiguration.java",
"chars": 2344,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/RemoveDruidAdConfig.java",
"chars": 3402,
"preview": "package me.zhengjie.config;\n\nimport com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;\nimport com"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/properties/FileProperties.java",
"chars": 1544,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/properties/RsaProperties.java",
"chars": 1094,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/ConfigurerAdapter.java",
"chars": 3768,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/MultipartConfig.java",
"chars": 1605,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/QueryCustomizer.java",
"chars": 1101,
"preview": "/*\n * Copyright 2019-2023 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerConfig.java",
"chars": 6697,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/SwaggerDataConfig.java",
"chars": 1572,
"preview": "package me.zhengjie.config.webConfig;\n\nimport cn.hutool.core.collection.CollUtil;\nimport com.fasterxml.classmate.TypeRes"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java",
"chars": 1049,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/exception/BadRequestException.java",
"chars": 1143,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/exception/EntityExistException.java",
"chars": 1159,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/exception/EntityNotFoundException.java",
"chars": 1175,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/exception/handler/ApiError.java",
"chars": 1299,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java",
"chars": 4002,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/AnonTagUtils.java",
"chars": 4708,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/BigDecimalUtils.java",
"chars": 4137,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/CacheKey.java",
"chars": 1342,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/CloseUtil.java",
"chars": 1260,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/DateUtil.java",
"chars": 4394,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/ElConstant.java",
"chars": 871,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java",
"chars": 3321,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java",
"chars": 13563,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/PageResult.java",
"chars": 406,
"preview": "package me.zhengjie.utils;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\n\nimpo"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/PageUtil.java",
"chars": 1754,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java",
"chars": 10594,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/RedisUtils.java",
"chars": 21075,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/RequestHolder.java",
"chars": 1148,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/RsaUtils.java",
"chars": 7310,
"preview": "package me.zhengjie.utils;\n\nimport org.apache.commons.codec.binary.Base64;\nimport javax.crypto.Cipher;\nimport java.io.By"
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/SecurityUtils.java",
"chars": 4195,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/SpringBeanHolder.java",
"chars": 5158,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/StringUtils.java",
"chars": 7288,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/ThrowableUtil.java",
"chars": 1053,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/ValidationUtil.java",
"chars": 1256,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeBiEnum.java",
"chars": 1218,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/enums/CodeEnum.java",
"chars": 1258,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/enums/DataScopeEnum.java",
"chars": 1320,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/main/java/me/zhengjie/utils/enums/RequestMethodEnum.java",
"chars": 1574,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-common/src/test/java/me/zhengjie/utils/DateUtilsTest.java",
"chars": 905,
"preview": "package me.zhengjie.utils;\n\nimport org.junit.jupiter.api.Test;\n\nimport java.time.LocalDateTime;\nimport java.util.Date;\n\n"
},
{
"path": "eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java",
"chars": 682,
"preview": "package me.zhengjie.utils;\n\nimport org.junit.jupiter.api.Test;\n\nimport static me.zhengjie.utils.EncryptUtils.*;\nimport s"
},
{
"path": "eladmin-common/src/test/java/me/zhengjie/utils/FileUtilTest.java",
"chars": 1033,
"preview": "package me.zhengjie.utils;\n\nimport org.junit.jupiter.api.Test;\nimport org.springframework.mock.web.MockMultipartFile;\n\ni"
},
{
"path": "eladmin-common/src/test/java/me/zhengjie/utils/StringUtilsTest.java",
"chars": 1553,
"preview": "package me.zhengjie.utils;\n\nimport org.junit.jupiter.api.Test;\nimport org.springframework.mock.web.MockHttpServletReques"
},
{
"path": "eladmin-generator/pom.xml",
"chars": 1308,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java",
"chars": 2699,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java",
"chars": 1958,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/domain/vo/TableInfo.java",
"chars": 1391,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/repository/ColumnInfoRepository.java",
"chars": 1036,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/repository/GenConfigRepository.java",
"chars": 988,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/rest/GenConfigController.java",
"chars": 1775,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java",
"chars": 4446,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/service/GenConfigService.java",
"chars": 1038,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/service/GeneratorService.java",
"chars": 2379,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/service/impl/GenConfigServiceImpl.java",
"chars": 2125,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java",
"chars": 8505,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/utils/ColUtil.java",
"chars": 1471,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/java/me/zhengjie/utils/GenUtil.java",
"chars": 16453,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-generator/src/main/resources/gen.properties",
"chars": 326,
"preview": "# Database type to Java type\ntinyint=Integer\nsmallint=Integer\nmediumint=Integer\nint=Integer\ninteger=Integer\n\nbigint=Long"
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Controller.ftl",
"chars": 3411,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Dto.ftl",
"chars": 1604,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Entity.ftl",
"chars": 2958,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Mapper.ftl",
"chars": 1066,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl",
"chars": 3190,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Repository.ftl",
"chars": 1330,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/Service.ftl",
"chars": 2115,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl",
"chars": 6353,
"preview": "/*\n* Copyright 2019-2025 Zheng Jie\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not "
},
{
"path": "eladmin-generator/src/main/resources/template/front/api.ftl",
"chars": 437,
"preview": "import request from '@/utils/request'\n\nexport function add(data) {\n return request({\n url: 'api/${changeClassName}',"
},
{
"path": "eladmin-generator/src/main/resources/template/front/index.ftl",
"chars": 6941,
"preview": "<#--noinspection ALL-->\n<template>\n <div class=\"app-container\">\n <!--工具栏-->\n <div class=\"head-container\">\n <#i"
},
{
"path": "eladmin-logging/pom.xml",
"chars": 712,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/annotation/Log.java",
"chars": 969,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/aspect/LogAspect.java",
"chars": 3298,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/domain/SysLog.java",
"chars": 2259,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/repository/LogRepository.java",
"chars": 1335,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/rest/SysLogController.java",
"chars": 4112,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/SysLogService.java",
"chars": 2349,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogErrorDto.java",
"chars": 1464,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogQueryCriteria.java",
"chars": 1317,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/dto/SysLogSmallDto.java",
"chars": 1275,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/impl/SysLogServiceImpl.java",
"chars": 7940,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/mapstruct/LogErrorMapper.java",
"chars": 1037,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-logging/src/main/java/me/zhengjie/service/mapstruct/LogSmallMapper.java",
"chars": 1037,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/pom.xml",
"chars": 3271,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2"
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/AppRun.java",
"chars": 2700,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/App.java",
"chars": 1803,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/Database.java",
"chars": 1603,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/Deploy.java",
"chars": 1826,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/DeployHistory.java",
"chars": 1740,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/ServerDeploy.java",
"chars": 2185,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/domain/enums/DataTypeEnum.java",
"chars": 4383,
"preview": "/*\n * <<\n * Davinci\n * ==\n * Copyright (C) 2016 - 2019 EDP\n * ==\n * Licensed under the Apache License, Version 2.0 "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/AppRepository.java",
"chars": 980,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DatabaseRepository.java",
"chars": 1002,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DeployHistoryRepository.java",
"chars": 1022,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/DeployRepository.java",
"chars": 992,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/repository/ServerDeployRepository.java",
"chars": 1121,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/AppController.java",
"chars": 3130,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DatabaseController.java",
"chars": 4714,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DeployController.java",
"chars": 5637,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/DeployHistoryController.java",
"chars": 2651,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/rest/ServerDeployController.java",
"chars": 3758,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/AppService.java",
"chars": 1950,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DatabaseService.java",
"chars": 2120,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DeployHistoryService.java",
"chars": 1960,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/DeployService.java",
"chars": 2634,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/ServerDeployService.java",
"chars": 2272,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/AppDto.java",
"chars": 1429,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/AppQueryCriteria.java",
"chars": 1104,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DatabaseDto.java",
"chars": 1252,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DatabaseQueryCriteria.java",
"chars": 1187,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployDto.java",
"chars": 1878,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployHistoryDto.java",
"chars": 1261,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployHistoryQueryCriteria.java",
"chars": 1184,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/DeployQueryCriteria.java",
"chars": 1150,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/ServerDeployDto.java",
"chars": 1667,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/dto/ServerDeployQueryCriteria.java",
"chars": 1112,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/AppServiceImpl.java",
"chars": 5180,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DatabaseServiceImpl.java",
"chars": 4333,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployHistoryServiceImpl.java",
"chars": 3814,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/DeployServiceImpl.java",
"chars": 14499,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/impl/ServerDeployServiceImpl.java",
"chars": 4798,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/AppMapper.java",
"chars": 1064,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DatabaseMapper.java",
"chars": 1079,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DeployHistoryMapper.java",
"chars": 1114,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/DeployMapper.java",
"chars": 1120,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/service/mapstruct/ServerDeployMapper.java",
"chars": 1109,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/util/ExecuteShellUtil.java",
"chars": 2564,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/util/ScpClientUtil.java",
"chars": 3194,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/util/SqlUtils.java",
"chars": 6722,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/MsgType.java",
"chars": 807,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/SocketMsg.java",
"chars": 905,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/maint/websocket/WebSocketServer.java",
"chars": 3180,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/JobRunner.java",
"chars": 1772,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/config/QuartzConfig.java",
"chars": 2108,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzJob.java",
"chars": 2241,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/domain/QuartzLog.java",
"chars": 1949,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/repository/QuartzJobRepository.java",
"chars": 1124,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/repository/QuartzLogRepository.java",
"chars": 1006,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/rest/QuartzJobController.java",
"chars": 5475,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/QuartzJobService.java",
"chars": 2898,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/dto/JobQueryCriteria.java",
"chars": 1211,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/service/impl/QuartzJobServiceImpl.java",
"chars": 7660,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/task/TestTask.java",
"chars": 1033,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/ExecutionJob.java",
"chars": 5567,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzManage.java",
"chars": 5806,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/quartz/utils/QuartzRunnable.java",
"chars": 1748,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/config/CaptchaConfig.java",
"chars": 3651,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version loginCode.len"
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/config/LoginProperties.java",
"chars": 1204,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version loginCode.len"
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/config/SecurityProperties.java",
"chars": 1638,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/config/SpringSecurityConfig.java",
"chars": 5663,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/config/enums/LoginCodeEnum.java",
"chars": 970,
"preview": "/*\n * Copyright 2019-2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/rest/AuthController.java",
"chars": 6387,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/rest/OnlineController.java",
"chars": 2514,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAccessDeniedHandler.java",
"chars": 1784,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/security/JwtAuthenticationEntryPoint.java",
"chars": 1864,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenConfigurer.java",
"chars": 1764,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenFilter.java",
"chars": 3626,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java",
"chars": 5108,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/OnlineUserService.java",
"chars": 4951,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserCacheManager.java",
"chars": 2519,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/UserDetailsServiceImpl.java",
"chars": 2488,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthUserDto.java",
"chars": 1184,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/AuthorityDto.java",
"chars": 1081,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/JwtUserDto.java",
"chars": 2249,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/security/service/dto/OnlineUserDto.java",
"chars": 1510,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dept.java",
"chars": 2320,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Dict.java",
"chars": 1580,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/DictDetail.java",
"chars": 1603,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Job.java",
"chars": 1908,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Menu.java",
"chars": 2882,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/Role.java",
"chars": 3033,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/User.java",
"chars": 3594,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuMetaVo.java",
"chars": 1105,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/MenuVo.java",
"chars": 1426,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/domain/vo/UserPassVo.java",
"chars": 957,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DeptRepository.java",
"chars": 1943,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DictDetailRepository.java",
"chars": 1151,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/repository/DictRepository.java",
"chars": 1219,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/repository/JobRepository.java",
"chars": 1196,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
},
{
"path": "eladmin-system/src/main/java/me/zhengjie/modules/system/repository/MenuRepository.java",
"chars": 2339,
"preview": "/*\n * Copyright 2019-2025 Zheng Jie\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may "
}
]
// ... and 105 more files (download for full content)
About this extraction
This page contains the full source code of the elunez/eladmin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 305 files (879.7 KB), approximately 233.2k tokens, and a symbol index with 1277 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.