Showing preview only (9,478K chars total). Download the full file or copy to clipboard to get everything.
Repository: wxiaoqi/ace-admin
Branch: master
Commit: 349ad0d6a546
Files: 294
Total size: 73.6 MB
Directory structure:
gitextract__jhyxq4_/
├── .gitignore
├── LICENSE
├── README.md
├── ace-api/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── java/
│ └── com/
│ └── github/
│ └── wxiaoqi/
│ └── security/
│ └── api/
│ └── vo/
│ ├── authority/
│ │ ├── CheckPermissionInfo.java
│ │ └── PermissionInfo.java
│ ├── log/
│ │ └── LogInfo.java
│ ├── search/
│ │ └── IndexObject.java
│ └── user/
│ └── UserInfo.java
├── ace-dev-base/
│ ├── ace-auth-sdk/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── github/
│ │ └── wxiaoqi/
│ │ └── security/
│ │ └── auth/
│ │ └── client/
│ │ ├── EnableAceAuthClient.java
│ │ ├── annotation/
│ │ │ └── IgnoreUserToken.java
│ │ ├── config/
│ │ │ ├── FeignOkHttpConfig.java
│ │ │ ├── ServiceAuthConfig.java
│ │ │ └── UserAuthConfig.java
│ │ ├── configuration/
│ │ │ └── AutoConfiguration.java
│ │ ├── exception/
│ │ │ ├── JwtIllegalArgumentException.java
│ │ │ ├── JwtSignatureException.java
│ │ │ └── JwtTokenExpiredException.java
│ │ ├── feign/
│ │ │ └── ServiceAuthFeign.java
│ │ ├── interceptor/
│ │ │ ├── OkHttpTokenInterceptor.java
│ │ │ └── UserAuthRestInterceptor.java
│ │ ├── jwt/
│ │ │ └── UserAuthUtil.java
│ │ └── runner/
│ │ └── AuthClientRunner.java
│ ├── ace-common/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── java/
│ │ └── com/
│ │ └── github/
│ │ └── wxiaoqi/
│ │ └── security/
│ │ └── common/
│ │ ├── biz/
│ │ │ └── BaseBiz.java
│ │ ├── constant/
│ │ │ ├── CommonConstants.java
│ │ │ ├── RedisKeyConstant.java
│ │ │ ├── RestCodeConstants.java
│ │ │ └── UserConstant.java
│ │ ├── context/
│ │ │ └── BaseContextHandler.java
│ │ ├── exception/
│ │ │ ├── BaseException.java
│ │ │ └── auth/
│ │ │ ├── ClientForbiddenException.java
│ │ │ ├── ClientInvalidException.java
│ │ │ ├── ClientTokenException.java
│ │ │ ├── UserInvalidException.java
│ │ │ └── UserTokenException.java
│ │ ├── handler/
│ │ │ └── GlobalExceptionHandler.java
│ │ ├── msg/
│ │ │ ├── BaseResponse.java
│ │ │ ├── ObjectRestResponse.java
│ │ │ ├── TableResultResponse.java
│ │ │ └── auth/
│ │ │ ├── TokenErrorResponse.java
│ │ │ └── TokenForbiddenResponse.java
│ │ ├── rest/
│ │ │ └── BaseController.java
│ │ ├── service/
│ │ │ ├── BaseService.java
│ │ │ └── impl/
│ │ │ └── BaseServiceImpl.java
│ │ ├── util/
│ │ │ ├── AddressUtils.java
│ │ │ ├── ClientUtil.java
│ │ │ ├── EntityUtils.java
│ │ │ ├── IpUtils.java
│ │ │ ├── Query.java
│ │ │ ├── ReflectionUtils.java
│ │ │ ├── StringHelper.java
│ │ │ ├── TreeUtil.java
│ │ │ ├── UUIDUtils.java
│ │ │ ├── WebUtils.java
│ │ │ ├── http/
│ │ │ │ ├── HttpHelper.java
│ │ │ │ └── HttpUtils.java
│ │ │ └── jwt/
│ │ │ ├── IJWTInfo.java
│ │ │ ├── JWTHelper.java
│ │ │ ├── JWTInfo.java
│ │ │ └── RsaKeyHelper.java
│ │ ├── vo/
│ │ │ └── TreeNode.java
│ │ └── web/
│ │ └── ParameterRequestWrapper.java
│ └── pom.xml
├── ace-gate/
│ ├── pom.xml
│ └── src/
│ └── main/
│ ├── docker/
│ │ └── Dockerfile
│ ├── java/
│ │ └── com/
│ │ └── github/
│ │ └── wxiaoqi/
│ │ └── security/
│ │ └── gate/
│ │ ├── GatewayServerBootstrap.java
│ │ ├── config/
│ │ │ └── GatewayConfig.java
│ │ ├── filter/
│ │ │ └── AccessGatewayFilter.java
│ │ ├── handler/
│ │ │ └── RequestBodyRoutePredicateFactory.java
│ │ ├── service/
│ │ │ ├── LogService.java
│ │ │ └── LogServiceImpl.java
│ │ └── utils/
│ │ └── DBLog.java
│ └── resources/
│ └── application.yml
├── ace-infrastructure/
│ ├── ace-monitor/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── docker/
│ │ │ └── Dockerfile
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── github/
│ │ │ └── wxiaoqi/
│ │ │ └── security/
│ │ │ └── monitor/
│ │ │ └── MonitorBootstrap.java
│ │ └── resources/
│ │ └── application.yml
│ ├── ace-nacos/
│ │ ├── db/
│ │ │ └── init_nacos.sql
│ │ └── nacos/
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ ├── bin/
│ │ │ ├── derby.log
│ │ │ ├── logs/
│ │ │ │ ├── access_log.2019-10-24.log
│ │ │ │ └── access_log.2019-10-25.log
│ │ │ ├── shutdown.cmd
│ │ │ ├── shutdown.sh
│ │ │ ├── startup.cmd
│ │ │ └── startup.sh
│ │ ├── conf/
│ │ │ ├── application.properties
│ │ │ ├── application.properties.example
│ │ │ ├── cluster.conf.example
│ │ │ ├── nacos-logback.xml
│ │ │ ├── nacos-mysql.sql
│ │ │ └── schema.sql
│ │ ├── data/
│ │ │ ├── derby-data/
│ │ │ │ ├── README_DO_NOT_TOUCH_FILES.txt
│ │ │ │ ├── db.lck
│ │ │ │ ├── dbex.lck
│ │ │ │ ├── log/
│ │ │ │ │ ├── README_DO_NOT_TOUCH_FILES.txt
│ │ │ │ │ ├── log.ctrl
│ │ │ │ │ └── logmirror.ctrl
│ │ │ │ ├── seg0/
│ │ │ │ │ └── README_DO_NOT_TOUCH_FILES.txt
│ │ │ │ └── service.properties
│ │ │ └── naming/
│ │ │ ├── data/
│ │ │ │ └── public/
│ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-admin
│ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-auth
│ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-gateway
│ │ │ │ └── com.alibaba.nacos.naming.domains.meta.public##ace-monitor
│ │ │ └── meta.properties
│ │ ├── logs/
│ │ │ ├── cmdb-main.log
│ │ │ ├── config-acl.log
│ │ │ ├── config-app.log
│ │ │ ├── config-client-request.log
│ │ │ ├── config-dump.log
│ │ │ ├── config-fatal.log
│ │ │ ├── config-memory.log
│ │ │ ├── config-memory.log.2019-10-24.0
│ │ │ ├── config-notify.log
│ │ │ ├── config-pull-check.log
│ │ │ ├── config-pull.log
│ │ │ ├── config-sdk-request.log
│ │ │ ├── config-server.log
│ │ │ ├── config-server.log.2019-10-24.0
│ │ │ ├── config-trace.log
│ │ │ ├── nacos.log
│ │ │ ├── nacos.log.2019-10-24.0
│ │ │ ├── nacos.log.2019-10-25.0
│ │ │ ├── nacos_gc.log.0.current
│ │ │ ├── naming-cache.log
│ │ │ ├── naming-debug.log
│ │ │ ├── naming-device.log
│ │ │ ├── naming-event.log
│ │ │ ├── naming-performance.log
│ │ │ ├── naming-performance.log.2019-10-24.0
│ │ │ ├── naming-push.log
│ │ │ ├── naming-push.log.2019-10-24.0
│ │ │ ├── naming-raft.log
│ │ │ ├── naming-raft.log.2019-10-24.0
│ │ │ ├── naming-router.log
│ │ │ ├── naming-rt.log
│ │ │ ├── naming-server.log
│ │ │ ├── naming-server.log.2019-10-25.0
│ │ │ ├── naming-tag.log
│ │ │ ├── naming-tenant.log
│ │ │ └── start.out
│ │ └── plugins/
│ │ └── cmdb/
│ │ └── nacos-cmdb-plugin-example.jar
│ ├── ace-sentinel/
│ │ └── sentinel-dashboard.jar
│ └── pom.xml
├── ace-modules/
│ ├── ace-admin/
│ │ ├── db/
│ │ │ └── init.sql
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── docker/
│ │ │ ├── Dockerfile
│ │ │ └── wait-for-it.sh
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── github/
│ │ │ └── wxiaoqi/
│ │ │ └── security/
│ │ │ ├── AdminBootstrap.java
│ │ │ ├── configuration/
│ │ │ │ ├── KeyConfiguration.java
│ │ │ │ ├── RedisConfiguration.java
│ │ │ │ ├── UserConfiguration.java
│ │ │ │ └── WebConfiguration.java
│ │ │ └── modules/
│ │ │ ├── admin/
│ │ │ │ ├── biz/
│ │ │ │ │ ├── ElementBiz.java
│ │ │ │ │ ├── GateLogBiz.java
│ │ │ │ │ ├── GroupBiz.java
│ │ │ │ │ ├── GroupTypeBiz.java
│ │ │ │ │ ├── MenuBiz.java
│ │ │ │ │ ├── ResourceAuthorityBiz.java
│ │ │ │ │ └── UserBiz.java
│ │ │ │ ├── constant/
│ │ │ │ │ └── AdminCommonConstant.java
│ │ │ │ ├── entity/
│ │ │ │ │ ├── Element.java
│ │ │ │ │ ├── GateLog.java
│ │ │ │ │ ├── Group.java
│ │ │ │ │ ├── GroupType.java
│ │ │ │ │ ├── Menu.java
│ │ │ │ │ ├── OnlineLog.java
│ │ │ │ │ ├── ResourceAuthority.java
│ │ │ │ │ └── User.java
│ │ │ │ ├── mapper/
│ │ │ │ │ ├── ElementMapper.java
│ │ │ │ │ ├── GateLogMapper.java
│ │ │ │ │ ├── GroupMapper.java
│ │ │ │ │ ├── GroupTypeMapper.java
│ │ │ │ │ ├── MenuMapper.java
│ │ │ │ │ ├── ResourceAuthorityMapper.java
│ │ │ │ │ └── UserMapper.java
│ │ │ │ ├── rest/
│ │ │ │ │ ├── ElementController.java
│ │ │ │ │ ├── GateLogController.java
│ │ │ │ │ ├── GroupController.java
│ │ │ │ │ ├── GroupTypeController.java
│ │ │ │ │ ├── MenuController.java
│ │ │ │ │ └── UserController.java
│ │ │ │ ├── rpc/
│ │ │ │ │ ├── LogRest.java
│ │ │ │ │ ├── UserRest.java
│ │ │ │ │ └── service/
│ │ │ │ │ └── PermissionService.java
│ │ │ │ ├── util/
│ │ │ │ │ └── Sha256PasswordEncoder.java
│ │ │ │ └── vo/
│ │ │ │ ├── AccessInterface.java
│ │ │ │ ├── AccessMenuTree.java
│ │ │ │ ├── AccessRouteTree.java
│ │ │ │ ├── AuthorityMenuTree.java
│ │ │ │ ├── FrontUser.java
│ │ │ │ ├── FrontUserV2.java
│ │ │ │ ├── GroupTree.java
│ │ │ │ ├── GroupUsers.java
│ │ │ │ └── MenuTree.java
│ │ │ └── auth/
│ │ │ ├── bean/
│ │ │ │ └── ClientInfo.java
│ │ │ ├── biz/
│ │ │ │ ├── ClientBiz.java
│ │ │ │ └── ClientServiceBiz.java
│ │ │ ├── controller/
│ │ │ │ ├── AuthController.java
│ │ │ │ ├── CaptchaController.java
│ │ │ │ ├── ClientController.java
│ │ │ │ ├── OnlineController.java
│ │ │ │ └── ServiceController.java
│ │ │ ├── entity/
│ │ │ │ ├── Client.java
│ │ │ │ └── ClientService.java
│ │ │ ├── interceptor/
│ │ │ │ └── UserAuthRestInterceptor.java
│ │ │ ├── mapper/
│ │ │ │ ├── ClientMapper.java
│ │ │ │ └── ClientServiceMapper.java
│ │ │ ├── runner/
│ │ │ │ └── AuthServerRunner.java
│ │ │ ├── service/
│ │ │ │ ├── AuthClientService.java
│ │ │ │ ├── AuthService.java
│ │ │ │ └── impl/
│ │ │ │ ├── AuthServiceImpl.java
│ │ │ │ └── DBAuthClientService.java
│ │ │ ├── util/
│ │ │ │ └── user/
│ │ │ │ ├── JwtAuthenticationRequest.java
│ │ │ │ ├── JwtAuthenticationResponse.java
│ │ │ │ └── JwtTokenUtil.java
│ │ │ └── vo/
│ │ │ └── FrontUser.java
│ │ └── resources/
│ │ ├── application.yml
│ │ ├── builder/
│ │ │ └── generatorConfig.xml
│ │ ├── logback.xml
│ │ └── mapper/
│ │ ├── ClientMapper.xml
│ │ ├── ClientServiceMapper.xml
│ │ ├── ElementMapper.xml
│ │ ├── GateLogMapper.xml
│ │ ├── GroupMapper.xml
│ │ ├── GroupTypeMapper.xml
│ │ ├── MenuMapper.xml
│ │ ├── ResourceAuthorityMapper.xml
│ │ └── UserMapper.xml
│ ├── ace-generator/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── db/
│ │ │ └── cloud_sample.sql
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── github/
│ │ │ └── wxiaoqi/
│ │ │ └── security/
│ │ │ └── generator/
│ │ │ ├── GeneratorServerBootstrap.java
│ │ │ ├── config/
│ │ │ │ ├── DataSourceConfigurer.java
│ │ │ │ ├── DynamicDataSource.java
│ │ │ │ ├── DynamicDataSourceContextHolder.java
│ │ │ │ ├── DynamicDatasourceConfig.java
│ │ │ │ └── SwitchDB.java
│ │ │ ├── entity/
│ │ │ │ ├── ColumnEntity.java
│ │ │ │ └── TableEntity.java
│ │ │ ├── mapper/
│ │ │ │ └── GeneratorMapper.java
│ │ │ ├── rest/
│ │ │ │ └── GeneratorRest.java
│ │ │ ├── service/
│ │ │ │ └── GeneratorService.java
│ │ │ └── utils/
│ │ │ ├── DateUtils.java
│ │ │ └── GeneratorUtils.java
│ │ └── resources/
│ │ ├── application.yml
│ │ ├── generator.properties
│ │ ├── mapper/
│ │ │ └── GeneratorMapper.xml
│ │ └── template/
│ │ ├── biz.java.vm
│ │ ├── controller.java.vm
│ │ ├── entity.java.vm
│ │ ├── index.js.vm
│ │ ├── index.vue.vm
│ │ ├── mapper.java.vm
│ │ └── mapper.xml.vm
│ ├── ace-nlp/
│ │ └── pom.xml
│ ├── ace-sample/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── github/
│ │ │ └── wxiaoqi/
│ │ │ └── security/
│ │ │ └── sample/
│ │ │ ├── SampleBootstrap.java
│ │ │ ├── biz/
│ │ │ │ └── SampleDataTestBiz.java
│ │ │ ├── config/
│ │ │ │ └── WebConfiguration.java
│ │ │ ├── entity/
│ │ │ │ └── SampleDataTest.java
│ │ │ ├── mapper/
│ │ │ │ └── SampleDataTestMapper.java
│ │ │ └── rest/
│ │ │ └── SampleDataTestController.java
│ │ └── resources/
│ │ ├── application.yml
│ │ └── mapper/
│ │ └── SampleDataTestMapper.xml
│ ├── ace-tool/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── github/
│ │ │ └── wxiaoqi/
│ │ │ ├── ToolBootstrap.java
│ │ │ ├── config/
│ │ │ │ ├── CloudStorageConfig.java
│ │ │ │ └── LuceneConfiguration.java
│ │ │ ├── oss/
│ │ │ │ ├── cloud/
│ │ │ │ │ ├── AliyunCloudStorageService.java
│ │ │ │ │ ├── CloudStorageService.java
│ │ │ │ │ ├── OSSFactory.java
│ │ │ │ │ ├── QcloudCloudStorageService.java
│ │ │ │ │ └── QiniuCloudStorageService.java
│ │ │ │ ├── constants/
│ │ │ │ │ └── OSSConstant.java
│ │ │ │ └── controller/
│ │ │ │ └── OssController.java
│ │ │ └── search/
│ │ │ ├── controller/
│ │ │ │ └── SearchController.java
│ │ │ ├── lucene/
│ │ │ │ ├── LuceneDao.java
│ │ │ │ └── util/
│ │ │ │ ├── DocumentUtil.java
│ │ │ │ ├── IKAnalyzer5x.java
│ │ │ │ ├── IKTokenizer5x.java
│ │ │ │ └── QueryUtil.java
│ │ │ └── service/
│ │ │ ├── LuceneService.java
│ │ │ └── impl/
│ │ │ └── LuceneServiceImpl.java
│ │ └── resources/
│ │ ├── application.yml
│ │ └── bootstrap.yml
│ └── pom.xml
├── alibaba-base/
│ └── nacos.sql
├── dev-doc.md
├── docker-compose.yml
├── dump.rdb
└── pom.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*/target
*.iml
/.idea
*.class
target/
.project
.settings/
.classpath
ace-modules/ace-tool/src/main/resources/application-dev.yml
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. DefinitionsApache 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 LaoGanDie
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..
"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 LaoGanDie
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
================================================
### Cloud-Platform
Cloud-Platform是国内首个基于`Spring
Cloud`微`服务`化`开发平台`,具有统一授权、认证后台管理系统,其中包含具备用户管理、资源权限管理、网关API
管理等多个模块,支持多业务系统并行开发,可以作为后端服务的开发脚手架。代码简洁,架构清晰,适合学习和直接项目中使用。
核心技术采用`Spring Boot
2.4.1`、`Spring Cloud (2020.0.0)`以及`Spring Cloud Alibaba 2.2.4`
相关核心组件,采用`Nacos`注册和配置中心,集成流量卫兵`Sentinel`,前端采用`vue-element-admin`组件,`Elastic Search`自行集成。
### QQ群号:169824183(1)、592462556(2)、661605461(3)
### 公众号

#### 开源用户登记,宣传用:[点击打开](https://gitee.com/geek_qi/cloud-platform/issues/II9SP)
#### 最新更新日志,[点击查看](https://gitee.com/geek_qi/cloud-platform/wikis/Cloud-Platform更新日志?sort_id=320050)
#### 基础文档,[点击查看](https://gitee.com/geek_qi/cloud-platform/wikis/Home)
# 模块说明

### 架构摘要
#### 中台化前端
集成`d2admin`中台化前端,优化前端架构和功能布局,支撑中台服务化的应用开发。
#### JWT鉴权
通过`JWT`的方式来进行用户认证和信息传递,保证服务之间用户无状态的传递。
#### 监控
利用Spring Boot Admin 来监控各个独立Service的运行状态;利用Hystrix Dashboard来实时查看接口的运行状态和调用频率等。
#### 负载均衡
将服务保留的rest进行代理和网关控制,除了平常经常使用的node.js、nginx外,Spring Cloud系列的zuul和ribbon,可以帮我们进行正常的网关管控和负载均衡。其中扩展和借鉴国外项目的扩展基于JWT的`Zuul限流插件`,方面进行限流。
#### 服务注册与调用
基于`Nacos`来实现的服务注册与调用,在Spring Cloud中使用Feign, 我们可以做到使用HTTP请求远程服务时能与调用本地方法一样的编码体验,开发者完全感知不到这是远程方法,更感知不到这是个HTTP请求。
#### 熔断与流控
集成阿里`Sentinel`进行接口流量控制,通过熔断和降级处理避免服务之间的调用“雪崩”。
------
## 功能截图
### 基本功能
# 功能截图













## License
Apache License Version 2.0
================================================
FILE: ace-api/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>ace-security</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-api</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
</dependencies>
</project>
================================================
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/CheckPermissionInfo.java
================================================
package com.github.wxiaoqi.security.api.vo.authority;
import lombok.Data;
import java.util.function.Consumer;
/**
* @author Ths Sun
* @create 2020/7/23.
*/
@Data
public class CheckPermissionInfo{
// 请求权限资源
private PermissionInfo permissionInfo;
// 是否有权限
private Boolean isAuth;
}
================================================
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/PermissionInfo.java
================================================
package com.github.wxiaoqi.security.api.vo.authority;
import java.io.Serializable;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-22 15:19
*/
public class PermissionInfo implements Serializable{
private String code;
private String type;
private String uri;
private String method;
private String name;
private String menu;
public String getMenu() {
return menu;
}
public void setMenu(String menu) {
this.menu = menu;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
}
================================================
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/log/LogInfo.java
================================================
package com.github.wxiaoqi.security.api.vo.log;
import java.io.Serializable;
import java.util.Date;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-07-01 11:18
*/
public class LogInfo implements Serializable{
private String menu;
private String opt;
private String uri;
private Long crtTime;
private String crtUser;
private String crtName;
private String crtHost;
private String body;
public LogInfo(String menu, String option, String uri, Date crtTime, String crtUser, String crtName, String crtHost,String body) {
this.menu = menu;
this.opt = option;
this.uri = uri;
this.crtTime = crtTime.getTime();
this.crtUser = crtUser;
this.crtName = crtName;
this.crtHost = crtHost;
this.body = body;
}
public LogInfo() {
}
public String getMenu() {
return menu;
}
public void setMenu(String menu) {
this.menu = menu;
}
public String getOpt() {
return opt;
}
public void setOpt(String option) {
this.opt = option;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public Long getCrtTime() {
return crtTime;
}
public void setCrtTime(Date crtTime) {
this.crtTime = crtTime.getTime();
}
public String getCrtUser() {
return crtUser;
}
public void setCrtUser(String crtUser) {
this.crtUser = crtUser;
}
public String getCrtName() {
return crtName;
}
public void setCrtName(String crtName) {
this.crtName = crtName;
}
public String getCrtHost() {
return crtHost;
}
public void setCrtHost(String crtHost) {
this.crtHost = crtHost;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
}
================================================
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/search/IndexObject.java
================================================
/*
*
* * Copyright (C) 2018 the sun<463540703@qq.com>
*
* * AG-Enterprise 企业版源码
* * 郑重声明:
* * 如果你从其他途径获取到,请告知老A传播人,奖励1000。
* * 老A将追究授予人和传播人的法律责任!
*
* * This program is free software; you can redistribute it and/or modify
* * it under the terms of the GNU General Public License as published by
* * the Free Software Foundation; either version 2 of the License, or
* * (at your option) any later version.
*
* * This program is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* * GNU General Public License for more details.
*
* * You should have received a copy of the GNU General Public License along
* * with this program; if not, write to the Free Software Foundation, Inc.,
* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
package com.github.wxiaoqi.security.api.vo.search;
import java.io.Serializable;
/**
* Description:索引对象
*
* @author ace
**/
public class IndexObject implements Comparable<IndexObject>,Serializable{
private Long id;
private String title;
private String keywords;
private String descripton;
private String postDate;
public String getPostDate() {
return postDate;
}
public void setPostDate(String postDate) {
this.postDate = postDate;
}
public String getDescripton() {
return descripton;
}
public void setDescripton(String descripton) {
this.descripton = descripton;
}
private String url;
/*相似度*/
private float score;
public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public float getScore() {
return score;
}
public void setScore(float score) {
this.score = score;
}
public IndexObject() {
super();
}
public IndexObject(Long _id, String _keywords, String _descripton, String _postDate, float _score) {
super();
this.id = _id;
this.keywords = _keywords;
this.score = _score;
this.descripton=_descripton;
this.postDate=_postDate;
}
@Override
public int compareTo(IndexObject o) {
if(this.score < o.getScore()){
return 1;
}else if(this.score > o.getScore()){
return -1;
}
return 0;
}
}
================================================
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/user/UserInfo.java
================================================
package com.github.wxiaoqi.security.api.vo.user;
import java.io.Serializable;
import java.util.Date;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-21 8:12
*/
public class UserInfo implements Serializable{
public String id;
public String username;
public String password;
public String name;
private String description;
public Date getUpdTime() {
return updTime;
}
public void setUpdTime(Date updTime) {
this.updTime = updTime;
}
private Date updTime;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/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>ace-dev-base</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-auth-sdk</artifactId>
<dependencies>
<dependency>
<groupId>com.github.wxiaoqi</groupId>
<artifactId>ace-common</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/EnableAceAuthClient.java
================================================
package com.github.wxiaoqi.security.auth.client;
import com.github.wxiaoqi.security.auth.client.configuration.AutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*;
/**
* Created by ace on 2017/9/15.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Import(AutoConfiguration.class)
@Documented
@Inherited
public @interface EnableAceAuthClient {
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/annotation/IgnoreUserToken.java
================================================
package com.github.wxiaoqi.security.auth.client.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 忽略用户鉴权
* Created by ace on 2017/9/27.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(value={ElementType.METHOD,ElementType.TYPE})
public @interface IgnoreUserToken {
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/FeignOkHttpConfig.java
================================================
package com.github.wxiaoqi.security.auth.client.config;
import com.github.wxiaoqi.security.auth.client.interceptor.OkHttpTokenInterceptor;
import feign.Feign;
import okhttp3.ConnectionPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.TimeUnit;
@AutoConfigureBefore(FeignAutoConfiguration.class)
@Configuration
@ConditionalOnClass(Feign.class)
public class FeignOkHttpConfig {
@Autowired
OkHttpTokenInterceptor okHttpLoggingInterceptor;
private int feignOkHttpReadTimeout = 60;
private int feignConnectTimeout = 60;
private int feignWriteTimeout = 120;
@Bean
public okhttp3.OkHttpClient okHttpClient() {
return new okhttp3.OkHttpClient.Builder().readTimeout(feignOkHttpReadTimeout, TimeUnit.SECONDS).connectTimeout(feignConnectTimeout, TimeUnit.SECONDS)
.writeTimeout(feignWriteTimeout, TimeUnit.SECONDS).connectionPool(new ConnectionPool())
.addInterceptor(okHttpLoggingInterceptor)
.build();
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/ServiceAuthConfig.java
================================================
package com.github.wxiaoqi.security.auth.client.config;
import org.springframework.beans.factory.annotation.Value;
import javax.servlet.http.HttpServletRequest;
/**
* Created by ace on 2017/9/15.
*/
public class ServiceAuthConfig {
private byte[] pubKeyByte;
@Value("${auth.client.id:null}")
private String clientId;
@Value("${auth.client.secret}")
private String clientSecret;
@Value("${spring.application.name}")
private String applicationName;
public String getClientId() {
return "null".equals(clientId)?applicationName:clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
public byte[] getPubKeyByte() {
return pubKeyByte;
}
public void setPubKeyByte(byte[] pubKeyByte) {
this.pubKeyByte = pubKeyByte;
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/UserAuthConfig.java
================================================
package com.github.wxiaoqi.security.auth.client.config;
import org.springframework.beans.factory.annotation.Value;
import javax.servlet.http.HttpServletRequest;
/**
* Created by ace on 2017/9/15.
*/
public class UserAuthConfig {
@Value("${auth.user.token-header}")
private String tokenHeader;
private byte[] pubKeyByte;
public String getTokenHeader() {
return tokenHeader;
}
public void setTokenHeader(String tokenHeader) {
this.tokenHeader = tokenHeader;
}
public String getToken(HttpServletRequest request){
return request.getHeader(this.getTokenHeader());
}
public byte[] getPubKeyByte() {
return pubKeyByte;
}
public void setPubKeyByte(byte[] pubKeyByte) {
this.pubKeyByte = pubKeyByte;
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/configuration/AutoConfiguration.java
================================================
package com.github.wxiaoqi.security.auth.client.configuration;
import com.github.wxiaoqi.security.auth.client.config.ServiceAuthConfig;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
* Created by ace on 2017/9/15.
*/
@Configuration
@ComponentScan({"com.github.wxiaoqi.security.auth.client"})
public class AutoConfiguration {
@Bean
ServiceAuthConfig getServiceAuthConfig(){
return new ServiceAuthConfig();
}
@Bean
UserAuthConfig getUserAuthConfig(){
return new UserAuthConfig();
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtIllegalArgumentException.java
================================================
package com.github.wxiaoqi.security.auth.client.exception;
/**
* Created by ace on 2017/9/15.
*/
public class JwtIllegalArgumentException extends Exception {
public JwtIllegalArgumentException(String s) {
super(s);
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtSignatureException.java
================================================
package com.github.wxiaoqi.security.auth.client.exception;
/**
*
* @author ace
* @date 2017/9/15
*/
public class JwtSignatureException extends Exception {
public JwtSignatureException(String s) {
super(s);
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtTokenExpiredException.java
================================================
package com.github.wxiaoqi.security.auth.client.exception;
/**
* Created by ace on 2017/9/15.
*/
public class JwtTokenExpiredException extends Exception {
public JwtTokenExpiredException(String s) {
super(s);
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/feign/ServiceAuthFeign.java
================================================
package com.github.wxiaoqi.security.auth.client.feign;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
* Created by ace on 2017/9/15.
*/
@FeignClient(value = "${auth.serviceId}",configuration = {})
public interface ServiceAuthFeign {
@RequestMapping(value = "/client/userPubKey",method = RequestMethod.POST)
public ObjectRestResponse<byte[]> getUserPublicKey(@RequestParam("clientId") String clientId, @RequestParam("secret") String secret);
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/OkHttpTokenInterceptor.java
================================================
package com.github.wxiaoqi.security.auth.client.interceptor;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import lombok.extern.java.Log;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* @author ace
*/
@Component
@Log
public class OkHttpTokenInterceptor implements Interceptor {
@Autowired
@Lazy
private UserAuthConfig userAuthConfig;
@Override
public Response intercept(Chain chain) throws IOException {
Request newRequest = chain.request()
.newBuilder()
.header(userAuthConfig.getTokenHeader(), BaseContextHandler.getToken())
.build();
Response response = chain.proceed(newRequest);
// if (HttpStatus.FORBIDDEN.value() == response.code()) {
// if (response.body().string().contains(String.valueOf(CommonConstants.EX_CLIENT_INVALID_CODE))) {
// log.info("Client Token Expire,Retry to request...");
// serviceAuthUtil.refreshClientToken();
// newRequest = chain.request()
// .newBuilder()
// .header(userAuthConfig.getTokenHeader(), BaseContextHandler.getToken())
// .header(serviceAuthConfig.getTokenHeader(), serviceAuthUtil.getClientToken())
// .build();
// response = chain.proceed(newRequest);
// }
// }
return response;
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/UserAuthRestInterceptor.java
================================================
package com.github.wxiaoqi.security.auth.client.interceptor;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.util.jwt.IJWTInfo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Created by ace on 2017/9/10.
*/
public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
private Logger logger = LoggerFactory.getLogger(UserAuthRestInterceptor.class);
@Autowired
private UserAuthUtil userAuthUtil;
@Autowired
private UserAuthConfig userAuthConfig;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
HandlerMethod handlerMethod = (HandlerMethod) handler;
// 配置该注解,说明不进行用户拦截
IgnoreUserToken annotation = handlerMethod.getBeanType().getAnnotation(IgnoreUserToken.class);
if (annotation == null) {
annotation = handlerMethod.getMethodAnnotation(IgnoreUserToken.class);
}
if (annotation != null) {
return super.preHandle(request, response, handler);
}
String token = request.getHeader(userAuthConfig.getTokenHeader());
if (StringUtils.isEmpty(token)) {
if (request.getCookies() != null) {
for (Cookie cookie : request.getCookies()) {
if (cookie.getName().equals(userAuthConfig.getTokenHeader())) {
token = cookie.getValue();
}
}
}
}
IJWTInfo infoFromToken = userAuthUtil.getInfoFromToken(token);
BaseContextHandler.setUsername(infoFromToken.getUniqueName());
BaseContextHandler.setName(infoFromToken.getName());
BaseContextHandler.setUserID(infoFromToken.getId());
return super.preHandle(request, response, handler);
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
BaseContextHandler.remove();
super.afterCompletion(request, response, handler, ex);
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/jwt/UserAuthUtil.java
================================================
package com.github.wxiaoqi.security.auth.client.jwt;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.common.exception.auth.UserTokenException;
import com.github.wxiaoqi.security.common.util.jwt.IJWTInfo;
import com.github.wxiaoqi.security.common.util.jwt.JWTHelper;
import io.jsonwebtoken.ExpiredJwtException;
import io.jsonwebtoken.SignatureException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
/**
* Created by ace on 2017/9/15.
*/
@Configuration
public class UserAuthUtil {
@Autowired
private UserAuthConfig userAuthConfig;
public IJWTInfo getInfoFromToken(String token) throws Exception {
try {
return JWTHelper.getInfoFromToken(token, userAuthConfig.getPubKeyByte());
}catch (ExpiredJwtException ex){
throw new UserTokenException("User token expired!");
}catch (SignatureException ex){
throw new UserTokenException("User token signature error!");
}catch (IllegalArgumentException ex){
throw new UserTokenException("User token is null or empty!");
}
}
}
================================================
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/runner/AuthClientRunner.java
================================================
package com.github.wxiaoqi.security.auth.client.runner;
import com.github.wxiaoqi.security.auth.client.config.ServiceAuthConfig;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.auth.client.feign.ServiceAuthFeign;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.scheduling.annotation.Scheduled;
/**
* 监听完成时触发
*
* @author ace
* @create 2017/11/29.
*/
@Configuration
@Slf4j
public class AuthClientRunner implements CommandLineRunner {
@Autowired
private ServiceAuthConfig serviceAuthConfig;
@Autowired
private UserAuthConfig userAuthConfig;
@Autowired
private ServiceAuthFeign serviceAuthFeign;
@Override
public void run(String... args) throws Exception {
log.info("初始化加载用户pubKey");
try {
refreshUserPubKey();
}catch(Exception e){
log.error("初始化加载用户pubKey失败,1分钟后自动重试!",e);
}
}
@Scheduled(cron = "0 0/1 * * * ?")
public void refreshUserPubKey(){
BaseResponse resp = serviceAuthFeign.getUserPublicKey(serviceAuthConfig.getClientId(), serviceAuthConfig.getClientSecret());
if (resp.getStatusCode() == HttpStatus.OK.value()) {
ObjectRestResponse<byte[]> userResponse = (ObjectRestResponse<byte[]>) resp;
this.userAuthConfig.setPubKeyByte(userResponse.getData());
}
}
}
================================================
FILE: ace-dev-base/ace-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>ace-dev-base</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-common</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<mapper.version>3.4.0</mapper.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.0.4.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>5.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.5</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
</project>
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
================================================
package com.github.wxiaoqi.security.common.biz;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import com.github.wxiaoqi.security.common.util.EntityUtils;
import com.github.wxiaoqi.security.common.util.Query;
import org.springframework.beans.factory.annotation.Autowired;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;
import java.lang.reflect.ParameterizedType;
import java.util.List;
import java.util.Map;
/**
* Created by Mr.AG
* Date: 17/1/13
* Time: 15:13
* Version 1.0.0
*/
public abstract class BaseBiz<M extends Mapper<T>, T> {
@Autowired
protected M mapper;
public void setMapper(M mapper) {
this.mapper = mapper;
}
public T selectOne(T entity) {
return mapper.selectOne(entity);
}
public T selectById(Object id) {
return mapper.selectByPrimaryKey(id);
}
public List<T> selectList(T entity) {
return mapper.select(entity);
}
public List<T> selectListAll() {
return mapper.selectAll();
}
public Long selectCount(T entity) {
return new Long(mapper.selectCount(entity));
}
public void insert(T entity) {
EntityUtils.setCreatAndUpdatInfo(entity);
mapper.insert(entity);
}
public void insertSelective(T entity) {
EntityUtils.setCreatAndUpdatInfo(entity);
mapper.insertSelective(entity);
}
public void delete(T entity) {
mapper.delete(entity);
}
public void deleteById(Object id) {
mapper.deleteByPrimaryKey(id);
}
public void updateById(T entity) {
EntityUtils.setUpdatedInfo(entity);
mapper.updateByPrimaryKey(entity);
}
public void updateSelectiveById(T entity) {
EntityUtils.setUpdatedInfo(entity);
mapper.updateByPrimaryKeySelective(entity);
}
public List<T> selectByExample(Object example) {
return mapper.selectByExample(example);
}
public int selectCountByExample(Object example) {
return mapper.selectCountByExample(example);
}
public TableResultResponse<T> selectByQuery(Query query) {
Class<T> clazz = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[1];
Example example = new Example(clazz);
if(query.entrySet().size()>0) {
Example.Criteria criteria = example.createCriteria();
for (Map.Entry<String, Object> entry : query.entrySet()) {
criteria.andLike(entry.getKey(), "%" + entry.getValue().toString() + "%");
}
}
Page<Object> result = PageHelper.startPage(query.getPage(), query.getLimit());
List<T> list = mapper.selectByExample(example);
return new TableResultResponse<T>(result.getTotal(), list);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/CommonConstants.java
================================================
package com.github.wxiaoqi.security.common.constant;
/**
* Created by ace on 2017/8/29.
*/
public class CommonConstants {
public final static String RESOURCE_TYPE_MENU = "menu";
public final static String RESOURCE_TYPE_BTN = "button";
public static final Integer EX_TOKEN_ERROR_CODE = 40101;
// 用户token异常
public static final Integer EX_USER_INVALID_CODE = 40101;
public static final Integer EX_USER_PASS_INVALID_CODE = 40001;
// 客户端token异常
public static final Integer EX_CLIENT_INVALID_CODE = 40131;
public static final Integer EX_CLIENT_FORBIDDEN_CODE = 40331;
public static final Integer EX_OTHER_CODE = 500;
public static final String CONTEXT_KEY_USER_ID = "currentUserId";
public static final String CONTEXT_KEY_USERNAME = "currentUserName";
public static final String CONTEXT_KEY_USER_NAME = "currentUser";
public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken";
public static final String JWT_KEY_USER_ID = "userId";
public static final String JWT_KEY_NAME = "name";
public static final String JWT_ID = "id";
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* GBK 字符集
*/
public static final String GBK = "GBK";
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RedisKeyConstant.java
================================================
package com.github.wxiaoqi.security.common.constant;
/**
* @author Ths Sun
* @create 2020/7/26.
*/
public class RedisKeyConstant {
public static final String REDIS_KEY_USER_PERMISISON = "admin:permissions:%s";
public static final String REDIS_KEY_ALL_PERMISISON = "admin:permissions";
public static final String REDIS_KEY_CAPTCHA = "admin:captcha:%s";
public static final String REDIS_KEY_TOKEN = "admin:token";
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RestCodeConstants.java
================================================
package com.github.wxiaoqi.security.common.constant;
/**
* Created by ace on 2017/8/23.
*/
public class RestCodeConstants {
public static final int TOKEN_ERROR_CODE = 40101;
public static final int TOKEN_FORBIDDEN_CODE = 40301;
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/UserConstant.java
================================================
package com.github.wxiaoqi.security.common.constant;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-14 8:36
*/
public class UserConstant {
public static int PW_ENCORDER_SALT = 12;
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/context/BaseContextHandler.java
================================================
package com.github.wxiaoqi.security.common.context;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.util.StringHelper;
import java.util.HashMap;
import java.util.Map;
/**
* Created by ace on 2017/9/8.
*/
public class BaseContextHandler {
public static ThreadLocal<Map<String, Object>> threadLocal = new ThreadLocal<Map<String, Object>>();
public static void set(String key, Object value) {
Map<String, Object> map = threadLocal.get();
if (map == null) {
map = new HashMap<String, Object>();
threadLocal.set(map);
}
map.put(key, value);
}
public static Object get(String key){
Map<String, Object> map = threadLocal.get();
if (map == null) {
map = new HashMap<String, Object>();
threadLocal.set(map);
}
return map.get(key);
}
public static String getUserID(){
Object value = get(CommonConstants.CONTEXT_KEY_USER_ID);
return returnObjectValue(value);
}
public static String getUsername(){
Object value = get(CommonConstants.CONTEXT_KEY_USERNAME);
return returnObjectValue(value);
}
public static String getName(){
Object value = get(CommonConstants.CONTEXT_KEY_USER_NAME);
return StringHelper.getObjectValue(value);
}
public static String getToken(){
Object value = get(CommonConstants.CONTEXT_KEY_USER_TOKEN);
return StringHelper.getObjectValue(value);
}
public static void setToken(String token){set(CommonConstants.CONTEXT_KEY_USER_TOKEN,token);}
public static void setName(String name){set(CommonConstants.CONTEXT_KEY_USER_NAME,name);}
public static void setUserID(String userID){
set(CommonConstants.CONTEXT_KEY_USER_ID,userID);
}
public static void setUsername(String username){
set(CommonConstants.CONTEXT_KEY_USERNAME,username);
}
private static String returnObjectValue(Object value) {
return value==null?null:value.toString();
}
public static void remove(){
threadLocal.remove();
}
// @RunWith(MockitoJUnitRunner.class)
// public static class UnitTest {
// private Logger logger = LoggerFactory.getLogger(UnitTest.class);
//
// @Test
// public void testSetContextVariable() throws InterruptedException {
// BaseContextHandler.set("test", "main");
// new Thread(()->{
// BaseContextHandler.set("test", "moo");
//
// try {
// Thread.sleep(3000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// assertEquals(BaseContextHandler.get("test"), "moo");
// logger.info("thread one done!");
// }).start();
// new Thread(()->{
// BaseContextHandler.set("test", "moo2");
// assertEquals(BaseContextHandler.get("test"), "moo2");
// logger.info("thread two done!");
// }).start();
//
// Thread.sleep(5000);
// assertEquals(BaseContextHandler.get("test"), "main");
// logger.info("main one done!");
// }
//
// @Test
// public void testSetUserInfo(){
// BaseContextHandler.setUserID("test");
// assertEquals(BaseContextHandler.getUserID(), "test");
// BaseContextHandler.setUsername("test2");
// assertEquals(BaseContextHandler.getUsername(), "test2");
// }
// }
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/BaseException.java
================================================
package com.github.wxiaoqi.security.common.exception;
/**
* Created by ace on 2017/9/8.
*/
public class BaseException extends RuntimeException {
private int status = 200;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public BaseException() {
}
public BaseException(String message,int status) {
super(message);
this.status = status;
}
public BaseException(String message) {
super(message);
}
public BaseException(String message, Throwable cause) {
super(message, cause);
}
public BaseException(Throwable cause) {
super(cause);
}
public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientForbiddenException.java
================================================
package com.github.wxiaoqi.security.common.exception.auth;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
/**
* Created by ace on 2017/9/12.
*/
public class ClientForbiddenException extends BaseException {
public ClientForbiddenException(String message) {
super(message, CommonConstants.EX_CLIENT_FORBIDDEN_CODE);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientInvalidException.java
================================================
package com.github.wxiaoqi.security.common.exception.auth;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
/**
* Created by ace on 2017/9/10.
*/
public class ClientInvalidException extends BaseException {
public ClientInvalidException(String message) {
super(message, CommonConstants.EX_CLIENT_INVALID_CODE);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientTokenException.java
================================================
package com.github.wxiaoqi.security.common.exception.auth;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
/**
* Created by ace on 2017/9/10.
*/
public class ClientTokenException extends BaseException {
public ClientTokenException(String message) {
super(message, CommonConstants.EX_CLIENT_INVALID_CODE);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserInvalidException.java
================================================
package com.github.wxiaoqi.security.common.exception.auth;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
/**
* Created by ace on 2017/9/8.
*/
public class UserInvalidException extends BaseException {
public UserInvalidException(String message) {
super(message, CommonConstants.EX_USER_PASS_INVALID_CODE);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserTokenException.java
================================================
package com.github.wxiaoqi.security.common.exception.auth;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
/**
* Created by ace on 2017/9/8.
*/
public class UserTokenException extends BaseException {
public UserTokenException(String message) {
super(message, CommonConstants.EX_USER_INVALID_CODE);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/GlobalExceptionHandler.java
================================================
package com.github.wxiaoqi.security.common.handler;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.exception.auth.ClientTokenException;
import com.github.wxiaoqi.security.common.exception.auth.UserInvalidException;
import com.github.wxiaoqi.security.common.exception.auth.UserTokenException;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse;
/**
* Created by ace on 2017/9/8.
*/
@ControllerAdvice("com.github.wxiaoqi.security")
@ResponseBody
public class GlobalExceptionHandler {
private Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
@ExceptionHandler(ClientTokenException.class)
public BaseResponse clientTokenExceptionHandler(HttpServletResponse response, ClientTokenException ex) {
response.setStatus(403);
logger.error(ex.getMessage(),ex);
return new BaseResponse(ex.getStatus(), ex.getMessage());
}
@ExceptionHandler(UserTokenException.class)
public BaseResponse userTokenExceptionHandler(HttpServletResponse response, UserTokenException ex) {
response.setStatus(401);
logger.error(ex.getMessage(),ex);
return new BaseResponse(ex.getStatus(), ex.getMessage());
}
@ExceptionHandler(UserInvalidException.class)
public BaseResponse userInvalidExceptionHandler(HttpServletResponse response, UserInvalidException ex) {
response.setStatus(200);
logger.error(ex.getMessage(),ex);
return new BaseResponse(ex.getStatus(), ex.getMessage());
}
@ExceptionHandler(BaseException.class)
public BaseResponse baseExceptionHandler(HttpServletResponse response, BaseException ex) {
logger.error(ex.getMessage(),ex);
response.setStatus(500);
return new BaseResponse(ex.getStatus(), ex.getMessage());
}
@ExceptionHandler(Exception.class)
public BaseResponse otherExceptionHandler(HttpServletResponse response, Exception ex) {
response.setStatus(500);
logger.error(ex.getMessage(),ex);
return new BaseResponse(CommonConstants.EX_OTHER_CODE, ex.getMessage());
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/BaseResponse.java
================================================
package com.github.wxiaoqi.security.common.msg;
/**
* Created by ace on 2017/8/23.
*/
public class BaseResponse {
private int statusCode = 200;
private String message;
public BaseResponse(int status, String message) {
this.statusCode = status;
this.message = message;
}
public BaseResponse() {
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getStatusCode() {
return statusCode;
}
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/ObjectRestResponse.java
================================================
package com.github.wxiaoqi.security.common.msg;
/**
* Created by Ace on 2017/6/11.
*/
public class ObjectRestResponse<T> extends BaseResponse {
T data;
public ObjectRestResponse data(T data) {
this.setData(data);
return this;
}
public T getData() {
return data;
}
public ObjectRestResponse setData(T data) {
this.data = data;
return this;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/TableResultResponse.java
================================================
package com.github.wxiaoqi.security.common.msg;
import java.util.List;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-14 22:40
*/
public class TableResultResponse<T> extends BaseResponse {
TableData<T> data;
public TableResultResponse(long total, List<T> rows) {
this.data = new TableData<T>(total, rows);
}
public TableResultResponse() {
this.data = new TableData<T>();
}
TableResultResponse<T> total(int total) {
this.data.setTotal(total);
return this;
}
TableResultResponse<T> total(List<T> rows) {
this.data.setRows(rows);
return this;
}
public TableData<T> getData() {
return data;
}
public void setData(TableData<T> data) {
this.data = data;
}
class TableData<T> {
long total;
List<T> rows;
public TableData(long total, List<T> rows) {
this.total = total;
this.rows = rows;
}
public TableData() {
}
public long getTotal() {
return total;
}
public void setTotal(long total) {
this.total = total;
}
public List<T> getRows() {
return rows;
}
public void setRows(List<T> rows) {
this.rows = rows;
}
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenErrorResponse.java
================================================
package com.github.wxiaoqi.security.common.msg.auth;
import com.github.wxiaoqi.security.common.constant.RestCodeConstants;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
/**
* Created by ace on 2017/8/23.
*/
public class TokenErrorResponse extends BaseResponse {
public TokenErrorResponse(String message) {
super(RestCodeConstants.TOKEN_ERROR_CODE, message);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenForbiddenResponse.java
================================================
package com.github.wxiaoqi.security.common.msg.auth;
import com.github.wxiaoqi.security.common.constant.RestCodeConstants;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
/**
* Created by ace on 2017/8/25.
*/
public class TokenForbiddenResponse extends BaseResponse {
public TokenForbiddenResponse(String message) {
super(RestCodeConstants.TOKEN_FORBIDDEN_CODE, message);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/BaseController.java
================================================
package com.github.wxiaoqi.security.common.rest;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import com.github.wxiaoqi.security.common.util.Query;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-15 8:48
*/
@Slf4j
public class BaseController<Biz extends BaseBiz,Entity> {
@Autowired
protected HttpServletRequest request;
@Autowired
protected Biz baseBiz;
@RequestMapping(value = "",method = RequestMethod.POST)
@ResponseBody
public ObjectRestResponse<Entity> add(@RequestBody Entity entity){
baseBiz.insertSelective(entity);
return new ObjectRestResponse<Entity>();
}
@RequestMapping(value = "/{id}",method = RequestMethod.GET)
@ResponseBody
public ObjectRestResponse<Entity> get(@PathVariable int id){
ObjectRestResponse<Entity> entityObjectRestResponse = new ObjectRestResponse<>();
Object o = baseBiz.selectById(id);
entityObjectRestResponse.data((Entity)o);
return entityObjectRestResponse;
}
@RequestMapping(value = "/{id}",method = RequestMethod.PUT)
@ResponseBody
public ObjectRestResponse<Entity> update(@RequestBody Entity entity){
baseBiz.updateSelectiveById(entity);
return new ObjectRestResponse<Entity>();
}
@RequestMapping(value = "/{id}",method = RequestMethod.DELETE)
@ResponseBody
public ObjectRestResponse<Entity> remove(@PathVariable int id){
baseBiz.deleteById(id);
return new ObjectRestResponse<Entity>();
}
@RequestMapping(value = "/all",method = RequestMethod.GET)
@ResponseBody
public ObjectRestResponse<List<Entity>> all(){
return new ObjectRestResponse<>().data(baseBiz.selectListAll());
}
@RequestMapping(value = "/page",method = RequestMethod.GET)
@ResponseBody
public TableResultResponse<Entity> list(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
return baseBiz.selectByQuery(query);
}
public String getCurrentUserName(){
return BaseContextHandler.getUsername();
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/BaseService.java
================================================
package com.github.wxiaoqi.security.common.service;
import java.util.List;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-06-08 16:26
*/
public interface BaseService<T> {
/**
* 查询
*
* @param entity
* @return
*/
T selectOne(T entity);
/**
* 通过Id查询
*
* @param id
* @return
*/
T selectById(Object id);
/**
* 根据ID集合来查询
*
* @param ids
* @return
*/
// List<T> selectListByIds(List<Object> ids);
/**
* 查询列表
*
* @param entity
* @return
*/
List<T> selectList(T entity);
/**
* 获取所有对象
*
* @return
*/
List<T> selectListAll();
/**
* 查询总记录数
*
* @return
*/
// Long selectCountAll();
/**
* 查询总记录数
*
* @param entity
* @return
*/
Long selectCount(T entity);
/**
* 添加
*
* @param entity
*/
void insert(T entity);
/**
* 插入 不插入null字段
*
* @param entity
*/
void insertSelective(T entity);
/**
* 删除
*
* @param entity
*/
void delete(T entity);
/**
* 根据Id删除
*
* @param id
*/
void deleteById(Object id);
/**
* 根据id更新
*
* @param entity
*/
void updateById(T entity);
/**
* 不update null
*
* @param entity
*/
void updateSelectiveById(T entity);
/**
* 根据ID集合批量删除
*
* @param ids
*/
// void deleteBatchByIds(List<Object> ids);
/**
* 批量更新
*
* @param entitys
*/
// void updateBatch(List<T> entitys);
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/impl/BaseServiceImpl.java
================================================
package com.github.wxiaoqi.security.common.service.impl;
import com.github.wxiaoqi.security.common.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
public class BaseServiceImpl<M extends Mapper<T>, T> implements BaseService<T> {
@Autowired
protected M mapper;
@Override
public T selectOne(T entity) {
return mapper.selectOne(entity);
}
@Override
public T selectById(Object id) {
return mapper.selectByPrimaryKey(id);
}
// @Override
// public List<T> selectListByIds(List<Object> ids) {
// return mapper.selectByIds(ids);
// }
@Override
public List<T> selectList(T entity) {
return mapper.select(entity);
}
@Override
public List<T> selectListAll() {
return mapper.selectAll();
}
// @Override
// public Long selectCountAll() {
// return mapper.selectCount();
// }
@Override
public Long selectCount(T entity) {
return Long.valueOf(mapper.selectCount(entity));
}
@Override
public void insert(T entity) {
mapper.insert(entity);
}
@Override
public void insertSelective(T entity) {
mapper.insertSelective(entity);
}
@Override
public void delete(T entity) {
mapper.delete(entity);
}
@Override
public void deleteById(Object id) {
mapper.deleteByPrimaryKey(id);
}
@Override
public void updateById(T entity) {
mapper.updateByPrimaryKey(entity);
}
@Override
public void updateSelectiveById(T entity) {
mapper.updateByPrimaryKeySelective(entity);
}
// @Override
// public void deleteBatchByIds(List<Object> ids) {
// mapper.batchDeleteByIds(ids);
// }
//
// @Override
// public void updateBatch(List<T> entitys) {
// mapper.batchUpdate(entitys);
// }
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/AddressUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.util.http.HttpUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
/**
* 获取地址类
*
* @author The Sun
*/
@Slf4j
public class AddressUtils {
// IP地址查询
public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp";
// 未知地址
public static final String UNKNOWN = "XX XX";
public static String getRealAddressByIP(String ip) {
String address = UNKNOWN;
// 内网不查询
if (IpUtils.internalIp(ip)) {
return "内网IP";
}
try {
String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", CommonConstants.GBK);
if (StringUtils.isEmpty(rspStr)) {
log.error("获取地理位置异常 {}", ip);
return UNKNOWN;
}
JSONObject obj = JSONObject.parseObject(rspStr);
String region = obj.getString("pro");
String city = obj.getString("city");
return String.format("%s %s", region, city);
} catch (Exception e) {
log.error("获取地理位置异常 {}", ip);
}
return address;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ClientUtil.java
================================================
package com.github.wxiaoqi.security.common.util;
import javax.servlet.http.HttpServletRequest;
public class ClientUtil {
/**
* 获取客户端真实ip
* @param request
* @return
*/
public static String getClientIp(HttpServletRequest request){
String ip = request.getHeader("x-forwarded-for");
if (ip==null||ip.length()==0||"unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip==null||ip.length()==0||"unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip==null||ip.length()==0||"unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/EntityUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.net.URLDecoder;
import java.util.Date;
/**
* 实体类相关工具类
* 解决问题: 1、快速对实体的常驻字段,如:crtUser、crtHost、updUser等值快速注入
*
* @author Ace
* @version 1.0
* @date 2016年4月18日
* @since 1.7
*/
public class EntityUtils {
/**
* 快速将bean的crtUser、crtHost、crtTime、updUser、updHost、updTime附上相关值
*
* @param entity 实体bean
* @author Ths Sun
*/
public static <T> void setCreatAndUpdatInfo(T entity) {
setCreateInfo(entity);
setUpdatedInfo(entity);
}
/**
* 快速将bean的crtUser、crtHost、crtTime附上相关值
*
* @param entity 实体bean
* @author Ths Sun
*/
public static <T> void setCreateInfo(T entity){
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
String hostIp = "";
String name = "";
String id = "";
if(request!=null) {
hostIp = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
name = StringUtils.trimToEmpty(request.getHeader("userName"));
name = URLDecoder.decode(name);
id = StringUtils.trimToEmpty(request.getHeader("userId"));
}
if (StringUtils.isBlank(name)) {
name = BaseContextHandler.getUsername();
}
if (StringUtils.isBlank(id)) {
id = BaseContextHandler.getUserID();
}
// 默认属性
String[] fields = {"crtName","crtUser","crtHost","crtTime"};
Field field = ReflectionUtils.getAccessibleField(entity, "crtTime");
// 默认值
Object [] value = null;
if(field!=null&&field.getType().equals(Date.class)){
value = new Object []{name,id,hostIp,new Date()};
}
// 填充默认属性值
setDefaultValues(entity, fields, value);
}
/**
* 快速将bean的updUser、updHost、updTime附上相关值
*
* @param entity 实体bean
* @author Ths Sun
*/
public static <T> void setUpdatedInfo(T entity){
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
String hostIp = "";
String name = "";
String id = "";
if(request!=null) {
hostIp = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
name = StringUtils.trimToEmpty(request.getHeader("userName"));
name = URLDecoder.decode(name);
id = StringUtils.trimToEmpty(request.getHeader("userId"));
}
if (StringUtils.isBlank(name)) {
name = BaseContextHandler.getUsername();
}
if (StringUtils.isBlank(id)) {
id = BaseContextHandler.getUserID();
}
// 默认属性
String[] fields = {"updName","updUser","updHost","updTime"};
Field field = ReflectionUtils.getAccessibleField(entity, "updTime");
Object [] value = null;
if(field!=null&&field.getType().equals(Date.class)){
value = new Object []{name,id,hostIp,new Date()};
}
// 填充默认属性值
setDefaultValues(entity, fields, value);
}
/**
* 依据对象的属性数组和值数组对对象的属性进行赋值
*
* @param entity 对象
* @param fields 属性数组
* @param value 值数组
* @author Ths Sun
*/
private static <T> void setDefaultValues(T entity, String[] fields, Object[] value) {
for(int i=0;i<fields.length;i++){
String field = fields[i];
if(ReflectionUtils.hasField(entity, field)){
ReflectionUtils.invokeSetter(entity, field, value[i]);
}
}
}
/**
* 根据主键属性,判断主键是否值为空
*
* @param entity
* @param field
* @return 主键为空,则返回false;主键有值,返回true
* @author Ths Sun
* @date 2016年4月28日
*/
public static <T> boolean isPKNotNull(T entity,String field){
if(!ReflectionUtils.hasField(entity, field)) {
return false;
}
Object value = ReflectionUtils.getFieldValue(entity, field);
return value!=null&&!"".equals(value);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/IpUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import javax.servlet.http.HttpServletRequest;
/**
* @author Ths Sun
* @create 2020/7/30.
*/
public class IpUtils {
public static String getRemoteIP(HttpServletRequest request) {
if (request.getHeader("x-forwarded-for") == null) {
return request.getRemoteAddr();
}
return request.getHeader("x-forwarded-for");
}
public static boolean internalIp(String ip)
{
byte[] addr = textToNumericFormatV4(ip);
return internalIp(addr) || "127.0.0.1".equals(ip);
}
/**
* 将IPv4地址转换成字节
*
* @param text IPv4地址
* @return byte 字节
*/
public static byte[] textToNumericFormatV4(String text)
{
if (text.length() == 0)
{
return null;
}
byte[] bytes = new byte[4];
String[] elements = text.split("\\.", -1);
try
{
long l;
int i;
switch (elements.length)
{
case 1:
l = Long.parseLong(elements[0]);
if ((l < 0L) || (l > 4294967295L)) {
return null;
}
bytes[0] = (byte) (int) (l >> 24 & 0xFF);
bytes[1] = (byte) (int) ((l & 0xFFFFFF) >> 16 & 0xFF);
bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 2:
l = Integer.parseInt(elements[0]);
if ((l < 0L) || (l > 255L)) {
return null;
}
bytes[0] = (byte) (int) (l & 0xFF);
l = Integer.parseInt(elements[1]);
if ((l < 0L) || (l > 16777215L)) {
return null;
}
bytes[1] = (byte) (int) (l >> 16 & 0xFF);
bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 3:
for (i = 0; i < 2; ++i)
{
l = Integer.parseInt(elements[i]);
if ((l < 0L) || (l > 255L)) {
return null;
}
bytes[i] = (byte) (int) (l & 0xFF);
}
l = Integer.parseInt(elements[2]);
if ((l < 0L) || (l > 65535L)) {
return null;
}
bytes[2] = (byte) (int) (l >> 8 & 0xFF);
bytes[3] = (byte) (int) (l & 0xFF);
break;
case 4:
for (i = 0; i < 4; ++i)
{
l = Integer.parseInt(elements[i]);
if ((l < 0L) || (l > 255L)) {
return null;
}
bytes[i] = (byte) (int) (l & 0xFF);
}
break;
default:
return null;
}
}
catch (NumberFormatException e)
{
return null;
}
return bytes;
}
private static boolean internalIp(byte[] addr)
{
if (addr == null || addr.length < 2)
{
return true;
}
final byte b0 = addr[0];
final byte b1 = addr[1];
// 10.x.x.x/8
final byte SECTION_1 = 0x0A;
// 172.16.x.x/12
final byte SECTION_2 = (byte) 0xAC;
final byte SECTION_3 = (byte) 0x10;
final byte SECTION_4 = (byte) 0x1F;
// 192.168.x.x/16
final byte SECTION_5 = (byte) 0xC0;
final byte SECTION_6 = (byte) 0xA8;
switch (b0)
{
case SECTION_1:
return true;
case SECTION_2:
if (b1 >= SECTION_3 && b1 <= SECTION_4)
{
return true;
}
case SECTION_5:
switch (b1)
{
case SECTION_6:
return true;
}
default:
return false;
}
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/Query.java
================================================
package com.github.wxiaoqi.security.common.util;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* 查询参数
*/
public class Query extends LinkedHashMap<String, Object> {
private static final long serialVersionUID = 1L;
//当前页码
private int page = 1;
//每页条数
private int limit = 10;
public Query(Map<String, Object> params){
this.putAll(params);
//分页参数
if(params.get("page")!=null) {
this.page = Integer.parseInt(params.get("page").toString());
}
if(params.get("limit")!=null) {
this.limit = Integer.parseInt(params.get("limit").toString());
}
this.remove("page");
this.remove("limit");
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ReflectionUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.Assert;
/**
* 反射工具类.
* 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
* @author calvin
* @version 2013-01-15
*/
@SuppressWarnings("rawtypes")
public class ReflectionUtils {
private static final String SETTER_PREFIX = "set";
private static final String GETTER_PREFIX = "get";
private static final String CGLIB_CLASS_SEPARATOR = "$$";
private static Logger logger = LoggerFactory.getLogger(ReflectionUtils.class);
/**
* 调用Getter方法.
* 支持多级,如:对象名.对象名.方法
*/
public static Object invokeGetter(Object obj, String propertyName) {
Object object = obj;
for (String name : StringUtils.split(propertyName, ".")){
String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
}
return object;
}
/**
* 调用Setter方法, 仅匹配方法名。
* 支持多级,如:对象名.对象名.方法
*/
public static void invokeSetter(Object obj, String propertyName, Object value) {
Object object = obj;
String[] names = StringUtils.split(propertyName, ".");
for (int i=0; i<names.length; i++){
if(i<names.length-1){
String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]);
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
}else{
String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]);
invokeMethodByName(object, setterMethodName, new Object[] { value });
}
}
}
/**
* 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数.
*/
public static Object getFieldValue(final Object obj, final String fieldName) {
Field field = getAccessibleField(obj, fieldName);
if (field == null) {
throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]");
}
Object result = null;
try {
result = field.get(obj);
} catch (IllegalAccessException e) {
logger.error("不可能抛出的异常{}", e.getMessage());
}
return result;
}
/**
* 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数.
*/
public static void setFieldValue(final Object obj, final String fieldName, final Object value) {
Field field = getAccessibleField(obj, fieldName);
if (field == null) {
logger.error("Could not find field [" + fieldName + "] on target [" + obj + "]");
return;
//throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]");
}
try {
field.set(obj, convert(value, field.getType()));
} catch (IllegalAccessException e) {
logger.error("不可能抛出的异常:{}", e.getMessage());
}
}
public static Object convert(Object object, Class<?> type) {
if (object instanceof Number) {
Number number = (Number) object;
if (type.equals(byte.class) || type.equals(Byte.class)) {
return number.byteValue();
}
if (type.equals(short.class) || type.equals(Short.class)) {
return number.shortValue();
}
if (type.equals(int.class) || type.equals(Integer.class)) {
return number.intValue();
}
if (type.equals(long.class) || type.equals(Long.class)) {
return number.longValue();
}
if (type.equals(float.class) || type.equals(Float.class)) {
return number.floatValue();
}
if (type.equals(double.class) || type.equals(Double.class)) {
return number.doubleValue();
}
}
if(type.equals(String.class)){
return object==null?"":object.toString();
}
return object;
}
/**
* 直接调用对象方法, 无视private/protected修饰符.
* 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用.
* 同时匹配方法名+参数类型,
*/
public static Object invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
final Object[] args) {
Method method = getAccessibleMethod(obj, methodName, parameterTypes);
if (method == null) {
throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
}
try {
return method.invoke(obj, args);
} catch (Exception e) {
throw convertReflectionExceptionToUnchecked(e);
}
}
/**
* 直接调用对象方法, 无视private/protected修饰符,
* 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用.
* 只匹配函数名,如果有多个同名函数调用第一个。
*/
public static Object invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
Method method = getAccessibleMethodByName(obj, methodName);
if (method == null) {
throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
}
try {
return method.invoke(obj, args);
} catch (Exception e) {
throw convertReflectionExceptionToUnchecked(e);
}
}
/**
* 循环向上转型, 获取对象的DeclaredField, 并强制设置为可访问.
*
* 如向上转型到Object仍无法找到, 返回null.
*/
public static Field getAccessibleField(final Object obj, final String fieldName) {
Validate.notNull(obj, "object can't be null");
Validate.notBlank(fieldName, "fieldName can't be blank");
for (Class<?> superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) {
try {
Field field = superClass.getDeclaredField(fieldName);
makeAccessible(field);
return field;
} catch (NoSuchFieldException e) {//NOSONAR
// Field不在当前类定义,继续向上转型
continue;// new add
}
}
return null;
}
/**
* 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问.
* 如向上转型到Object仍无法找到, 返回null.
* 匹配函数名+参数类型。
*
* 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
*/
public static Method getAccessibleMethod(final Object obj, final String methodName,
final Class<?>... parameterTypes) {
Validate.notNull(obj, "object can't be null");
Validate.notBlank(methodName, "methodName can't be blank");
for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
try {
Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
makeAccessible(method);
return method;
} catch (NoSuchMethodException e) {
// Method不在当前类定义,继续向上转型
continue;// new add
}
}
return null;
}
/**
* 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问.
* 如向上转型到Object仍无法找到, 返回null.
* 只匹配函数名。
*
* 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
*/
public static Method getAccessibleMethodByName(final Object obj, final String methodName) {
Validate.notNull(obj, "object can't be null");
Validate.notBlank(methodName, "methodName can't be blank");
for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
Method[] methods = searchType.getDeclaredMethods();
for (Method method : methods) {
if (method.getName().equals(methodName)) {
makeAccessible(method);
return method;
}
}
}
return null;
}
/**
* 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
*/
public static void makeAccessible(Method method) {
if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers()))
&& !method.isAccessible()) {
method.setAccessible(true);
}
}
/**
* 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。
*/
public static void makeAccessible(Field field) {
if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) || Modifier
.isFinal(field.getModifiers())) && !field.isAccessible()) {
field.setAccessible(true);
}
}
/**
* 通过反射, 获得Class定义中声明的泛型参数的类型, 注意泛型必须定义在父类处
* 如无法找到, 返回Object.class.
* eg.
* public UserDao extends HibernateDao<User>
*
* @param clazz The class to introspect
* @return the first generic declaration, or Object.class if cannot be determined
*/
@SuppressWarnings("unchecked")
public static <T> Class<T> getClassGenricType(final Class clazz) {
return getClassGenricType(clazz, 0);
}
/**
* 通过反射, 获得Class定义中声明的父类的泛型参数的类型.
* 如无法找到, 返回Object.class.
*
* 如public UserDao extends HibernateDao<User,Long>
*
* @param clazz clazz The class to introspect
* @param index the Index of the generic ddeclaration,start from 0.
* @return the index generic declaration, or Object.class if cannot be determined
*/
public static Class getClassGenricType(final Class clazz, final int index) {
Type genType = clazz.getGenericSuperclass();
if (!(genType instanceof ParameterizedType)) {
logger.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType");
return Object.class;
}
Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
if (index >= params.length || index < 0) {
logger.warn("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
+ params.length);
return Object.class;
}
if (!(params[index] instanceof Class)) {
logger.warn(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
return Object.class;
}
return (Class) params[index];
}
public static Class<?> getUserClass(Object instance) {
Assert.notNull(instance, "Instance must not be null");
Class clazz = instance.getClass();
if (clazz != null && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) {
Class<?> superClass = clazz.getSuperclass();
if (superClass != null && !Object.class.equals(superClass)) {
return superClass;
}
}
return clazz;
}
/**
* 将反射时的checked exception转换为unchecked exception.
*/
public static RuntimeException convertReflectionExceptionToUnchecked(Exception e) {
if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException
|| e instanceof NoSuchMethodException) {
return new IllegalArgumentException(e);
} else if (e instanceof InvocationTargetException) {
return new RuntimeException(((InvocationTargetException) e).getTargetException());
} else if (e instanceof RuntimeException) {
return (RuntimeException) e;
}
return new RuntimeException("Unexpected Checked Exception.", e);
}
/**
* 判断某个对象是否拥有某个属性
*
* @param obj 对象
* @param fieldName 属性名
* @return 有属性返回true
* 无属性返回false
*/
public static boolean hasField(final Object obj, final String fieldName){
Field field = getAccessibleField(obj, fieldName);
if (field == null) {
return false;
}
return true;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/StringHelper.java
================================================
package com.github.wxiaoqi.security.common.util;
/**
* Created by ace on 2017/9/10.
*/
public class StringHelper {
public static String getObjectValue(Object obj){
return obj==null?"":obj.toString();
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/TreeUtil.java
================================================
package com.github.wxiaoqi.security.common.util;
import com.github.wxiaoqi.security.common.vo.TreeNode;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Ace on 2017/6/12.
*/
public class TreeUtil{
/**
* 两层循环实现建树
*
* @param treeNodes 传入的树节点列表
* @return
*/
public static <T extends TreeNode> List<T> bulid(List<T> treeNodes,Object root) {
List<T> trees = new ArrayList<T>();
for (T treeNode : treeNodes) {
if (root.equals(treeNode.getParentId())) {
trees.add(treeNode);
}
for (T it : treeNodes) {
if (it.getParentId() == treeNode.getId()) {
if (treeNode.getChildren() == null) {
treeNode.setChildren(new ArrayList<TreeNode>());
}
treeNode.add(it);
}
}
}
return trees;
}
/**
* 使用递归方法建树
*
* @param treeNodes
* @return
*/
public static <T extends TreeNode> List<T> buildByRecursive(List<T> treeNodes,Object root) {
List<T> trees = new ArrayList<T>();
for (T treeNode : treeNodes) {
if (root.equals(treeNode.getParentId())) {
trees.add(findChildren(treeNode, treeNodes));
}
}
return trees;
}
/**
* 递归查找子节点
*
* @param treeNodes
* @return
*/
public static <T extends TreeNode> T findChildren(T treeNode, List<T> treeNodes) {
for (T it : treeNodes) {
if (treeNode.getId() == it.getParentId()) {
if (treeNode.getChildren() == null) {
treeNode.setChildren(new ArrayList<TreeNode>());
}
treeNode.add(findChildren(it, treeNodes));
}
}
return treeNode;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/UUIDUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import java.util.UUID;
/**
* Created by ace on 2017/9/27.
*/
public class UUIDUtils {
public static String[] chars = new String[] { "a", "b", "c", "d", "e", "f",
"g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5",
"6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I",
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V",
"W", "X", "Y", "Z" };
public static String generateShortUuid() {
StringBuffer shortBuffer = new StringBuffer();
String uuid = UUID.randomUUID().toString().replace("-", "");
for (int i = 0; i < 8; i++) {
String str = uuid.substring(i * 4, i * 4 + 4);
int x = Integer.parseInt(str, 16);
shortBuffer.append(chars[x % 0x3E]);
}
return shortBuffer.toString();
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/WebUtils.java
================================================
package com.github.wxiaoqi.security.common.util;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
* @author Ths Sun
* @create 2020/7/30.
*/
public class WebUtils {
/**
* 获取request
*/
public static HttpServletRequest getRequest()
{
return getRequestAttributes().getRequest();
}
/**
* 获取response
*/
public static HttpServletResponse getResponse()
{
return getRequestAttributes().getResponse();
}
/**
* 获取session
*/
public static HttpSession getSession()
{
return getRequest().getSession();
}
public static ServletRequestAttributes getRequestAttributes()
{
RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
return (ServletRequestAttributes) attributes;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpHelper.java
================================================
package com.github.wxiaoqi.security.common.util.http;
import lombok.extern.slf4j.Slf4j;
import javax.servlet.ServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
/**
* 通用http工具封装
*
* @author Ths Sun
*/
@Slf4j
public class HttpHelper {
public static String getBodyString(ServletRequest request) {
StringBuilder sb = new StringBuilder();
BufferedReader reader = null;
try (InputStream inputStream = request.getInputStream()) {
reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8")));
String line = "";
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} catch (IOException e) {
log.warn("getBodyString出现问题!");
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
log.error(e.getMessage(), e);
}
}
}
return sb.toString();
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpUtils.java
================================================
package com.github.wxiaoqi.security.common.util.http;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.*;
import java.io.*;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.security.cert.X509Certificate;
/**
* 通用http发送方法
*
* @author The Sun
*/
public class HttpUtils
{
private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
/**
* 向指定 URL 发送GET方法的请求
*
* @param url 发送请求的 URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return 所代表远程资源的响应结果
*/
public static String sendGet(String url, String param)
{
return sendGet(url, param, CommonConstants.UTF8);
}
/**
* 向指定 URL 发送GET方法的请求
*
* @param url 发送请求的 URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @param contentType 编码类型
* @return 所代表远程资源的响应结果
*/
public static String sendGet(String url, String param, String contentType)
{
StringBuilder result = new StringBuilder();
BufferedReader in = null;
try
{
String urlNameString = url + "?" + param;
log.info("sendGet - {}", urlNameString);
URL realUrl = new URL(urlNameString);
URLConnection connection = realUrl.openConnection();
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
connection.connect();
in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
String line;
while ((line = in.readLine()) != null)
{
result.append(line);
}
log.info("recv - {}", result);
}
catch (ConnectException e)
{
log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e);
}
catch (SocketTimeoutException e)
{
log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e);
}
catch (IOException e)
{
log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e);
}
catch (Exception e)
{
log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e);
}
finally
{
try
{
if (in != null)
{
in.close();
}
}
catch (Exception ex)
{
log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
}
}
return result.toString();
}
/**
* 向指定 URL 发送POST方法的请求
*
* @param url 发送请求的 URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return 所代表远程资源的响应结果
*/
public static String sendPost(String url, String param)
{
PrintWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
try
{
String urlNameString = url;
log.info("sendPost - {}", urlNameString);
URL realUrl = new URL(urlNameString);
URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("contentType", "utf-8");
conn.setDoOutput(true);
conn.setDoInput(true);
out = new PrintWriter(conn.getOutputStream());
out.print(param);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8"));
String line;
while ((line = in.readLine()) != null)
{
result.append(line);
}
log.info("recv - {}", result);
}
catch (ConnectException e)
{
log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
}
catch (SocketTimeoutException e)
{
log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
}
catch (IOException e)
{
log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
}
catch (Exception e)
{
log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
}
finally
{
try
{
if (out != null)
{
out.close();
}
if (in != null)
{
in.close();
}
}
catch (IOException ex)
{
log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
}
}
return result.toString();
}
public static String sendSSLPost(String url, String param)
{
StringBuilder result = new StringBuilder();
String urlNameString = url + "?" + param;
try
{
log.info("sendSSLPost - {}", urlNameString);
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom());
URL console = new URL(urlNameString);
HttpsURLConnection conn = (HttpsURLConnection) console.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("contentType", "utf-8");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setSSLSocketFactory(sc.getSocketFactory());
conn.setHostnameVerifier(new TrustAnyHostnameVerifier());
conn.connect();
InputStream is = conn.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String ret = "";
while ((ret = br.readLine()) != null)
{
if (ret != null && !ret.trim().equals(""))
{
result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8"));
}
}
log.info("recv - {}", result);
conn.disconnect();
br.close();
}
catch (ConnectException e)
{
log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e);
}
catch (SocketTimeoutException e)
{
log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e);
}
catch (IOException e)
{
log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e);
}
catch (Exception e)
{
log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e);
}
return result.toString();
}
private static class TrustAnyTrustManager implements X509TrustManager
{
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType)
{
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType)
{
}
@Override
public X509Certificate[] getAcceptedIssuers()
{
return new X509Certificate[] {};
}
}
private static class TrustAnyHostnameVerifier implements HostnameVerifier
{
@Override
public boolean verify(String hostname, SSLSession session)
{
return true;
}
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/IJWTInfo.java
================================================
package com.github.wxiaoqi.security.common.util.jwt;
/**
* Created by ace on 2017/9/10.
*/
public interface IJWTInfo {
/**
* 获取用户名
* @return
*/
String getUniqueName();
/**
* 获取用户ID
* @return
*/
String getId();
/**
* 获取名称
* @return
*/
String getName();
/**
* tokenId
* @return
*/
String getTokenId();
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTHelper.java
================================================
package com.github.wxiaoqi.security.common.util.jwt;
import com.github.wxiaoqi.security.common.constant.CommonConstants;
import com.github.wxiaoqi.security.common.util.StringHelper;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jws;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.joda.time.DateTime;
/**
* Created by ace on 2017/9/10.
*/
public class JWTHelper {
private static RsaKeyHelper rsaKeyHelper = new RsaKeyHelper();
/**
* 密钥加密token
*
* @param jwtInfo
* @param priKeyPath
* @param expire
* @return
* @throws Exception
*/
public static String generateToken(IJWTInfo jwtInfo, String priKeyPath, int expire) throws Exception {
String compactJws = Jwts.builder()
.setSubject(jwtInfo.getUniqueName())
.claim(CommonConstants.JWT_KEY_USER_ID, jwtInfo.getId())
.claim(CommonConstants.JWT_KEY_NAME, jwtInfo.getName())
.setExpiration(DateTime.now().plusSeconds(expire).toDate())
.signWith(SignatureAlgorithm.RS256, rsaKeyHelper.getPrivateKey(priKeyPath))
.compact();
return compactJws;
}
/**
* 密钥加密token
*
* @param jwtInfo
* @param priKey
* @param expire
* @return
* @throws Exception
*/
public static String generateToken(IJWTInfo jwtInfo, byte priKey[], int expire) throws Exception {
String compactJws = Jwts.builder()
.setSubject(jwtInfo.getUniqueName())
.claim(CommonConstants.JWT_KEY_USER_ID, jwtInfo.getId())
.claim(CommonConstants.JWT_KEY_NAME, jwtInfo.getName())
.claim(CommonConstants.JWT_ID, jwtInfo.getTokenId())
.setExpiration(DateTime.now().plusSeconds(expire).toDate())
.signWith(SignatureAlgorithm.RS256, rsaKeyHelper.getPrivateKey(priKey))
.compact();
return compactJws;
}
/**
* 公钥解析token
*
* @param token
* @return
* @throws Exception
*/
public static Jws<Claims> parserToken(String token, String pubKeyPath) throws Exception {
Jws<Claims> claimsJws = Jwts.parser().setSigningKey(rsaKeyHelper.getPublicKey(pubKeyPath)).parseClaimsJws(token);
return claimsJws;
}
/**
* 公钥解析token
*
* @param token
* @return
* @throws Exception
*/
public static Jws<Claims> parserToken(String token, byte[] pubKey) throws Exception {
Jws<Claims> claimsJws = Jwts.parser().setSigningKey(rsaKeyHelper.getPublicKey(pubKey)).parseClaimsJws(token);
return claimsJws;
}
/**
* 获取token中的用户信息
*
* @param token
* @param pubKeyPath
* @return
* @throws Exception
*/
public static IJWTInfo getInfoFromToken(String token, String pubKeyPath) throws Exception {
Jws<Claims> claimsJws = parserToken(token, pubKeyPath);
Claims body = claimsJws.getBody();
return new JWTInfo(body.getSubject(), StringHelper.getObjectValue(body.get(CommonConstants.JWT_KEY_USER_ID)), StringHelper.getObjectValue(body.get(CommonConstants.JWT_KEY_NAME)));
}
/**
* 获取token中的用户信息
*
* @param token
* @param pubKey
* @return
* @throws Exception
*/
public static IJWTInfo getInfoFromToken(String token, byte[] pubKey) throws Exception {
if(token.startsWith("Bearer")){
token = token.replace("Bearer ","");
}
Jws<Claims> claimsJws = parserToken(token, pubKey);
Claims body = claimsJws.getBody();
return new JWTInfo(body.getSubject(), StringHelper.getObjectValue(body.get(CommonConstants.JWT_KEY_USER_ID)), StringHelper.getObjectValue(body.get(CommonConstants.JWT_KEY_NAME)),StringHelper.getObjectValue(body.get(CommonConstants.JWT_ID)));
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTInfo.java
================================================
package com.github.wxiaoqi.security.common.util.jwt;
import com.github.wxiaoqi.security.common.util.UUIDUtils;
import java.io.Serializable;
/**
* Created by ace on 2017/9/10.
*/
public class JWTInfo implements Serializable,IJWTInfo {
private String username;
private String userId;
private String name;
private String tokenId;
public JWTInfo(String username, String userId, String name) {
this.username = username;
this.userId = userId;
this.name = name;
this.tokenId = UUIDUtils.generateShortUuid();
}
public JWTInfo(String username, String userId, String name,String tokenId) {
this.username = username;
this.userId = userId;
this.name = name;
this.tokenId = tokenId;
}
@Override
public String getUniqueName() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Override
public String getId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@Override
public String getName() {
return name;
}
@Override
public String getTokenId() {
return tokenId;
}
public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
JWTInfo jwtInfo = (JWTInfo) o;
if (username != null ? !username.equals(jwtInfo.username) : jwtInfo.username != null) {
return false;
}
return userId != null ? userId.equals(jwtInfo.userId) : jwtInfo.userId == null;
}
@Override
public int hashCode() {
int result = username != null ? username.hashCode() : 0;
result = 31 * result + (userId != null ? userId.hashCode() : 0);
return result;
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/RsaKeyHelper.java
================================================
package com.github.wxiaoqi.security.common.util.jwt;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.DataInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.*;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.HashMap;
import java.util.Map;
/**
* Created by ace on 2017/9/10.
*/
public class RsaKeyHelper {
/**
* 获取公钥
*
* @param filename
* @return
* @throws Exception
*/
public PublicKey getPublicKey(String filename) throws Exception {
InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(filename);
DataInputStream dis = new DataInputStream(resourceAsStream);
byte[] keyBytes = new byte[resourceAsStream.available()];
dis.readFully(keyBytes);
dis.close();
X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes);
KeyFactory kf = KeyFactory.getInstance("RSA");
return kf.generatePublic(spec);
}
/**
* 获取密钥
*
* @param filename
* @return
* @throws Exception
*/
public PrivateKey getPrivateKey(String filename) throws Exception {
InputStream resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(filename);
DataInputStream dis = new DataInputStream(resourceAsStream);
byte[] keyBytes = new byte[resourceAsStream.available()];
dis.readFully(keyBytes);
dis.close();
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory kf = KeyFactory.getInstance("RSA");
return kf.generatePrivate(spec);
}
/**
* 获取公钥
*
* @param publicKey
* @return
* @throws Exception
*/
public PublicKey getPublicKey(byte[] publicKey) throws Exception {
X509EncodedKeySpec spec = new X509EncodedKeySpec(publicKey);
KeyFactory kf = KeyFactory.getInstance("RSA");
return kf.generatePublic(spec);
}
/**
* 获取密钥
*
* @param privateKey
* @return
* @throws Exception
*/
public PrivateKey getPrivateKey(byte[] privateKey) throws Exception {
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(privateKey);
KeyFactory kf = KeyFactory.getInstance("RSA");
return kf.generatePrivate(spec);
}
/**
* 生存rsa公钥和密钥
*
* @param publicKeyFilename
* @param privateKeyFilename
* @param password
* @throws IOException
* @throws NoSuchAlgorithmException
*/
public void generateKey(String publicKeyFilename, String privateKeyFilename, String password) throws IOException, NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
SecureRandom secureRandom = new SecureRandom(password.getBytes());
keyPairGenerator.initialize(1024, secureRandom);
KeyPair keyPair = keyPairGenerator.genKeyPair();
byte[] publicKeyBytes = keyPair.getPublic().getEncoded();
FileOutputStream fos = new FileOutputStream(publicKeyFilename);
fos.write(publicKeyBytes);
fos.close();
byte[] privateKeyBytes = keyPair.getPrivate().getEncoded();
fos = new FileOutputStream(privateKeyFilename);
fos.write(privateKeyBytes);
fos.close();
}
/**
* 生存rsa公钥
*
* @param password
* @throws IOException
* @throws NoSuchAlgorithmException
*/
public static byte[] generatePublicKey(String password) throws IOException, NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
SecureRandom secureRandom = new SecureRandom(password.getBytes());
keyPairGenerator.initialize(1024, secureRandom);
KeyPair keyPair = keyPairGenerator.genKeyPair();
return keyPair.getPublic().getEncoded();
}
/**
* 生存rsa公钥
*
* @param password
* @throws IOException
* @throws NoSuchAlgorithmException
*/
public static byte[] generatePrivateKey(String password) throws IOException, NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
SecureRandom secureRandom = new SecureRandom(password.getBytes());
keyPairGenerator.initialize(1024, secureRandom);
KeyPair keyPair = keyPairGenerator.genKeyPair();
return keyPair.getPrivate().getEncoded();
}
public static Map<String, byte[]> generateKey(String password) throws IOException, NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
SecureRandom secureRandom = new SecureRandom(password.getBytes());
keyPairGenerator.initialize(1024, secureRandom);
KeyPair keyPair = keyPairGenerator.genKeyPair();
byte[] publicKeyBytes = keyPair.getPublic().getEncoded();
byte[] privateKeyBytes = keyPair.getPrivate().getEncoded();
Map<String, byte[]> map = new HashMap<String, byte[]>();
map.put("pub", publicKeyBytes);
map.put("pri", privateKeyBytes);
return map;
}
public static String toHexString(byte[] b) {
return (new BASE64Encoder()).encodeBuffer(b);
}
public static final byte[] toBytes(String s) throws IOException {
return (new BASE64Decoder()).decodeBuffer(s);
}
public static void main(String[] args) throws NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
SecureRandom secureRandom = new SecureRandom("123".getBytes());
keyPairGenerator.initialize(1024, secureRandom);
KeyPair keyPair = keyPairGenerator.genKeyPair();
System.out.println(keyPair.getPublic().getEncoded());
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/TreeNode.java
================================================
package com.github.wxiaoqi.security.common.vo;
import java.util.List;
/**
* Created by Ace on 2017/6/12.
*/
public class TreeNode {
protected int id;
protected int parentId;
public List<TreeNode> getChildren() {
return children;
}
public void setChildren(List<TreeNode> children) {
this.children = children;
}
List<TreeNode> children = null;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getParentId() {
return parentId;
}
public void setParentId(int parentId) {
this.parentId = parentId;
}
public void add(TreeNode node){
children.add(node);
}
}
================================================
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/web/ParameterRequestWrapper.java
================================================
package com.github.wxiaoqi.security.common.web;
import org.apache.commons.io.IOUtils;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.*;
import java.util.Enumeration;
import java.util.Map;
import java.util.Vector;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-07-01 17:04
*/
public class ParameterRequestWrapper extends HttpServletRequestWrapper {
private Map params;
public ParameterRequestWrapper(HttpServletRequest request, Map newParams) {
super(request);
this.params = newParams;
}
@Override
public Map getParameterMap() {
return params;
}
@Override
public Enumeration getParameterNames() {
Vector l = new Vector(params.keySet());
return l.elements();
}
@Override
public String[] getParameterValues(String name) {
Object v = params.get(name);
if (v == null) {
return null;
} else if (v instanceof String[]) {
return (String[]) v;
} else if (v instanceof String) {
return new String[] { (String) v };
} else {
return new String[] { v.toString() };
}
}
@Override
public String getParameter(String name) {
Object v = params.get(name);
if (v == null) {
return null;
} else if (v instanceof String[]) {
String[] strArr = (String[]) v;
if (strArr.length > 0) {
return strArr[0];
} else {
return null;
}
} else if (v instanceof String) {
return (String) v;
} else {
return v.toString();
}
}
}
================================================
FILE: ace-dev-base/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>ace-security</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-dev-base</artifactId>
<packaging>pom</packaging>
<modules>
<module>ace-common</module>
<module>ace-auth-sdk</module>
</modules>
</project>
================================================
FILE: ace-gate/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>ace-security</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-gate</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8
</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<kotlin.version>1.4.20</kotlin.version>
</properties>
<dependencies>
<!--<dependency>-->
<!--<groupId>org.springframework.cloud</groupId>-->
<!--<artifactId>spring-cloud-starter-consul-all</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
<version>3.0.7</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.isomorphism</groupId>
<artifactId>token-bucket</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- LB 扩展 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.amqp</groupId>-->
<!--<artifactId>spring-rabbit</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>com.github.wxiaoqi</groupId>
<artifactId>ace-api</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.wxiaoqi</groupId>
<artifactId>ace-auth-sdk</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.wxiaoqi</groupId>
<artifactId>ace-common</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework</groupId>-->
<!--<artifactId>spring-web</artifactId>-->
<!--<version>5.0.4.RELEASE</version>-->
<!--</dependency>-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.cloud</groupId>-->
<!--<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${boot.admin.client}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
</dependency>
</dependencies>
<build>
<finalName>ace-gate</finalName>
<plugins>
<!--<plugin>-->
<!--<groupId>com.spotify</groupId>-->
<!--<artifactId>docker-maven-plugin</artifactId>-->
<!--<version>${docker.plugin.version}</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<skipDocker>${docker.image.skip}</skipDocker>-->
<!--<imageName>-->
<!--${docker.image.prefix}/${project.build.finalName}-->
<!--</imageName>-->
<!--<dockerDirectory>${project.basedir}/src/main/docker-->
<!--</dockerDirectory>-->
<!--<resources>-->
<!--<resource>-->
<!--<targetPath>/</targetPath>-->
<!--<directory>${project.build.directory}</directory>-->
<!--<include>${project.build.finalName}.jar</include>-->
<!--</resource>-->
<!--</resources>-->
<!--</configuration>-->
<!--</plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: ace-gate/src/main/docker/Dockerfile
================================================
FROM livingobjects/jre8
VOLUME /tmp
# 将jar包添加到容器中并更名为app.jar
ADD ace-gate.jar app.jar
# 运行jar包
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/GatewayServerBootstrap.java
================================================
package com.github.wxiaoqi.security.gate;
import com.github.wxiaoqi.security.auth.client.EnableAceAuthClient;
import com.github.wxiaoqi.security.gate.utils.DBLog;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author ace
* @create 2018/3/12.
*/
@SpringCloudApplication
@EnableAceAuthClient
//TODO 切换为webclient
@EnableFeignClients({"com.github.wxiaoqi.security.auth.client.feign"})
public class GatewayServerBootstrap {
public static void main(String[] args) {
DBLog.getInstance().start();
SpringApplication.run(GatewayServerBootstrap.class, args);
}
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/config/GatewayConfig.java
================================================
package com.github.wxiaoqi.security.gate.config;
import feign.codec.Decoder;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.support.ResponseEntityDecoder;
import org.springframework.cloud.openfeign.support.SpringDecoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.function.client.WebClient;
import java.util.ArrayList;
import java.util.List;
/**
* @author ace
* @create 2019/1/27.
*/
@Configuration
public class GatewayConfig {
@LoadBalanced
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
@Bean
public Decoder feignDecoder() {
return new ResponseEntityDecoder(new SpringDecoder(feignHttpMessageConverter()));
}
public ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(new GateWayMappingJackson2HttpMessageConverter());
return new ObjectFactory<HttpMessageConverters>() {
@Override
public HttpMessageConverters getObject() throws BeansException {
return httpMessageConverters;
}
};
}
public class GateWayMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
GateWayMappingJackson2HttpMessageConverter(){
List<MediaType> mediaTypes = new ArrayList<>();
mediaTypes.add(MediaType.valueOf(MediaType.TEXT_HTML_VALUE + ";charset=UTF-8"));
setSupportedMediaTypes(mediaTypes);
}
}
@Bean
@LoadBalanced
public WebClient.Builder loadBalancedWebClientBuilder() {
return WebClient.builder();
}
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
================================================
package com.github.wxiaoqi.security.gate.filter;
import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.api.vo.authority.CheckPermissionInfo;
import com.github.wxiaoqi.security.api.vo.authority.PermissionInfo;
import com.github.wxiaoqi.security.api.vo.log.LogInfo;
import com.github.wxiaoqi.security.auth.client.config.UserAuthConfig;
import com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil;
import com.github.wxiaoqi.security.common.constant.RedisKeyConstant;
import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import com.github.wxiaoqi.security.common.exception.auth.UserTokenException;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
import com.github.wxiaoqi.security.common.msg.auth.TokenForbiddenResponse;
import com.github.wxiaoqi.security.common.util.jwt.IJWTInfo;
import com.github.wxiaoqi.security.gate.handler.RequestBodyRoutePredicateFactory;
import com.github.wxiaoqi.security.gate.service.LogService;
import com.github.wxiaoqi.security.gate.utils.DBLog;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.web.reactive.function.client.WebClient;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
/**
* @author ace
* @create 2018/3/12.
*/
@Configuration
@Slf4j
public class AccessGatewayFilter implements GlobalFilter {
@Autowired
private LogService logService;
@Value("${gate.ignore.startWith}")
private String startWith;
private static final String GATE_WAY_PREFIX = "/api";
@Autowired
private UserAuthUtil userAuthUtil;
@Autowired
private UserAuthConfig userAuthConfig;
@Autowired
private WebClient.Builder webClientBuilder;
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Override
public Mono<Void> filter(ServerWebExchange serverWebExchange, GatewayFilterChain gatewayFilterChain) {
log.info("check token and user permission....");
LinkedHashSet requiredAttribute = serverWebExchange.getRequiredAttribute(ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR);
ServerHttpRequest request = serverWebExchange.getRequest();
// 获取当前网关访问的URI
String requestUri = request.getPath().pathWithinApplication().value();
if (requiredAttribute != null) {
Iterator<URI> iterator = requiredAttribute.iterator();
while (iterator.hasNext()) {
URI next = iterator.next();
if (next.getPath().startsWith(GATE_WAY_PREFIX)) {
requestUri = next.getPath().substring(GATE_WAY_PREFIX.length());
}
}
}
final String method = request.getMethod().toString();
BaseContextHandler.setToken(null);
ServerHttpRequest.Builder mutate = request.mutate();
// 网关不进行拦截的URI配置,常见如验证码、Login接口
if (isStartWith(requestUri)) {
ServerHttpRequest build = mutate.build();
return gatewayFilterChain.filter(serverWebExchange.mutate().request(build).build());
}
IJWTInfo user = null;
try {
// 判断用户token,获取用户信息
user = getJWTUser(request, mutate);
} catch (Exception e) {
log.error("用户Token过期异常", e);
return getVoidMono(serverWebExchange, new TokenForbiddenResponse("User Token Error or Expired!"), HttpStatus.UNAUTHORIZED);
}
Mono<CheckPermissionInfo> checkPermissionInfoMono = webClientBuilder.build().
get().uri("http://ace-admin/api/user/{username}/check_permission?requestMethod=" + method + "&requestUri=" + requestUri, user.getUniqueName()).header(userAuthConfig.getTokenHeader(), BaseContextHandler.getToken()).retrieve().bodyToMono(CheckPermissionInfo.class);
IJWTInfo finalUser = user;
return checkPermissionInfoMono.flatMap(checkPermissionInfo -> {
// 当前用户具有访问权限
if (checkPermissionInfo.getIsAuth()) {
if (checkPermissionInfo.getPermissionInfo() != null) {
// 若资源存在则请求设置访问日志
setCurrentUserInfoAndLog(serverWebExchange, finalUser, checkPermissionInfo.getPermissionInfo());
}
ServerHttpRequest build = mutate.build();
return gatewayFilterChain.filter(serverWebExchange.mutate().request(build).build());
} else {
// 当前用户不具有访问权限
return getVoidMono(serverWebExchange, new TokenForbiddenResponse("Forbidden!Does not has Permission!"), HttpStatus.FORBIDDEN);
}
});
}
/**
* 网关抛异常
*
* @param body
*/
@NotNull
private Mono<Void> getVoidMono(ServerWebExchange serverWebExchange, BaseResponse body, HttpStatus status) {
serverWebExchange.getResponse().setStatusCode(status);
byte[] bytes = JSONObject.toJSONString(body).getBytes(StandardCharsets.UTF_8);
DataBuffer buffer = serverWebExchange.getResponse().bufferFactory().wrap(bytes);
return serverWebExchange.getResponse().writeWith(Flux.just(buffer));
}
private void setCurrentUserInfoAndLog(ServerWebExchange serverWebExchange, IJWTInfo user, PermissionInfo pm) {
String host = serverWebExchange.getRequest().getRemoteAddress().toString();
LogInfo logInfo = new LogInfo(pm.getMenu(), pm.getName(), pm.getUri(), new Date(), user.getId(), user.getName(), host, String.valueOf(serverWebExchange.getAttributes().get(RequestBodyRoutePredicateFactory.REQUEST_BODY_ATTR)));
DBLog.getInstance().setLogService(logService).offerQueue(logInfo);
}
/**
* 返回session中的用户信息
*
* @param request
* @param ctx
* @return
*/
private IJWTInfo getJWTUser(ServerHttpRequest request, ServerHttpRequest.Builder ctx) throws Exception {
List<String> strings = request.getHeaders().get(userAuthConfig.getTokenHeader());
String authToken = null;
if (strings != null) {
authToken = strings.get(0);
}
if (StringUtils.isBlank(authToken)) {
strings = request.getQueryParams().get("token");
if (strings != null) {
authToken = strings.get(0);
}
}
IJWTInfo infoFromToken = userAuthUtil.getInfoFromToken(authToken);
String s = stringRedisTemplate.opsForValue().get(RedisKeyConstant.REDIS_KEY_TOKEN + ":" + infoFromToken.getTokenId());
if (StringUtils.isBlank(s)) {
throw new UserTokenException("User token expired!");
}
ctx.header(userAuthConfig.getTokenHeader(), authToken);
BaseContextHandler.setToken(authToken);
return infoFromToken;
}
/**
* URI是否以什么打头
*
* @param requestUri
* @return
*/
private boolean isStartWith(String requestUri) {
boolean flag = false;
for (String s : startWith.split(",")) {
if (requestUri.startsWith(s)) {
return true;
}
}
return flag;
}
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/handler/RequestBodyRoutePredicateFactory.java
================================================
/*
* Copyright 2013-2018 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 com.github.wxiaoqi.security.gate.handler;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.gateway.handler.AsyncPredicate;
import org.springframework.cloud.gateway.handler.predicate.AbstractRoutePredicateFactory;
import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
import org.springframework.core.annotation.Order;
import org.springframework.http.codec.HttpMessageReader;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.HandlerStrategies;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
/**
* This predicate is BETA and may be subject to change in a future release.
*/
@Slf4j
@Component
@Order(1)
public class RequestBodyRoutePredicateFactory
extends AbstractRoutePredicateFactory<RequestBodyRoutePredicateFactory.Config> {
protected static final Log LOGGER = LogFactory.getLog(RequestBodyRoutePredicateFactory.class);
private final List<HttpMessageReader<?>> messageReaders;
public RequestBodyRoutePredicateFactory() {
super(RequestBodyRoutePredicateFactory.Config.class);
this.messageReaders = HandlerStrategies.withDefaults().messageReaders();
}
public RequestBodyRoutePredicateFactory(List<HttpMessageReader<?>> messageReaders) {
super(RequestBodyRoutePredicateFactory.Config.class);
this.messageReaders = messageReaders;
}
public static final String REQUEST_BODY_ATTR = "requestBodyAttr";
@Override
public AsyncPredicate<ServerWebExchange> applyAsync(Config config) {
return exchange -> {
if (!"POST".equals(exchange.getRequest().getMethodValue())&&!"PUT".equals(exchange.getRequest().getMethodValue())) {
return Mono.just(true);
}
Object cachedBody = exchange.getAttribute(REQUEST_BODY_ATTR);
if (cachedBody != null) {
try {
return Mono.just(true);
} catch (ClassCastException e) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Predicate test failed because class in predicate does not match the cached body object",
e);
}
}
return Mono.just(true);
} else {
return ServerWebExchangeUtils.cacheRequestBodyAndRequest(exchange, (serverHttpRequest) -> ServerRequest.create(exchange.mutate().request(serverHttpRequest).build(), this.messageReaders).bodyToMono(String.class).defaultIfEmpty("").doOnNext((objectValue) -> {
if(StringUtils.isBlank(objectValue)){
exchange.getAttributes().put(REQUEST_BODY_ATTR, JSON.toJSONString(exchange.getRequest().getQueryParams()));
}else {
exchange.getAttributes().put(REQUEST_BODY_ATTR, objectValue);
}
}).map((objectValue) -> true));
}
};
}
@Override
public Predicate<ServerWebExchange> apply(Config config) {
throw new UnsupportedOperationException(
"ReadBodyPredicateFactory is only async.");
}
public static class Config {
private List<String> sources = new ArrayList<>();
public List<String> getSources() {
return sources;
}
public RequestBodyRoutePredicateFactory.Config setSources(List<String> sources) {
this.sources = sources;
return this;
}
public RequestBodyRoutePredicateFactory.Config setSources(String... sources) {
this.sources = Arrays.asList(sources);
return this;
}
}
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogService.java
================================================
package com.github.wxiaoqi.security.gate.service;
import com.github.wxiaoqi.security.api.vo.log.LogInfo;
/**
* @author Ths Sun
* @create 2020/7/23.
*/
public interface LogService {
void saveLog(LogInfo info);
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogServiceImpl.java
================================================
package com.github.wxiaoqi.security.gate.service;
import com.github.wxiaoqi.security.api.vo.log.LogInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.BodyInserters;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
/**
* @author Ths Sun
* @create 2020/7/23.
*/
@Component
@Slf4j
public class LogServiceImpl implements LogService {
@Autowired
private WebClient.Builder webClientBuilder;
@Override
public void saveLog(LogInfo info) {
Mono<Void> mono = webClientBuilder.build().
post().uri("http://ace-admin/api/log/save").body(BodyInserters.fromValue(info)).retrieve().bodyToMono(Void.class);
// 输出结果
log.debug(String.valueOf(mono.block()));
}
}
================================================
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/utils/DBLog.java
================================================
package com.github.wxiaoqi.security.gate.utils;
import com.github.wxiaoqi.security.api.vo.log.LogInfo;
import com.github.wxiaoqi.security.gate.service.LogService;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-07-01 15:28
*/
@Slf4j
public class DBLog extends Thread {
private static DBLog dblog = null;
private static BlockingQueue<LogInfo> logInfoQueue = new LinkedBlockingQueue<LogInfo>(1024);
public LogService getLogService() {
return logService;
}
public DBLog setLogService(LogService logService) {
if(this.logService==null) {
this.logService = logService;
}
return this;
}
private LogService logService;
public static synchronized DBLog getInstance() {
if (dblog == null) {
dblog = new DBLog();
}
return dblog;
}
private DBLog() {
super("CLogOracleWriterThread");
}
public void offerQueue(LogInfo logInfo) {
try {
logInfoQueue.offer(logInfo);
} catch (Exception e) {
log.error("日志写入失败", e);
}
}
@Override
public void run() {
List<LogInfo> bufferedLogList = new ArrayList<LogInfo>(); // 缓冲队列
while (true) {
try {
bufferedLogList.add(logInfoQueue.take());
logInfoQueue.drainTo(bufferedLogList);
if (bufferedLogList != null && bufferedLogList.size() > 0) {
// 写入日志
for(LogInfo log:bufferedLogList){
logService.saveLog(log);
}
}
} catch (Exception e) {
e.printStackTrace();
// 防止缓冲队列填充数据出现异常时不断刷屏
try {
Thread.sleep(1000);
} catch (Exception eee) {
}
} finally {
if (bufferedLogList != null && bufferedLogList.size() > 0) {
try {
bufferedLogList.clear();
} catch (Exception e) {
}
}
}
}
}
}
================================================
FILE: ace-gate/src/main/resources/application.yml
================================================
server:
port: 8765
#请求和响应GZIP压缩支持
feign:
httpclient:
enabled: false
okhttp:
enabled: true
compression:
request:
enabled: true
mime-types: text/xml,application/xml,application/json
min-request-size: 2048
response:
enabled: true
spring:
application:
name: ace-gate
redis:
database: 2
host: 127.0.0.1
jedis:
pool:
max-active: 20
rabbitmq:
host: ${RABBIT_MQ_HOST:localhost}
port: ${RABBIT_MQ_PORT:5672}
username: guest
password: guest
sleuth:
enabled: false
http:
legacy:
enabled: true
cloud:
nacos:
config:
server-addr: 127.0.0.1:8848
file-extension: yaml
discovery:
server-addr: 127.0.0.1:8848
sleuth:
enabled: false
sample:
zipkin:
# When enabled=false, traces log to the console. Comment to send to zipkin
enabled: false
gateway:
default-filters:
- DedupeResponseHeader=Access-Control-Allow-Origin
globalcors:
add-to-simple-url-handler-mapping: true
corsConfigurations:
'[/**]':
allowed-origins: "http://localhost:9572"
allowed-methods: "*"
allowed-headers: "*"
allow-credentials: true
discovery:
locator:
lowerCaseServiceId: true
enabled: true
routes:
# =====================================
- id: ace-auth
uri: lb://ace-admin
order: 8000
predicates:
- RequestBody=true
- Path=/api/auth/**
filters:
- StripPrefix=2
- id: ace-admin
uri: lb://ace-admin
order: 8001
predicates:
- RequestBody=true
- Path=/api/admin/**
filters:
- StripPrefix=2
- id: ace-generator
uri: lb://ace-generator
order: 8001
predicates:
- Path=/api/code/**
filters:
- StripPrefix=1
- id: ace-sample
uri: lb://ace-sample
order: 8001
predicates:
- RequestBody=true
- Path=/api/sample/**
filters:
- StripPrefix=2
sentinel:
transport:
dashboard: localhost:8080
logging:
level:
com.github.wxiaoqi.security.gate.v2: info
management:
endpoints:
web:
exposure:
include: '*'
exclude: heapdump,dump,threaddump,configprops,env
security:
enabled: false
gate:
ignore:
startWith: /auth/jwt,/auth/captcha
auth:
serviceId: ace-admin
user:
token-header: Authorization
client:
id: ace-gate #不填则默认读取spring.application.name
secret: 123456
ribbon:
eureka:
enabled: true
ReadTimeout: 60000
ConnectTimeout: 60000
MaxAutoRetries: 0
MaxAutoRetriesNextServer: 1
OkToRetryOnAllOperations: false
hystrix:
threadpool:
default:
coreSize: 1000 ##并发执行的最大线程数,默认10
maxQueueSize: 1000 ##BlockingQueue的最大队列数
queueSizeRejectionThreshold: 500 ##即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
================================================
FILE: ace-infrastructure/ace-monitor/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>ace-infrastructure</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ace-monitor</artifactId>
<properties>
<boot.admin.version>2.4.0</boot.admin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- LB 扩展 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>${boot.admin.version}</version>
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-webflux</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
</dependency>
</dependencies>
<build>
<finalName>ace-monitor</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--<plugin>-->
<!--<groupId>com.spotify</groupId>-->
<!--<artifactId>docker-maven-plugin</artifactId>-->
<!--<version>${docker.plugin.version}</version>-->
<!--<executions>-->
<!--<execution>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<configuration>-->
<!--<imageName>${docker.image.prefix}/${project.artifactId}</imageName>-->
<!--<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>-->
<!--<resources>-->
<!--<resource>-->
<!--<targetPath>/</targetPath>-->
<!--<directory>${project.build.directory}</directory>-->
<!--<include>${project.build.finalName}.jar</include>-->
<!--</resource>-->
<!--</resources>-->
<!--</configuration>-->
<!--</plugin>-->
</plugins>
</build>
</project>
================================================
FILE: ace-infrastructure/ace-monitor/src/main/docker/Dockerfile
================================================
FROM livingobjects/jre8
VOLUME /tmp
ADD ace-monitor.jar app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
================================================
FILE: ace-infrastructure/ace-monitor/src/main/java/com/github/wxiaoqi/security/monitor/MonitorBootstrap.java
================================================
package com.github.wxiaoqi.security.monitor;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* ${DESCRIPTION}
*
* @author the sun
* @create 2017-05-25 12:44
*/
@SpringBootApplication
@EnableAdminServer
@EnableDiscoveryClient
public class MonitorBootstrap {
public static void main(String[] args) {
SpringApplication.run(MonitorBootstrap.class, args);
}
}
================================================
FILE: ace-infrastructure/ace-monitor/src/main/resources/application.yml
================================================
spring:
application:
name: ace-monitor
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
server:
port: 8764 #启动端口
#
#eureka:
# instance:
# preferIpAddress: true
# statusPageUrlPath: /actuator/info
# healthCheckUrlPath: /actuator/health
# client:
# registerWithEureka: true
# fetchRegistry: true
# serviceUrl:
# defaultZone: http://localhost:8761/eureka/
================================================
FILE: ace-infrastructure/ace-nacos/db/init_nacos.sql
================================================
CREATE DATABASE ag_nacos DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Use ag_nacos;/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50718
Source Host : localhost
Source Database : ag_nacos
Target Server Type : MySQL
Target Server Version : 50718
File Encoding : utf-8
Date: 02/05/2019 21:40:46 PM
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `config_info`
-- ----------------------------
DROP TABLE IF EXISTS `config_info`;
CREATE TABLE `config_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
`group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
`src_user` text COLLATE utf8_bin COMMENT 'source user',
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
`c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL,
`c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`effect` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`type` varchar(64) COLLATE utf8_bin DEFAULT NULL,
`c_schema` text COLLATE utf8_bin,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';
-- ----------------------------
-- Records of `config_info`
-- ----------------------------
BEGIN;
INSERT INTO `config_info` VALUES ('1', 'ace-auth-dev.yaml', 'DEFAULT_GROUP', 0x737072696e673a0a2020206170706c69636174696f6e3a0a202020202020206e616d653a206163652d617574680a2020206a61636b736f6e3a0a20202020202020646174652d666f726d61743a20797979792d4d4d2d64642048483a6d6d3a73730a2020202020202074696d652d7a6f6e653a20474d542b380a2020202020202064656661756c742d70726f70657274792d696e636c7573696f6e3a206e6f6e5f6e756c6c0a20202072656469733a0a2020202020202064617461626173653a20320a20202020202020686f73743a20247b52454449535f484f53543a6c6f63616c686f73747d0a20202020202020706f72743a20247b52454449535f504f52543a363337397d0a20202020202020706f6f6c3a0a202020202020206d61782d6163746976653a2032300a20202064617461736f757263653a0a20202020206e616d653a20746573740a202020202075726c3a206a6462633a6d7973716c3a2f2f247b4d5953514c5f484f53543a6c6f63616c686f73747d3a247b4d5953514c5f504f52543a333330367d2f61675f617574685f76313f757365556e69636f64653d7472756526636861726163746572456e636f64696e673d555446380a2020202020757365726e616d653a20726f6f740a202020202070617373776f72643a203132333435360a20202020202320e4bdbfe794a86472756964e695b0e68daee6ba900a2020202020747970653a20636f6d2e616c69626162612e64727569642e706f6f6c2e447275696444617461536f757263650a20202020206472697665722d636c6173732d6e616d653a20636f6d2e6d7973716c2e6a6462632e4472697665720a202020202066696c746572733a20737461740a20202020206d61784163746976653a2032300a2020202020696e697469616c53697a653a20310a20202020206d6178576169743a2036303030300a20202020206d696e49646c653a20310a202020202074696d654265747765656e4576696374696f6e52756e734d696c6c69733a2036303030300a20202020206d696e457669637461626c6549646c6554696d654d696c6c69733a203330303030300a202020202076616c69646174696f6e51756572793a2073656c656374202778270a2020202020746573745768696c6549646c653a20747275650a2020202020746573744f6e426f72726f773a2066616c73650a2020202020746573744f6e52657475726e3a2066616c73650a2020202020706f6f6c507265706172656453746174656d656e74733a20747275650a20202020206d61784f70656e507265706172656453746174656d656e74733a2032300a2020207261626269746d713a0a2020202020686f73743a20247b5241424249545f4d515f484f53543a6c6f63616c686f73747d0a2020202020706f72743a2020247b5241424249545f4d515f504f52543a353637327d0a2020202020757365726e616d653a2067756573740a202020202070617373776f72643a2067756573740a202020736c657574683a0a2020202020656e61626c65643a20747275650a2020202020687474703a0a202020202020206c65676163793a0a202020202020202020656e61626c65643a20747275650a202020636c6f75643a0a20202020206e61636f733a0a20202020202020646973636f766572793a0a20202020202020202020207365727665722d616464723a203132372e302e302e313a383834380a202020202073656e74696e656c3a0a202020202020207472616e73706f72743a0a20202020202020202064617368626f6172643a206c6f63616c686f73743a383038300a6d7962617469733a0a202020626173657061636b6167653a20636f6d2e6769746875622e777869616f71692e73656375726974792e617574682e6d61707065720a202020786d6c4c6f636174696f6e3a20636c617373706174683a6d61707065722f2a2a2f2a2e786d6c0a2020206d61707065722d6c6f636174696f6e733a2022636c617373706174682a3a6d61707065722f2a2e786d6c220a0a7365727665723a0a202020706f72743a20393737372023e590afe58aa8e7abafe58fa30a0a666569676e3a0a2068747470636c69656e743a0a202020656e61626c65643a2066616c73650a206f6b687474703a0a202020656e61626c65643a20747275650a0a726962626f6e3a0a20657572656b613a0a202020656e61626c65643a20747275650a205265616454696d656f75743a2036303030300a20436f6e6e65637454696d656f75743a2036303030300a204d61784175746f526574726965733a20300a204d61784175746f526574726965734e6578745365727665723a20310a204f6b546f52657472794f6e416c6c4f7065726174696f6e733a2066616c73650a0a687973747269783a0a20746872656164706f6f6c3a0a20202064656661756c743a0a2020202020636f726553697a653a2031303030202323e5b9b6e58f91e689a7e8a18ce79a84e69c80e5a4a7e7babfe7a88be695b0efbc8ce9bb98e8aea431300a20202020206d6178517565756553697a653a2031303030202323426c6f636b696e675175657565e79a84e69c80e5a4a7e9989fe58897e695b00a2020202020717565756553697a6552656a656374696f6e5468726573686f6c643a20353030202323e58db3e4bdbf6d6178517565756553697a65e6b2a1e69c89e8bebee588b0efbc8ce8bebee588b0717565756553697a6552656a656374696f6e5468726573686f6c64e8afa5e580bce5908eefbc8ce8afb7e6b182e4b99fe4bc9ae8a2abe68b92e7bb9d0a20636f6d6d616e643a0a20202064656661756c743a0a2020202020657865637574696f6e3a0a2020202020202069736f6c6174696f6e3a0a2020202020202020207468726561643a0a202020202020202020202074696d656f7574496e4d696c6c697365636f6e64733a2031303030300a0a6a77743a0a20746f6b656e2d6865616465723a20417574686f72697a6174696f6e0a206578706972653a2031343430300a207273612d7365637265743a2078783157455431325e25335e28574534350a0a636c69656e743a0a2069643a206163652d617574680a207365637265743a203132333435360a20746f6b656e2d6865616465723a20782d636c69656e742d746f6b656e0a206578706972653a2031343430300a207273612d7365637265743a2078323331385e5e282a57525951575228515726540a0a6c6f6767696e673a0a2020206c6576656c3a0a232020202020202020746b2e6d7962617469733a2044454255470a20202020202020636f6d2e6769746875622e777869616f71692e73656375726974792e617574683a2044454255470a0a6d616e6167656d656e743a0a20656e64706f696e74733a0a2020207765623a0a20202020206578706f737572653a0a20202020202020696e636c7564653a20272a270a2073656375726974793a0a202020656e61626c65643a2066616c73650a, 'e991ab23752535fb5aa0a75b42bb6fa5', '2019-01-27 09:59:33', '2019-01-27 09:59:33', null, '0:0:0:0:0:0:0:1', '', '', null, null, null, 'yaml', null), ('2', 'ace-admin-dev.yaml', 'DEFAULT_GROUP', 0x6c6f6767696e673a0a2020206c6576656c3a0a232020202020202020746b2e6d7962617469733a2044454255470a20202020202020636f6d2e6769746875622e777869616f71692e73656375726974792e61646d696e3a2044454255470a737072696e673a0a2020206170706c69636174696f6e3a0a202020202020206e616d653a206163652d61646d696e0a2020206a61636b736f6e3a0a20202020202020646174652d666f726d61743a20797979792d4d4d2d64642048483a6d6d3a73730a2020202020202074696d652d7a6f6e653a20474d542b380a2020202020202064656661756c742d70726f70657274792d696e636c7573696f6e3a206e6f6e5f6e756c6c0a20202064617461736f757263653a0a202020202020206e616d653a20746573740a2020202020202075726c3a206a6462633a6d7973716c3a2f2f247b4d5953514c5f484f53543a6c6f63616c686f73747d3a247b4d5953514c5f504f52543a333330367d2f61675f61646d696e5f76313f757365556e69636f64653d7472756526636861726163746572456e636f64696e673d555446380a20202020202020757365726e616d653a20726f6f740a2020202020202070617373776f72643a203132333435360a202020202020202320e4bdbfe794a86472756964e695b0e68daee6ba900a20202020202020747970653a20636f6d2e616c69626162612e64727569642e706f6f6c2e447275696444617461536f757263650a202020202020206472697665722d636c6173732d6e616d653a20636f6d2e6d7973716c2e6a6462632e4472697665720a2020202020202066696c746572733a20737461740a202020202020206d61784163746976653a2032300a20202020202020696e697469616c53697a653a20310a202020202020206d6178576169743a2036303030300a202020202020206d696e49646c653a20310a2020202020202074696d654265747765656e4576696374696f6e52756e734d696c6c69733a2036303030300a202020202020206d696e457669637461626c6549646c6554696d654d696c6c69733a203330303030300a2020202020202076616c69646174696f6e51756572793a2073656c656374202778270a20202020202020746573745768696c6549646c653a20747275650a20202020202020746573744f6e426f72726f773a2066616c73650a20202020202020746573744f6e52657475726e3a2066616c73650a20202020202020706f6f6c507265706172656453746174656d656e74733a20747275650a202020202020206d61784f70656e507265706172656453746174656d656e74733a2032300a2020207261626269746d713a0a20202020202020686f73743a20247b5241424249545f4d515f484f53543a6c6f63616c686f73747d0a20202020202020706f72743a2020247b5241424249545f4d515f504f52543a353637327d0a20202020202020757365726e616d653a2067756573740a2020202020202070617373776f72643a2067756573740a202020736c657574683a0a2020202020656e61626c65643a20747275650a2020202020687474703a0a202020202020206c65676163793a0a202020202020202020656e61626c65643a20747275650a202020636c6f75643a0a20202020206e61636f733a0a20202020202020646973636f766572793a0a2020202020202020207365727665722d616464723a203132372e302e302e313a383834380a202020202073656e74696e656c3a0a202020202020207472616e73706f72743a0a20202020202020202064617368626f6172643a206c6f63616c686f73743a383038300a73616d706c653a0a207a69706b696e3a0a20202023205768656e20656e61626c65643d66616c73652c20747261636573206c6f6720746f2074686520636f6e736f6c652e20436f6d6d656e7420746f2073656e6420746f207a69706b696e0a202020656e61626c65643a2066616c73650a0a6d7962617469733a0a202020626173657061636b6167653a20636f6d2e6769746875622e777869616f71692e73656375726974792e61646d696e2e6d61707065720a202020786d6c4c6f636174696f6e3a20636c617373706174683a6d61707065722f2a2a2f2a2e786d6c0a2020206d61707065722d6c6f636174696f6e733a2022636c617373706174682a3a6d61707065722f2a2e786d6c220a0a7365727665723a0a202020706f72743a20383736320a0a2320e5bf85e9a1bbe9858de7bdae0a666569676e3a0a2068747470636c69656e743a0a202020656e61626c65643a2066616c73650a206f6b687474703a0a202020656e61626c65643a20747275650a0a726962626f6e3a0a20657572656b613a0a202020656e61626c65643a20747275650a205265616454696d656f75743a203130303030300a20436f6e6e65637454696d656f75743a203130303030300a204d61784175746f526574726965733a20300a204d61784175746f526574726965734e6578745365727665723a20310a204f6b546f52657472794f6e416c6c4f7065726174696f6e733a2066616c73650a0a687973747269783a0a20746872656164706f6f6c3a0a20202064656661756c743a0a2020202020636f726553697a653a2031303030202323e5b9b6e58f91e689a7e8a18ce79a84e69c80e5a4a7e7babfe7a88be695b0efbc8ce9bb98e8aea431300a20202020206d6178517565756553697a653a2031303030202323426c6f636b696e675175657565e79a84e69c80e5a4a7e9989fe58897e695b00a2020202020717565756553697a6552656a656374696f6e5468726573686f6c643a20353030202323e58db3e4bdbf6d6178517565756553697a65e6b2a1e69c89e8bebee588b0efbc8ce8bebee588b0717565756553697a6552656a656374696f6e5468726573686f6c64e8afa5e580bce5908eefbc8ce8afb7e6b182e4b99fe4bc9ae8a2abe68b92e7bb9d0a20636f6d6d616e643a0a20202064656661756c743a0a2020202020657865637574696f6e3a0a2020202020202069736f6c6174696f6e3a0a2020202020202020207468726561643a0a202020202020202020202074696d656f7574496e4d696c6c697365636f6e64733a203131303030300a0a0a2320e9858de7bdae737761676765720a737761676765723a0a202020656e61626c65643a20747275650a202020626173652d7061636b6167653a20636f6d2e6769746875622e777869616f71692e73656375726974792e61646d696e0a2020207469746c653a206163652d61646d696e0a20202076657273696f6e3a20312e302e302e534e415053484f540a2020206465736372697074696f6e3a20e7aea1e79086e5908ee7abafe69c8de58aa10a202020636f6e746163743a0a202020202020206e616d653a2061646d696e0a0a617574683a0a207365727669636549643a206163652d617574680a20757365723a0a202020746f6b656e2d6865616465723a20417574686f72697a6174696f6e0a20636c69656e743a0a20202069643a206163652d61646d696e0a2020207365637265743a203132333435360a202020746f6b656e2d6865616465723a20782d636c69656e742d746f6b656e0a0a2372656469732d636163686520e79bb8e585b30a72656469733a0a202020706f6f6c3a0a20202020202020206d61784163746976653a203330300a20202020202020206d617849646c653a203130300a20202020202020206d6178576169743a20313030300a202020686f73743a20247b52454449535f484f53543a6c6f63616c686f73747d0a202020706f72743a2020247b52454449535f504f52543a363337397d0a20202070617373776f72643a0a20202074696d656f75743a20323030300a2020202320e69c8de58aa1e68896e5ba94e794a8e5908d0a2020207379734e616d653a206163652d61646d696e0a202020656e61626c653a20747275650a20202064617461626173653a20300a0a6d616e6167656d656e743a0a20656e64706f696e74733a0a2020207765623a0a20202020206578706f737572653a0a20202020202020696e636c7564653a20272a270a2073656375726974793a0a202020656e61626c65643a2066616c73650a0a, '8a70da456f86dfb53253351ab9e4d42e', '2019-01-27 10:00:09', '2019-01-27 10:00:09', null, '0:0:0:0:0:0:0:1', '', '', null, null, null, 'yaml', null), ('3', 'ace-gateway-dev.yaml', 'DEFAULT_GROUP', 0x7365727665723a0a20706f72743a20383736350a0a23e8afb7e6b182e5928ce5938de5ba94475a4950e58e8be7bca9e694afe68c810a666569676e3a0a2068747470636c69656e743a0a202020656e61626c65643a2066616c73650a206f6b687474703a0a202020656e61626c65643a20747275650a20636f6d7072657373696f6e3a0a202020726571756573743a0a2020202020656e61626c65643a20747275650a20202020206d696d652d74797065733a20746578742f786d6c2c6170706c69636174696f6e2f786d6c2c6170706c69636174696f6e2f6a736f6e0a20202020206d696e2d726571756573742d73697a653a20323034380a202020726573706f6e73653a0a2020202020656e61626c65643a20747275650a0a737072696e673a0a206170706c69636174696f6e3a0a20202020206e616d653a206163652d676174657761790a2072656469733a0a202020202064617461626173653a20320a2020202020686f73743a203132372e302e302e310a20202020206a656469733a0a20202020202020706f6f6c3a0a20202020202020202020206d61782d6163746976653a2032300a207261626269746d713a0a2020202020686f73743a20247b5241424249545f4d515f484f53543a6c6f63616c686f73747d0a2020202020706f72743a2020247b5241424249545f4d515f504f52543a353637327d0a2020202020757365726e616d653a2067756573740a202020202070617373776f72643a2067756573740a20736c657574683a0a202020656e61626c65643a20747275650a202020687474703a0a20202020206c65676163793a0a20202020202020656e61626c65643a20747275650a20636c6f75643a0a20202020676174657761793a0a202020202020646973636f766572793a0a20202020202020206c6f6361746f723a0a202020202020202020206c6f776572436173655365727669636549643a20747275650a20202020202020202020656e61626c65643a20747275650a202020202020726f757465733a0a2020202020202023203d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d3d0a202020202020202d2069643a206163652d617574680a2020202020202020207572693a206c623a2f2f6163652d617574680a2020202020202020206f726465723a20383030300a202020202020202020707265646963617465733a0a2020202020202020202d20506174683d2f6170692f617574682f2a2a0a2020202020202020202d2052657175657374426f64793d310a20202020202020202066696c746572733a0a2020202020202020202d2053747269705072656669783d320a202020202020202d2069643a206163652d61646d696e0a2020202020202020207572693a206c623a2f2f6163652d61646d696e0a2020202020202020206f726465723a20383030310a202020202020202020707265646963617465733a0a2020202020202020202d20506174683d2f6170692f61646d696e2f2a2a0a2020202020202020202d2052657175657374426f64793d310a20202020202020202066696c746572733a0a2020202020202020202d2053747269705072656669783d320a202020206e61636f733a0a20202020202020646973636f766572793a0a2020202020202020207365727665722d616464723a203132372e302e302e313a383834380a2073656e74696e656c3a0a2020207472616e73706f72743a0a202020202064617368626f6172643a206c6f63616c686f73743a383038300a6c6f6767696e673a0a206c6576656c3a0a202020636f6d2e6769746875622e777869616f71692e73656375726974792e676174652e76323a20696e666f0a0a6d616e6167656d656e743a0a20656e64706f696e74733a0a2020207765623a0a20202020206578706f737572653a0a20202020202020696e636c7564653a20272a270a2073656375726974793a0a202020656e61626c65643a2066616c73650a0a0a676174653a0a2069676e6f72653a0a2020207374617274576974683a202f617574682f6a77740a0a0a617574683a0a207365727669636549643a206163652d617574680a20757365723a0a202020746f6b656e2d6865616465723a20417574686f72697a6174696f6e0a20636c69656e743a0a202020746f6b656e2d6865616465723a20782d636c69656e742d746f6b656e0a20202069643a206163652d67617465202023e4b88de5a1abe58899e9bb98e8aea4e8afbbe58f96737072696e672e6170706c69636174696f6e2e6e616d650a2020207365637265743a203132333435360a0a0a726962626f6e3a0a20657572656b613a0a202020656e61626c65643a20747275650a205265616454696d656f75743a2036303030300a20436f6e6e65637454696d656f75743a2036303030300a204d61784175746f526574726965733a20300a204d61784175746f526574726965734e6578745365727665723a20310a204f6b546f52657472794f6e416c6c4f7065726174696f6e733a2066616c73650a0a687973747269783a0a20746872656164706f6f6c3a0a20202064656661756c743a0a2020202020636f726553697a653a2031303030202323e5b9b6e58f91e689a7e8a18ce79a84e69c80e5a4a7e7babfe7a88be695b0efbc8ce9bb98e8aea431300a20202020206d6178517565756553697a653a2031303030202323426c6f636b696e675175657565e79a84e69c80e5a4a7e9989fe58897e695b00a2020202020717565756553697a6552656a656374696f6e5468726573686f6c643a20353030202323e58db3e4bdbf6d6178517565756553697a65e6b2a1e69c89e8bebee588b0efbc8ce8bebee588b0717565756553697a6552656a656374696f6e5468726573686f6c64e8afa5e580bce5908eefbc8ce8afb7e6b182e4b99fe4bc9ae8a2abe68b92e7bb9d0a20636f6d6d616e643a0a20202064656661756c743a0a2020202020657865637574696f6e3a0a2020202020202069736f6c6174696f6e3a0a2020202020202020207468726561643a0a202020202020202020202074696d656f7574496e4d696c6c697365636f6e64733a203130303030, 'eb8050d11dfea6bdf6516b85458095c2', '2019-01-27 10:00:37', '2019-01-27 13:10:10', null, '0:0:0:0:0:0:0:1', '', '', '', null, null, 'yaml', null);
COMMIT;
-- ----------------------------
-- Table structure for `config_info_aggr`
-- ----------------------------
DROP TABLE IF EXISTS `config_info_aggr`;
CREATE TABLE `config_info_aggr` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
`group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
`datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id',
`content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容',
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL,
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';
-- ----------------------------
-- Table structure for `config_info_beta`
-- ----------------------------
DROP TABLE IF EXISTS `config_info_beta`;
CREATE TABLE `config_info_beta` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
`beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps',
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
`src_user` text COLLATE utf8_bin COMMENT 'source user',
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';
-- ----------------------------
-- Table structure for `config_info_tag`
-- ----------------------------
DROP TABLE IF EXISTS `config_info_tag`;
CREATE TABLE `config_info_tag` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
`tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id',
`app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name',
`content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
`md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间',
`src_user` text COLLATE utf8_bin COMMENT 'source user',
`src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';
-- ----------------------------
-- Table structure for `config_tags_relation`
-- ----------------------------
DROP TABLE IF EXISTS `config_tags_relation`;
CREATE TABLE `config_tags_relation` (
`id` bigint(20) NOT NULL COMMENT 'id',
`tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name',
`tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type',
`data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
`group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id',
`tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id',
`nid` bigint(20) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`nid`),
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';
-- ----------------------------
-- Table structure for `group_capacity`
-- ----------------------------
DROP TABLE IF EXISTS `group_capacity`;
CREATE TABLE `group_capacity` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
`max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
`max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMM
gitextract__jhyxq4_/ ├── .gitignore ├── LICENSE ├── README.md ├── ace-api/ │ ├── pom.xml │ └── src/ │ └── main/ │ └── java/ │ └── com/ │ └── github/ │ └── wxiaoqi/ │ └── security/ │ └── api/ │ └── vo/ │ ├── authority/ │ │ ├── CheckPermissionInfo.java │ │ └── PermissionInfo.java │ ├── log/ │ │ └── LogInfo.java │ ├── search/ │ │ └── IndexObject.java │ └── user/ │ └── UserInfo.java ├── ace-dev-base/ │ ├── ace-auth-sdk/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ └── java/ │ │ └── com/ │ │ └── github/ │ │ └── wxiaoqi/ │ │ └── security/ │ │ └── auth/ │ │ └── client/ │ │ ├── EnableAceAuthClient.java │ │ ├── annotation/ │ │ │ └── IgnoreUserToken.java │ │ ├── config/ │ │ │ ├── FeignOkHttpConfig.java │ │ │ ├── ServiceAuthConfig.java │ │ │ └── UserAuthConfig.java │ │ ├── configuration/ │ │ │ └── AutoConfiguration.java │ │ ├── exception/ │ │ │ ├── JwtIllegalArgumentException.java │ │ │ ├── JwtSignatureException.java │ │ │ └── JwtTokenExpiredException.java │ │ ├── feign/ │ │ │ └── ServiceAuthFeign.java │ │ ├── interceptor/ │ │ │ ├── OkHttpTokenInterceptor.java │ │ │ └── UserAuthRestInterceptor.java │ │ ├── jwt/ │ │ │ └── UserAuthUtil.java │ │ └── runner/ │ │ └── AuthClientRunner.java │ ├── ace-common/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ └── java/ │ │ └── com/ │ │ └── github/ │ │ └── wxiaoqi/ │ │ └── security/ │ │ └── common/ │ │ ├── biz/ │ │ │ └── BaseBiz.java │ │ ├── constant/ │ │ │ ├── CommonConstants.java │ │ │ ├── RedisKeyConstant.java │ │ │ ├── RestCodeConstants.java │ │ │ └── UserConstant.java │ │ ├── context/ │ │ │ └── BaseContextHandler.java │ │ ├── exception/ │ │ │ ├── BaseException.java │ │ │ └── auth/ │ │ │ ├── ClientForbiddenException.java │ │ │ ├── ClientInvalidException.java │ │ │ ├── ClientTokenException.java │ │ │ ├── UserInvalidException.java │ │ │ └── UserTokenException.java │ │ ├── handler/ │ │ │ └── GlobalExceptionHandler.java │ │ ├── msg/ │ │ │ ├── BaseResponse.java │ │ │ ├── ObjectRestResponse.java │ │ │ ├── TableResultResponse.java │ │ │ └── auth/ │ │ │ ├── TokenErrorResponse.java │ │ │ └── TokenForbiddenResponse.java │ │ ├── rest/ │ │ │ └── BaseController.java │ │ ├── service/ │ │ │ ├── BaseService.java │ │ │ └── impl/ │ │ │ └── BaseServiceImpl.java │ │ ├── util/ │ │ │ ├── AddressUtils.java │ │ │ ├── ClientUtil.java │ │ │ ├── EntityUtils.java │ │ │ ├── IpUtils.java │ │ │ ├── Query.java │ │ │ ├── ReflectionUtils.java │ │ │ ├── StringHelper.java │ │ │ ├── TreeUtil.java │ │ │ ├── UUIDUtils.java │ │ │ ├── WebUtils.java │ │ │ ├── http/ │ │ │ │ ├── HttpHelper.java │ │ │ │ └── HttpUtils.java │ │ │ └── jwt/ │ │ │ ├── IJWTInfo.java │ │ │ ├── JWTHelper.java │ │ │ ├── JWTInfo.java │ │ │ └── RsaKeyHelper.java │ │ ├── vo/ │ │ │ └── TreeNode.java │ │ └── web/ │ │ └── ParameterRequestWrapper.java │ └── pom.xml ├── ace-gate/ │ ├── pom.xml │ └── src/ │ └── main/ │ ├── docker/ │ │ └── Dockerfile │ ├── java/ │ │ └── com/ │ │ └── github/ │ │ └── wxiaoqi/ │ │ └── security/ │ │ └── gate/ │ │ ├── GatewayServerBootstrap.java │ │ ├── config/ │ │ │ └── GatewayConfig.java │ │ ├── filter/ │ │ │ └── AccessGatewayFilter.java │ │ ├── handler/ │ │ │ └── RequestBodyRoutePredicateFactory.java │ │ ├── service/ │ │ │ ├── LogService.java │ │ │ └── LogServiceImpl.java │ │ └── utils/ │ │ └── DBLog.java │ └── resources/ │ └── application.yml ├── ace-infrastructure/ │ ├── ace-monitor/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── docker/ │ │ │ └── Dockerfile │ │ ├── java/ │ │ │ └── com/ │ │ │ └── github/ │ │ │ └── wxiaoqi/ │ │ │ └── security/ │ │ │ └── monitor/ │ │ │ └── MonitorBootstrap.java │ │ └── resources/ │ │ └── application.yml │ ├── ace-nacos/ │ │ ├── db/ │ │ │ └── init_nacos.sql │ │ └── nacos/ │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── bin/ │ │ │ ├── derby.log │ │ │ ├── logs/ │ │ │ │ ├── access_log.2019-10-24.log │ │ │ │ └── access_log.2019-10-25.log │ │ │ ├── shutdown.cmd │ │ │ ├── shutdown.sh │ │ │ ├── startup.cmd │ │ │ └── startup.sh │ │ ├── conf/ │ │ │ ├── application.properties │ │ │ ├── application.properties.example │ │ │ ├── cluster.conf.example │ │ │ ├── nacos-logback.xml │ │ │ ├── nacos-mysql.sql │ │ │ └── schema.sql │ │ ├── data/ │ │ │ ├── derby-data/ │ │ │ │ ├── README_DO_NOT_TOUCH_FILES.txt │ │ │ │ ├── db.lck │ │ │ │ ├── dbex.lck │ │ │ │ ├── log/ │ │ │ │ │ ├── README_DO_NOT_TOUCH_FILES.txt │ │ │ │ │ ├── log.ctrl │ │ │ │ │ └── logmirror.ctrl │ │ │ │ ├── seg0/ │ │ │ │ │ └── README_DO_NOT_TOUCH_FILES.txt │ │ │ │ └── service.properties │ │ │ └── naming/ │ │ │ ├── data/ │ │ │ │ └── public/ │ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-admin │ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-auth │ │ │ │ ├── com.alibaba.nacos.naming.domains.meta.public##ace-gateway │ │ │ │ └── com.alibaba.nacos.naming.domains.meta.public##ace-monitor │ │ │ └── meta.properties │ │ ├── logs/ │ │ │ ├── cmdb-main.log │ │ │ ├── config-acl.log │ │ │ ├── config-app.log │ │ │ ├── config-client-request.log │ │ │ ├── config-dump.log │ │ │ ├── config-fatal.log │ │ │ ├── config-memory.log │ │ │ ├── config-memory.log.2019-10-24.0 │ │ │ ├── config-notify.log │ │ │ ├── config-pull-check.log │ │ │ ├── config-pull.log │ │ │ ├── config-sdk-request.log │ │ │ ├── config-server.log │ │ │ ├── config-server.log.2019-10-24.0 │ │ │ ├── config-trace.log │ │ │ ├── nacos.log │ │ │ ├── nacos.log.2019-10-24.0 │ │ │ ├── nacos.log.2019-10-25.0 │ │ │ ├── nacos_gc.log.0.current │ │ │ ├── naming-cache.log │ │ │ ├── naming-debug.log │ │ │ ├── naming-device.log │ │ │ ├── naming-event.log │ │ │ ├── naming-performance.log │ │ │ ├── naming-performance.log.2019-10-24.0 │ │ │ ├── naming-push.log │ │ │ ├── naming-push.log.2019-10-24.0 │ │ │ ├── naming-raft.log │ │ │ ├── naming-raft.log.2019-10-24.0 │ │ │ ├── naming-router.log │ │ │ ├── naming-rt.log │ │ │ ├── naming-server.log │ │ │ ├── naming-server.log.2019-10-25.0 │ │ │ ├── naming-tag.log │ │ │ ├── naming-tenant.log │ │ │ └── start.out │ │ └── plugins/ │ │ └── cmdb/ │ │ └── nacos-cmdb-plugin-example.jar │ ├── ace-sentinel/ │ │ └── sentinel-dashboard.jar │ └── pom.xml ├── ace-modules/ │ ├── ace-admin/ │ │ ├── db/ │ │ │ └── init.sql │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── docker/ │ │ │ ├── Dockerfile │ │ │ └── wait-for-it.sh │ │ ├── java/ │ │ │ └── com/ │ │ │ └── github/ │ │ │ └── wxiaoqi/ │ │ │ └── security/ │ │ │ ├── AdminBootstrap.java │ │ │ ├── configuration/ │ │ │ │ ├── KeyConfiguration.java │ │ │ │ ├── RedisConfiguration.java │ │ │ │ ├── UserConfiguration.java │ │ │ │ └── WebConfiguration.java │ │ │ └── modules/ │ │ │ ├── admin/ │ │ │ │ ├── biz/ │ │ │ │ │ ├── ElementBiz.java │ │ │ │ │ ├── GateLogBiz.java │ │ │ │ │ ├── GroupBiz.java │ │ │ │ │ ├── GroupTypeBiz.java │ │ │ │ │ ├── MenuBiz.java │ │ │ │ │ ├── ResourceAuthorityBiz.java │ │ │ │ │ └── UserBiz.java │ │ │ │ ├── constant/ │ │ │ │ │ └── AdminCommonConstant.java │ │ │ │ ├── entity/ │ │ │ │ │ ├── Element.java │ │ │ │ │ ├── GateLog.java │ │ │ │ │ ├── Group.java │ │ │ │ │ ├── GroupType.java │ │ │ │ │ ├── Menu.java │ │ │ │ │ ├── OnlineLog.java │ │ │ │ │ ├── ResourceAuthority.java │ │ │ │ │ └── User.java │ │ │ │ ├── mapper/ │ │ │ │ │ ├── ElementMapper.java │ │ │ │ │ ├── GateLogMapper.java │ │ │ │ │ ├── GroupMapper.java │ │ │ │ │ ├── GroupTypeMapper.java │ │ │ │ │ ├── MenuMapper.java │ │ │ │ │ ├── ResourceAuthorityMapper.java │ │ │ │ │ └── UserMapper.java │ │ │ │ ├── rest/ │ │ │ │ │ ├── ElementController.java │ │ │ │ │ ├── GateLogController.java │ │ │ │ │ ├── GroupController.java │ │ │ │ │ ├── GroupTypeController.java │ │ │ │ │ ├── MenuController.java │ │ │ │ │ └── UserController.java │ │ │ │ ├── rpc/ │ │ │ │ │ ├── LogRest.java │ │ │ │ │ ├── UserRest.java │ │ │ │ │ └── service/ │ │ │ │ │ └── PermissionService.java │ │ │ │ ├── util/ │ │ │ │ │ └── Sha256PasswordEncoder.java │ │ │ │ └── vo/ │ │ │ │ ├── AccessInterface.java │ │ │ │ ├── AccessMenuTree.java │ │ │ │ ├── AccessRouteTree.java │ │ │ │ ├── AuthorityMenuTree.java │ │ │ │ ├── FrontUser.java │ │ │ │ ├── FrontUserV2.java │ │ │ │ ├── GroupTree.java │ │ │ │ ├── GroupUsers.java │ │ │ │ └── MenuTree.java │ │ │ └── auth/ │ │ │ ├── bean/ │ │ │ │ └── ClientInfo.java │ │ │ ├── biz/ │ │ │ │ ├── ClientBiz.java │ │ │ │ └── ClientServiceBiz.java │ │ │ ├── controller/ │ │ │ │ ├── AuthController.java │ │ │ │ ├── CaptchaController.java │ │ │ │ ├── ClientController.java │ │ │ │ ├── OnlineController.java │ │ │ │ └── ServiceController.java │ │ │ ├── entity/ │ │ │ │ ├── Client.java │ │ │ │ └── ClientService.java │ │ │ ├── interceptor/ │ │ │ │ └── UserAuthRestInterceptor.java │ │ │ ├── mapper/ │ │ │ │ ├── ClientMapper.java │ │ │ │ └── ClientServiceMapper.java │ │ │ ├── runner/ │ │ │ │ └── AuthServerRunner.java │ │ │ ├── service/ │ │ │ │ ├── AuthClientService.java │ │ │ │ ├── AuthService.java │ │ │ │ └── impl/ │ │ │ │ ├── AuthServiceImpl.java │ │ │ │ └── DBAuthClientService.java │ │ │ ├── util/ │ │ │ │ └── user/ │ │ │ │ ├── JwtAuthenticationRequest.java │ │ │ │ ├── JwtAuthenticationResponse.java │ │ │ │ └── JwtTokenUtil.java │ │ │ └── vo/ │ │ │ └── FrontUser.java │ │ └── resources/ │ │ ├── application.yml │ │ ├── builder/ │ │ │ └── generatorConfig.xml │ │ ├── logback.xml │ │ └── mapper/ │ │ ├── ClientMapper.xml │ │ ├── ClientServiceMapper.xml │ │ ├── ElementMapper.xml │ │ ├── GateLogMapper.xml │ │ ├── GroupMapper.xml │ │ ├── GroupTypeMapper.xml │ │ ├── MenuMapper.xml │ │ ├── ResourceAuthorityMapper.xml │ │ └── UserMapper.xml │ ├── ace-generator/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── db/ │ │ │ └── cloud_sample.sql │ │ ├── java/ │ │ │ └── com/ │ │ │ └── github/ │ │ │ └── wxiaoqi/ │ │ │ └── security/ │ │ │ └── generator/ │ │ │ ├── GeneratorServerBootstrap.java │ │ │ ├── config/ │ │ │ │ ├── DataSourceConfigurer.java │ │ │ │ ├── DynamicDataSource.java │ │ │ │ ├── DynamicDataSourceContextHolder.java │ │ │ │ ├── DynamicDatasourceConfig.java │ │ │ │ └── SwitchDB.java │ │ │ ├── entity/ │ │ │ │ ├── ColumnEntity.java │ │ │ │ └── TableEntity.java │ │ │ ├── mapper/ │ │ │ │ └── GeneratorMapper.java │ │ │ ├── rest/ │ │ │ │ └── GeneratorRest.java │ │ │ ├── service/ │ │ │ │ └── GeneratorService.java │ │ │ └── utils/ │ │ │ ├── DateUtils.java │ │ │ └── GeneratorUtils.java │ │ └── resources/ │ │ ├── application.yml │ │ ├── generator.properties │ │ ├── mapper/ │ │ │ └── GeneratorMapper.xml │ │ └── template/ │ │ ├── biz.java.vm │ │ ├── controller.java.vm │ │ ├── entity.java.vm │ │ ├── index.js.vm │ │ ├── index.vue.vm │ │ ├── mapper.java.vm │ │ └── mapper.xml.vm │ ├── ace-nlp/ │ │ └── pom.xml │ ├── ace-sample/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── github/ │ │ │ └── wxiaoqi/ │ │ │ └── security/ │ │ │ └── sample/ │ │ │ ├── SampleBootstrap.java │ │ │ ├── biz/ │ │ │ │ └── SampleDataTestBiz.java │ │ │ ├── config/ │ │ │ │ └── WebConfiguration.java │ │ │ ├── entity/ │ │ │ │ └── SampleDataTest.java │ │ │ ├── mapper/ │ │ │ │ └── SampleDataTestMapper.java │ │ │ └── rest/ │ │ │ └── SampleDataTestController.java │ │ └── resources/ │ │ ├── application.yml │ │ └── mapper/ │ │ └── SampleDataTestMapper.xml │ ├── ace-tool/ │ │ ├── pom.xml │ │ └── src/ │ │ └── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── github/ │ │ │ └── wxiaoqi/ │ │ │ ├── ToolBootstrap.java │ │ │ ├── config/ │ │ │ │ ├── CloudStorageConfig.java │ │ │ │ └── LuceneConfiguration.java │ │ │ ├── oss/ │ │ │ │ ├── cloud/ │ │ │ │ │ ├── AliyunCloudStorageService.java │ │ │ │ │ ├── CloudStorageService.java │ │ │ │ │ ├── OSSFactory.java │ │ │ │ │ ├── QcloudCloudStorageService.java │ │ │ │ │ └── QiniuCloudStorageService.java │ │ │ │ ├── constants/ │ │ │ │ │ └── OSSConstant.java │ │ │ │ └── controller/ │ │ │ │ └── OssController.java │ │ │ └── search/ │ │ │ ├── controller/ │ │ │ │ └── SearchController.java │ │ │ ├── lucene/ │ │ │ │ ├── LuceneDao.java │ │ │ │ └── util/ │ │ │ │ ├── DocumentUtil.java │ │ │ │ ├── IKAnalyzer5x.java │ │ │ │ ├── IKTokenizer5x.java │ │ │ │ └── QueryUtil.java │ │ │ └── service/ │ │ │ ├── LuceneService.java │ │ │ └── impl/ │ │ │ └── LuceneServiceImpl.java │ │ └── resources/ │ │ ├── application.yml │ │ └── bootstrap.yml │ └── pom.xml ├── alibaba-base/ │ └── nacos.sql ├── dev-doc.md ├── docker-compose.yml ├── dump.rdb └── pom.xml
SYMBOL INDEX (1337 symbols across 176 files)
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/CheckPermissionInfo.java
class CheckPermissionInfo (line 11) | @Data
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/PermissionInfo.java
class PermissionInfo (line 11) | public class PermissionInfo implements Serializable{
method getMenu (line 19) | public String getMenu() {
method setMenu (line 23) | public void setMenu(String menu) {
method getName (line 27) | public String getName() {
method setName (line 31) | public void setName(String name) {
method getMethod (line 37) | public String getMethod() {
method setMethod (line 41) | public void setMethod(String method) {
method getCode (line 45) | public String getCode() {
method setCode (line 49) | public void setCode(String code) {
method getType (line 53) | public String getType() {
method setType (line 57) | public void setType(String type) {
method getUri (line 61) | public String getUri() {
method setUri (line 65) | public void setUri(String uri) {
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/log/LogInfo.java
class LogInfo (line 12) | public class LogInfo implements Serializable{
method LogInfo (line 29) | public LogInfo(String menu, String option, String uri, Date crtTime, ...
method LogInfo (line 40) | public LogInfo() {
method getMenu (line 43) | public String getMenu() {
method setMenu (line 47) | public void setMenu(String menu) {
method getOpt (line 51) | public String getOpt() {
method setOpt (line 55) | public void setOpt(String option) {
method getUri (line 59) | public String getUri() {
method setUri (line 63) | public void setUri(String uri) {
method getCrtTime (line 67) | public Long getCrtTime() {
method setCrtTime (line 71) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 75) | public String getCrtUser() {
method setCrtUser (line 79) | public void setCrtUser(String crtUser) {
method getCrtName (line 83) | public String getCrtName() {
method setCrtName (line 87) | public void setCrtName(String crtName) {
method getCrtHost (line 91) | public String getCrtHost() {
method setCrtHost (line 95) | public void setCrtHost(String crtHost) {
method getBody (line 99) | public String getBody() {
method setBody (line 103) | public void setBody(String body) {
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/search/IndexObject.java
class IndexObject (line 36) | public class IndexObject implements Comparable<IndexObject>,Serializable{
method getPostDate (line 48) | public String getPostDate() {
method setPostDate (line 52) | public void setPostDate(String postDate) {
method getDescripton (line 56) | public String getDescripton() {
method setDescripton (line 60) | public void setDescripton(String descripton) {
method getKeywords (line 70) | public String getKeywords() {
method setKeywords (line 74) | public void setKeywords(String keywords) {
method getUrl (line 78) | public String getUrl() {
method setUrl (line 82) | public void setUrl(String url) {
method getTitle (line 88) | public String getTitle() {
method setTitle (line 92) | public void setTitle(String title) {
method getId (line 96) | public Long getId() {
method setId (line 100) | public void setId(Long id) {
method getScore (line 104) | public float getScore() {
method setScore (line 108) | public void setScore(float score) {
method IndexObject (line 114) | public IndexObject() {
method IndexObject (line 118) | public IndexObject(Long _id, String _keywords, String _descripton, Str...
method compareTo (line 126) | @Override
FILE: ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/user/UserInfo.java
class UserInfo (line 12) | public class UserInfo implements Serializable{
method getUpdTime (line 19) | public Date getUpdTime() {
method setUpdTime (line 23) | public void setUpdTime(Date updTime) {
method getId (line 29) | public String getId() {
method setId (line 33) | public void setId(String id) {
method getUsername (line 37) | public String getUsername() {
method setUsername (line 41) | public void setUsername(String username) {
method getPassword (line 45) | public String getPassword() {
method setPassword (line 49) | public void setPassword(String password) {
method getName (line 53) | public String getName() {
method setName (line 57) | public void setName(String name) {
method getDescription (line 61) | public String getDescription() {
method setDescription (line 65) | public void setDescription(String description) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/FeignOkHttpConfig.java
class FeignOkHttpConfig (line 15) | @AutoConfigureBefore(FeignAutoConfiguration.class)
method okHttpClient (line 27) | @Bean
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/ServiceAuthConfig.java
class ServiceAuthConfig (line 11) | public class ServiceAuthConfig {
method getClientId (line 20) | public String getClientId() {
method setClientId (line 24) | public void setClientId(String clientId) {
method getClientSecret (line 28) | public String getClientSecret() {
method setClientSecret (line 32) | public void setClientSecret(String clientSecret) {
method getPubKeyByte (line 36) | public byte[] getPubKeyByte() {
method setPubKeyByte (line 40) | public void setPubKeyByte(byte[] pubKeyByte) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/UserAuthConfig.java
class UserAuthConfig (line 10) | public class UserAuthConfig {
method getTokenHeader (line 17) | public String getTokenHeader() {
method setTokenHeader (line 21) | public void setTokenHeader(String tokenHeader) {
method getToken (line 25) | public String getToken(HttpServletRequest request){
method getPubKeyByte (line 29) | public byte[] getPubKeyByte() {
method setPubKeyByte (line 33) | public void setPubKeyByte(byte[] pubKeyByte) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/configuration/AutoConfiguration.java
class AutoConfiguration (line 12) | @Configuration
method getServiceAuthConfig (line 15) | @Bean
method getUserAuthConfig (line 20) | @Bean
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtIllegalArgumentException.java
class JwtIllegalArgumentException (line 6) | public class JwtIllegalArgumentException extends Exception {
method JwtIllegalArgumentException (line 7) | public JwtIllegalArgumentException(String s) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtSignatureException.java
class JwtSignatureException (line 8) | public class JwtSignatureException extends Exception {
method JwtSignatureException (line 9) | public JwtSignatureException(String s) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtTokenExpiredException.java
class JwtTokenExpiredException (line 6) | public class JwtTokenExpiredException extends Exception {
method JwtTokenExpiredException (line 7) | public JwtTokenExpiredException(String s) {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/feign/ServiceAuthFeign.java
type ServiceAuthFeign (line 12) | @FeignClient(value = "${auth.serviceId}",configuration = {})
method getUserPublicKey (line 14) | @RequestMapping(value = "/client/userPubKey",method = RequestMethod.POST)
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/OkHttpTokenInterceptor.java
class OkHttpTokenInterceptor (line 19) | @Component
method intercept (line 27) | @Override
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/UserAuthRestInterceptor.java
class UserAuthRestInterceptor (line 22) | public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
method preHandle (line 31) | @Override
method afterCompletion (line 59) | @Override
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/jwt/UserAuthUtil.java
class UserAuthUtil (line 15) | @Configuration
method getInfoFromToken (line 19) | public IJWTInfo getInfoFromToken(String token) throws Exception {
FILE: ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/runner/AuthClientRunner.java
class AuthClientRunner (line 21) | @Configuration
method run (line 32) | @Override
method refreshUserPubKey (line 41) | @Scheduled(cron = "0 0/1 * * * ?")
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/biz/BaseBiz.java
class BaseBiz (line 22) | public abstract class BaseBiz<M extends Mapper<T>, T> {
method setMapper (line 26) | public void setMapper(M mapper) {
method selectOne (line 30) | public T selectOne(T entity) {
method selectById (line 35) | public T selectById(Object id) {
method selectList (line 40) | public List<T> selectList(T entity) {
method selectListAll (line 45) | public List<T> selectListAll() {
method selectCount (line 50) | public Long selectCount(T entity) {
method insert (line 55) | public void insert(T entity) {
method insertSelective (line 61) | public void insertSelective(T entity) {
method delete (line 67) | public void delete(T entity) {
method deleteById (line 72) | public void deleteById(Object id) {
method updateById (line 77) | public void updateById(T entity) {
method updateSelectiveById (line 83) | public void updateSelectiveById(T entity) {
method selectByExample (line 89) | public List<T> selectByExample(Object example) {
method selectCountByExample (line 93) | public int selectCountByExample(Object example) {
method selectByQuery (line 97) | public TableResultResponse<T> selectByQuery(Query query) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/CommonConstants.java
class CommonConstants (line 6) | public class CommonConstants {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RedisKeyConstant.java
class RedisKeyConstant (line 7) | public class RedisKeyConstant {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RestCodeConstants.java
class RestCodeConstants (line 6) | public class RestCodeConstants {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/UserConstant.java
class UserConstant (line 9) | public class UserConstant {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/context/BaseContextHandler.java
class BaseContextHandler (line 12) | public class BaseContextHandler {
method set (line 15) | public static void set(String key, Object value) {
method get (line 24) | public static Object get(String key){
method getUserID (line 33) | public static String getUserID(){
method getUsername (line 38) | public static String getUsername(){
method getName (line 44) | public static String getName(){
method getToken (line 49) | public static String getToken(){
method setToken (line 53) | public static void setToken(String token){set(CommonConstants.CONTEXT_...
method setName (line 55) | public static void setName(String name){set(CommonConstants.CONTEXT_KE...
method setUserID (line 57) | public static void setUserID(String userID){
method setUsername (line 61) | public static void setUsername(String username){
method returnObjectValue (line 65) | private static String returnObjectValue(Object value) {
method remove (line 69) | public static void remove(){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/BaseException.java
class BaseException (line 6) | public class BaseException extends RuntimeException {
method getStatus (line 9) | public int getStatus() {
method setStatus (line 13) | public void setStatus(int status) {
method BaseException (line 17) | public BaseException() {
method BaseException (line 20) | public BaseException(String message,int status) {
method BaseException (line 25) | public BaseException(String message) {
method BaseException (line 29) | public BaseException(String message, Throwable cause) {
method BaseException (line 33) | public BaseException(Throwable cause) {
method BaseException (line 37) | public BaseException(String message, Throwable cause, boolean enableSu...
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientForbiddenException.java
class ClientForbiddenException (line 10) | public class ClientForbiddenException extends BaseException {
method ClientForbiddenException (line 11) | public ClientForbiddenException(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientInvalidException.java
class ClientInvalidException (line 10) | public class ClientInvalidException extends BaseException {
method ClientInvalidException (line 11) | public ClientInvalidException(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientTokenException.java
class ClientTokenException (line 10) | public class ClientTokenException extends BaseException {
method ClientTokenException (line 11) | public ClientTokenException(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserInvalidException.java
class UserInvalidException (line 10) | public class UserInvalidException extends BaseException {
method UserInvalidException (line 11) | public UserInvalidException(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserTokenException.java
class UserTokenException (line 10) | public class UserTokenException extends BaseException {
method UserTokenException (line 11) | public UserTokenException(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/GlobalExceptionHandler.java
class GlobalExceptionHandler (line 20) | @ControllerAdvice("com.github.wxiaoqi.security")
method clientTokenExceptionHandler (line 25) | @ExceptionHandler(ClientTokenException.class)
method userTokenExceptionHandler (line 32) | @ExceptionHandler(UserTokenException.class)
method userInvalidExceptionHandler (line 39) | @ExceptionHandler(UserInvalidException.class)
method baseExceptionHandler (line 46) | @ExceptionHandler(BaseException.class)
method otherExceptionHandler (line 53) | @ExceptionHandler(Exception.class)
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/BaseResponse.java
class BaseResponse (line 6) | public class BaseResponse {
method BaseResponse (line 10) | public BaseResponse(int status, String message) {
method BaseResponse (line 15) | public BaseResponse() {
method getMessage (line 18) | public String getMessage() {
method setMessage (line 22) | public void setMessage(String message) {
method getStatusCode (line 26) | public int getStatusCode() {
method setStatusCode (line 30) | public void setStatusCode(int statusCode) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/ObjectRestResponse.java
class ObjectRestResponse (line 6) | public class ObjectRestResponse<T> extends BaseResponse {
method data (line 10) | public ObjectRestResponse data(T data) {
method getData (line 14) | public T getData() {
method setData (line 18) | public ObjectRestResponse setData(T data) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/TableResultResponse.java
class TableResultResponse (line 11) | public class TableResultResponse<T> extends BaseResponse {
method TableResultResponse (line 15) | public TableResultResponse(long total, List<T> rows) {
method TableResultResponse (line 19) | public TableResultResponse() {
method total (line 23) | TableResultResponse<T> total(int total) {
method total (line 28) | TableResultResponse<T> total(List<T> rows) {
method getData (line 33) | public TableData<T> getData() {
method setData (line 37) | public void setData(TableData<T> data) {
class TableData (line 41) | class TableData<T> {
method TableData (line 45) | public TableData(long total, List<T> rows) {
method TableData (line 50) | public TableData() {
method getTotal (line 53) | public long getTotal() {
method setTotal (line 57) | public void setTotal(long total) {
method getRows (line 61) | public List<T> getRows() {
method setRows (line 65) | public void setRows(List<T> rows) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenErrorResponse.java
class TokenErrorResponse (line 9) | public class TokenErrorResponse extends BaseResponse {
method TokenErrorResponse (line 10) | public TokenErrorResponse(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenForbiddenResponse.java
class TokenForbiddenResponse (line 9) | public class TokenForbiddenResponse extends BaseResponse {
method TokenForbiddenResponse (line 10) | public TokenForbiddenResponse(String message) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/BaseController.java
class BaseController (line 22) | @Slf4j
method add (line 29) | @RequestMapping(value = "",method = RequestMethod.POST)
method get (line 36) | @RequestMapping(value = "/{id}",method = RequestMethod.GET)
method update (line 45) | @RequestMapping(value = "/{id}",method = RequestMethod.PUT)
method remove (line 51) | @RequestMapping(value = "/{id}",method = RequestMethod.DELETE)
method all (line 58) | @RequestMapping(value = "/all",method = RequestMethod.GET)
method list (line 63) | @RequestMapping(value = "/page",method = RequestMethod.GET)
method getCurrentUserName (line 70) | public String getCurrentUserName(){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/BaseService.java
type BaseService (line 11) | public interface BaseService<T> {
method selectOne (line 18) | T selectOne(T entity);
method selectById (line 26) | T selectById(Object id);
method selectList (line 42) | List<T> selectList(T entity);
method selectListAll (line 50) | List<T> selectListAll();
method selectCount (line 66) | Long selectCount(T entity);
method insert (line 73) | void insert(T entity);
method insertSelective (line 81) | void insertSelective(T entity);
method delete (line 88) | void delete(T entity);
method deleteById (line 95) | void deleteById(Object id);
method updateById (line 103) | void updateById(T entity);
method updateSelectiveById (line 111) | void updateSelectiveById(T entity);
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/impl/BaseServiceImpl.java
class BaseServiceImpl (line 10) | public class BaseServiceImpl<M extends Mapper<T>, T> implements BaseServ...
method selectOne (line 15) | @Override
method selectById (line 20) | @Override
method selectList (line 30) | @Override
method selectListAll (line 35) | @Override
method selectCount (line 45) | @Override
method insert (line 50) | @Override
method insertSelective (line 55) | @Override
method delete (line 60) | @Override
method deleteById (line 65) | @Override
method updateById (line 70) | @Override
method updateSelectiveById (line 75) | @Override
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/AddressUtils.java
class AddressUtils (line 14) | @Slf4j
method getRealAddressByIP (line 23) | public static String getRealAddressByIP(String ip) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ClientUtil.java
class ClientUtil (line 5) | public class ClientUtil {
method getClientIp (line 11) | public static String getClientIp(HttpServletRequest request){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/EntityUtils.java
class EntityUtils (line 24) | public class EntityUtils {
method setCreatAndUpdatInfo (line 31) | public static <T> void setCreatAndUpdatInfo(T entity) {
method setCreateInfo (line 42) | public static <T> void setCreateInfo(T entity){
method setUpdatedInfo (line 79) | public static <T> void setUpdatedInfo(T entity){
method setDefaultValues (line 116) | private static <T> void setDefaultValues(T entity, String[] fields, Ob...
method isPKNotNull (line 133) | public static <T> boolean isPKNotNull(T entity,String field){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/IpUtils.java
class IpUtils (line 9) | public class IpUtils {
method getRemoteIP (line 12) | public static String getRemoteIP(HttpServletRequest request) {
method internalIp (line 19) | public static boolean internalIp(String ip)
method textToNumericFormatV4 (line 31) | public static byte[] textToNumericFormatV4(String text)
method internalIp (line 107) | private static boolean internalIp(byte[] addr)
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/Query.java
class Query (line 10) | public class Query extends LinkedHashMap<String, Object> {
method Query (line 17) | public Query(Map<String, Object> params){
method getPage (line 31) | public int getPage() {
method setPage (line 35) | public void setPage(int page) {
method getLimit (line 39) | public int getLimit() {
method setLimit (line 43) | public void setLimit(int limit) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ReflectionUtils.java
class ReflectionUtils (line 22) | @SuppressWarnings("rawtypes")
method invokeGetter (line 37) | public static Object invokeGetter(Object obj, String propertyName) {
method invokeSetter (line 50) | public static void invokeSetter(Object obj, String propertyName, Objec...
method getFieldValue (line 67) | public static Object getFieldValue(final Object obj, final String fiel...
method setFieldValue (line 86) | public static void setFieldValue(final Object obj, final String fieldN...
method convert (line 101) | public static Object convert(Object object, Class<?> type) {
method invokeMethod (line 134) | public static Object invokeMethod(final Object obj, final String metho...
method invokeMethodByName (line 153) | public static Object invokeMethodByName(final Object obj, final String...
method getAccessibleField (line 171) | public static Field getAccessibleField(final Object obj, final String ...
method getAccessibleMethod (line 194) | public static Method getAccessibleMethod(final Object obj, final Strin...
method getAccessibleMethodByName (line 219) | public static Method getAccessibleMethodByName(final Object obj, final...
method makeAccessible (line 238) | public static void makeAccessible(Method method) {
method makeAccessible (line 248) | public static void makeAccessible(Field field) {
method getClassGenricType (line 264) | @SuppressWarnings("unchecked")
method getClassGenricType (line 279) | public static Class getClassGenricType(final Class clazz, final int in...
method getUserClass (line 303) | public static Class<?> getUserClass(Object instance) {
method convertReflectionExceptionToUnchecked (line 319) | public static RuntimeException convertReflectionExceptionToUnchecked(E...
method hasField (line 338) | public static boolean hasField(final Object obj, final String fieldName){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/StringHelper.java
class StringHelper (line 6) | public class StringHelper {
method getObjectValue (line 7) | public static String getObjectValue(Object obj){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/TreeUtil.java
class TreeUtil (line 11) | public class TreeUtil{
method bulid (line 18) | public static <T extends TreeNode> List<T> bulid(List<T> treeNodes,Obj...
method buildByRecursive (line 46) | public static <T extends TreeNode> List<T> buildByRecursive(List<T> tr...
method findChildren (line 62) | public static <T extends TreeNode> T findChildren(T treeNode, List<T> ...
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/UUIDUtils.java
class UUIDUtils (line 8) | public class UUIDUtils {
method generateShortUuid (line 17) | public static String generateShortUuid() {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/WebUtils.java
class WebUtils (line 15) | public class WebUtils {
method getRequest (line 20) | public static HttpServletRequest getRequest()
method getResponse (line 28) | public static HttpServletResponse getResponse()
method getSession (line 36) | public static HttpSession getSession()
method getRequestAttributes (line 41) | public static ServletRequestAttributes getRequestAttributes()
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpHelper.java
class HttpHelper (line 17) | @Slf4j
method getBodyString (line 20) | public static String getBodyString(ServletRequest request) {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpUtils.java
class HttpUtils (line 20) | public class HttpUtils
method sendGet (line 31) | public static String sendGet(String url, String param)
method sendGet (line 44) | public static String sendGet(String url, String param, String contentT...
method sendPost (line 106) | public static String sendPost(String url, String param)
method sendSSLPost (line 172) | public static String sendSSLPost(String url, String param)
class TrustAnyTrustManager (line 227) | private static class TrustAnyTrustManager implements X509TrustManager
method checkClientTrusted (line 229) | @Override
method checkServerTrusted (line 234) | @Override
method getAcceptedIssuers (line 239) | @Override
class TrustAnyHostnameVerifier (line 246) | private static class TrustAnyHostnameVerifier implements HostnameVerifier
method verify (line 248) | @Override
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/IJWTInfo.java
type IJWTInfo (line 6) | public interface IJWTInfo {
method getUniqueName (line 11) | String getUniqueName();
method getId (line 17) | String getId();
method getName (line 23) | String getName();
method getTokenId (line 29) | String getTokenId();
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTHelper.java
class JWTHelper (line 14) | public class JWTHelper {
method generateToken (line 25) | public static String generateToken(IJWTInfo jwtInfo, String priKeyPath...
method generateToken (line 45) | public static String generateToken(IJWTInfo jwtInfo, byte priKey[], in...
method parserToken (line 64) | public static Jws<Claims> parserToken(String token, String pubKeyPath)...
method parserToken (line 75) | public static Jws<Claims> parserToken(String token, byte[] pubKey) thr...
method getInfoFromToken (line 87) | public static IJWTInfo getInfoFromToken(String token, String pubKeyPat...
method getInfoFromToken (line 100) | public static IJWTInfo getInfoFromToken(String token, byte[] pubKey) t...
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTInfo.java
class JWTInfo (line 10) | public class JWTInfo implements Serializable,IJWTInfo {
method JWTInfo (line 16) | public JWTInfo(String username, String userId, String name) {
method JWTInfo (line 23) | public JWTInfo(String username, String userId, String name,String toke...
method getUniqueName (line 30) | @Override
method setUsername (line 35) | public void setUsername(String username) {
method getId (line 39) | @Override
method setUserId (line 44) | public void setUserId(String userId) {
method getName (line 48) | @Override
method getTokenId (line 53) | @Override
method setTokenId (line 59) | public void setTokenId(String tokenId) {
method setName (line 63) | public void setName(String name) {
method equals (line 67) | @Override
method hashCode (line 85) | @Override
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/RsaKeyHelper.java
class RsaKeyHelper (line 19) | public class RsaKeyHelper {
method getPublicKey (line 27) | public PublicKey getPublicKey(String filename) throws Exception {
method getPrivateKey (line 45) | public PrivateKey getPrivateKey(String filename) throws Exception {
method getPublicKey (line 63) | public PublicKey getPublicKey(byte[] publicKey) throws Exception {
method getPrivateKey (line 76) | public PrivateKey getPrivateKey(byte[] privateKey) throws Exception {
method generateKey (line 91) | public void generateKey(String publicKeyFilename, String privateKeyFil...
method generatePublicKey (line 113) | public static byte[] generatePublicKey(String password) throws IOExcep...
method generatePrivateKey (line 128) | public static byte[] generatePrivateKey(String password) throws IOExce...
method generateKey (line 136) | public static Map<String, byte[]> generateKey(String password) throws ...
method toHexString (line 149) | public static String toHexString(byte[] b) {
method toBytes (line 153) | public static final byte[] toBytes(String s) throws IOException {
method main (line 157) | public static void main(String[] args) throws NoSuchAlgorithmException {
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/TreeNode.java
class TreeNode (line 8) | public class TreeNode {
method getChildren (line 12) | public List<TreeNode> getChildren() {
method setChildren (line 16) | public void setChildren(List<TreeNode> children) {
method getId (line 22) | public int getId() {
method setId (line 26) | public void setId(int id) {
method getParentId (line 30) | public int getParentId() {
method setParentId (line 34) | public void setParentId(int parentId) {
method add (line 38) | public void add(TreeNode node){
FILE: ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/web/ParameterRequestWrapper.java
class ParameterRequestWrapper (line 21) | public class ParameterRequestWrapper extends HttpServletRequestWrapper {
method ParameterRequestWrapper (line 25) | public ParameterRequestWrapper(HttpServletRequest request, Map newPara...
method getParameterMap (line 30) | @Override
method getParameterNames (line 35) | @Override
method getParameterValues (line 41) | @Override
method getParameter (line 55) | @Override
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/GatewayServerBootstrap.java
class GatewayServerBootstrap (line 13) | @SpringCloudApplication
method main (line 18) | public static void main(String[] args) {
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/config/GatewayConfig.java
class GatewayConfig (line 24) | @Configuration
method restTemplate (line 27) | @LoadBalanced
method feignDecoder (line 33) | @Bean
method feignHttpMessageConverter (line 38) | public ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
class GateWayMappingJackson2HttpMessageConverter (line 48) | public class GateWayMappingJackson2HttpMessageConverter extends Mappin...
method GateWayMappingJackson2HttpMessageConverter (line 49) | GateWayMappingJackson2HttpMessageConverter(){
method loadBalancedWebClientBuilder (line 56) | @Bean
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
class AccessGatewayFilter (line 47) | @Configuration
method filter (line 70) | @Override
method getVoidMono (line 128) | @NotNull
method setCurrentUserInfoAndLog (line 137) | private void setCurrentUserInfoAndLog(ServerWebExchange serverWebExcha...
method getJWTUser (line 150) | private IJWTInfo getJWTUser(ServerHttpRequest request, ServerHttpReque...
method isStartWith (line 179) | private boolean isStartWith(String requestUri) {
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/handler/RequestBodyRoutePredicateFactory.java
class RequestBodyRoutePredicateFactory (line 44) | @Slf4j
method RequestBodyRoutePredicateFactory (line 52) | public RequestBodyRoutePredicateFactory() {
method RequestBodyRoutePredicateFactory (line 57) | public RequestBodyRoutePredicateFactory(List<HttpMessageReader<?>> mes...
method applyAsync (line 64) | @Override
method apply (line 94) | @Override
class Config (line 100) | public static class Config {
method getSources (line 103) | public List<String> getSources() {
method setSources (line 107) | public RequestBodyRoutePredicateFactory.Config setSources(List<Strin...
method setSources (line 112) | public RequestBodyRoutePredicateFactory.Config setSources(String... ...
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogService.java
type LogService (line 9) | public interface LogService {
method saveLog (line 10) | void saveLog(LogInfo info);
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogServiceImpl.java
class LogServiceImpl (line 15) | @Component
method saveLog (line 22) | @Override
FILE: ace-gate/src/main/java/com/github/wxiaoqi/security/gate/utils/DBLog.java
class DBLog (line 18) | @Slf4j
method getLogService (line 23) | public LogService getLogService() {
method setLogService (line 27) | public DBLog setLogService(LogService logService) {
method getInstance (line 35) | public static synchronized DBLog getInstance() {
method DBLog (line 42) | private DBLog() {
method offerQueue (line 46) | public void offerQueue(LogInfo logInfo) {
method run (line 54) | @Override
FILE: ace-infrastructure/ace-monitor/src/main/java/com/github/wxiaoqi/security/monitor/MonitorBootstrap.java
class MonitorBootstrap (line 14) | @SpringBootApplication
method main (line 18) | public static void main(String[] args) {
FILE: ace-infrastructure/ace-nacos/db/init_nacos.sql
type `config_info` (line 27) | CREATE TABLE `config_info` (
type `config_info_aggr` (line 59) | CREATE TABLE `config_info_aggr` (
type `config_info_beta` (line 76) | CREATE TABLE `config_info_beta` (
type `config_info_tag` (line 97) | CREATE TABLE `config_info_tag` (
type `config_tags_relation` (line 118) | CREATE TABLE `config_tags_relation` (
type `group_capacity` (line 135) | CREATE TABLE `group_capacity` (
type `his_config_info` (line 154) | CREATE TABLE `his_config_info` (
type `roles` (line 185) | CREATE TABLE `roles` (
type `tenant_capacity` (line 201) | CREATE TABLE `tenant_capacity` (
type `tenant_info` (line 220) | CREATE TABLE `tenant_info` (
type `users` (line 238) | CREATE TABLE `users` (
FILE: ace-infrastructure/ace-nacos/nacos/conf/nacos-mysql.sql
type `config_info` (line 5) | CREATE TABLE `config_info` (
type `config_info_aggr` (line 30) | CREATE TABLE `config_info_aggr` (
type `config_info_beta` (line 48) | CREATE TABLE `config_info_beta` (
type `config_info_tag` (line 69) | CREATE TABLE `config_info_tag` (
type `config_tags_relation` (line 90) | CREATE TABLE `config_tags_relation` (
type `group_capacity` (line 107) | CREATE TABLE `group_capacity` (
type `his_config_info` (line 126) | CREATE TABLE `his_config_info` (
type `tenant_capacity` (line 151) | CREATE TABLE `tenant_capacity` (
type `tenant_info` (line 167) | CREATE TABLE `tenant_info` (
type users (line 181) | CREATE TABLE users (
type roles (line 187) | CREATE TABLE roles (
FILE: ace-infrastructure/ace-nacos/nacos/conf/schema.sql
type config_info (line 3) | CREATE TABLE config_info (
type configinfo_dataid_key_idx (line 23) | CREATE INDEX configinfo_dataid_key_idx ON config_info(data_id)
type configinfo_groupid_key_idx (line 24) | CREATE INDEX configinfo_groupid_key_idx ON config_info(group_id)
type configinfo_dataid_group_key_idx (line 25) | CREATE INDEX configinfo_dataid_group_key_idx ON config_info(data_id, gro...
type his_config_info (line 27) | CREATE TABLE his_config_info (
type hisconfiginfo_dataid_key_idx (line 43) | CREATE INDEX hisconfiginfo_dataid_key_idx ON his_config_info(data_id)
type hisconfiginfo_gmt_create_idx (line 44) | CREATE INDEX hisconfiginfo_gmt_create_idx ON his_config_info(gmt_create)
type hisconfiginfo_gmt_modified_idx (line 45) | CREATE INDEX hisconfiginfo_gmt_modified_idx ON his_config_info(gmt_modif...
type config_info_beta (line 48) | CREATE TABLE config_info_beta (
type config_info_tag (line 64) | CREATE TABLE config_info_tag (
type config_info_aggr (line 80) | CREATE TABLE config_info_aggr (
type app_list (line 92) | CREATE TABLE app_list (
type app_configdata_relation_subs (line 102) | CREATE TABLE app_configdata_relation_subs (
type app_configdata_relation_pubs (line 112) | CREATE TABLE app_configdata_relation_pubs (
type config_tags_relation (line 121) | CREATE TABLE config_tags_relation (
type config_tags_tenant_id_idx (line 132) | CREATE INDEX config_tags_tenant_id_idx ON config_tags_relation(tenant_id)
type group_capacity (line 134) | CREATE TABLE group_capacity (
type tenant_capacity (line 148) | CREATE TABLE tenant_capacity (
type tenant_info (line 162) | CREATE TABLE tenant_info (
type tenant_info_tenant_id_idx (line 173) | CREATE INDEX tenant_info_tenant_id_idx ON tenant_info(tenant_id)
type users (line 175) | CREATE TABLE users (
type roles (line 181) | CREATE TABLE roles (
FILE: ace-modules/ace-admin/db/init.sql
type `base_element` (line 27) | CREATE TABLE `base_element` (
type `base_group` (line 57) | CREATE TABLE `base_group` (
type `base_group_leader` (line 89) | CREATE TABLE `base_group_leader` (
type `base_group_member` (line 119) | CREATE TABLE `base_group_member` (
type `base_group_type` (line 148) | CREATE TABLE `base_group_type` (
type `base_menu` (line 177) | CREATE TABLE `base_menu` (
type `base_resource_authority` (line 213) | CREATE TABLE `base_resource_authority` (
type `base_user` (line 242) | CREATE TABLE `base_user` (
type `gate_log` (line 280) | CREATE TABLE `gate_log` (
type `auth_client` (line 300) | CREATE TABLE `auth_client` (
type `auth_client_service` (line 331) | CREATE TABLE `auth_client_service` (
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/AdminBootstrap.java
class AdminBootstrap (line 18) | @EnableDiscoveryClient
method main (line 26) | public static void main(String[] args) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/KeyConfiguration.java
class KeyConfiguration (line 11) | @Configuration
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/RedisConfiguration.java
class RedisConfiguration (line 19) | @Configuration
method redisTemplate (line 22) | @Bean
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/UserConfiguration.java
class UserConfiguration (line 11) | @Configuration
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/WebConfiguration.java
class WebConfiguration (line 19) | @Configuration("admimWebConfig")
method getGlobalExceptionHandler (line 22) | @Bean
method addInterceptors (line 27) | @Override
method getUserAuthRestInterceptor (line 32) | @Bean
method getIncludePathPatterns (line 42) | private ArrayList<String> getIncludePathPatterns() {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/ElementBiz.java
class ElementBiz (line 17) | @Service
method getAuthorityElementByUserId (line 20) | public List<Element> getAuthorityElementByUserId(String userId){
method getAuthorityElementByUserId (line 23) | public List<Element> getAuthorityElementByUserId(String userId,String ...
method getAllElementPermissions (line 27) | public List<Element> getAllElementPermissions(){
method insertSelective (line 31) | @Override
method updateSelectiveById (line 36) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GateLogBiz.java
class GateLogBiz (line 15) | @Service
method insert (line 19) | @Override
method insertSelective (line 24) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GroupBiz.java
class GroupBiz (line 28) | @Service
method insertSelective (line 38) | @Override
method updateById (line 49) | @Override
method getGroupUsers (line 66) | public GroupUsers getGroupUsers(int groupId) {
method modifyGroupUsers (line 77) | public void modifyGroupUsers(int groupId, String members, String leade...
method modifyAuthorityMenu (line 100) | public void modifyAuthorityMenu(int groupId, String[] menus) {
method findParentID (line 122) | private void findParentID(Map<String, String> map, Set<String> relatio...
method modifyAuthorityElement (line 138) | public void modifyAuthorityElement(int groupId, int menuId, int elemen...
method removeAuthorityElement (line 153) | public void removeAuthorityElement(int groupId, int menuId, int elemen...
method getAuthorityMenu (line 168) | public List<AuthorityMenuTree> getAuthorityMenu(int groupId) {
method getAuthorityElement (line 187) | public List<Integer> getAuthorityElement(int groupId) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GroupTypeBiz.java
class GroupTypeBiz (line 16) | @Service
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/MenuBiz.java
class MenuBiz (line 18) | @Service
method selectListAll (line 21) | @Override
method insertSelective (line 26) | @Override
method updateById (line 37) | @Override
method updateSelectiveById (line 48) | @Override
method getUserAuthorityMenuByUserId (line 59) | public List<Menu> getUserAuthorityMenuByUserId(int id) {
method getUserAuthoritySystemByUserId (line 69) | public List<Menu> getUserAuthoritySystemByUserId(int id) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/ResourceAuthorityBiz.java
class ResourceAuthorityBiz (line 12) | @Service
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/UserBiz.java
class UserBiz (line 16) | @Service
method insertSelective (line 22) | @Override
method updateSelectiveById (line 29) | @Override
method getUserByUsername (line 39) | public User getUserByUsername(String username){
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/constant/AdminCommonConstant.java
class AdminCommonConstant (line 9) | public class AdminCommonConstant {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Element.java
class Element (line 6) | @Table(name = "base_element")
method getId (line 62) | public Integer getId() {
method setId (line 69) | public void setId(Integer id) {
method getCode (line 76) | public String getCode() {
method setCode (line 83) | public void setCode(String code) {
method getType (line 90) | public String getType() {
method setType (line 97) | public void setType(String type) {
method getName (line 104) | public String getName() {
method setName (line 111) | public void setName(String name) {
method getUri (line 118) | public String getUri() {
method setUri (line 125) | public void setUri(String uri) {
method getMenuId (line 132) | public String getMenuId() {
method setMenuId (line 139) | public void setMenuId(String menuId) {
method getParentId (line 146) | public String getParentId() {
method setParentId (line 153) | public void setParentId(String parentId) {
method getPath (line 160) | public String getPath() {
method setPath (line 167) | public void setPath(String path) {
method getMethod (line 174) | public String getMethod() {
method setMethod (line 181) | public void setMethod(String method) {
method getDescription (line 188) | public String getDescription() {
method setDescription (line 195) | public void setDescription(String description) {
method getCrtTime (line 202) | public Date getCrtTime() {
method setCrtTime (line 209) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 216) | public String getCrtUser() {
method setCrtUser (line 223) | public void setCrtUser(String crtUser) {
method getCrtName (line 230) | public String getCrtName() {
method setCrtName (line 237) | public void setCrtName(String crtName) {
method getCrtHost (line 244) | public String getCrtHost() {
method setCrtHost (line 251) | public void setCrtHost(String crtHost) {
method getAttr1 (line 258) | public String getAttr1() {
method setAttr1 (line 265) | public void setAttr1(String attr1) {
method getAttr2 (line 272) | public String getAttr2() {
method setAttr2 (line 279) | public void setAttr2(String attr2) {
method getAttr3 (line 286) | public String getAttr3() {
method setAttr3 (line 293) | public void setAttr3(String attr3) {
method getAttr4 (line 300) | public String getAttr4() {
method setAttr4 (line 307) | public void setAttr4(String attr4) {
method getAttr5 (line 314) | public String getAttr5() {
method setAttr5 (line 321) | public void setAttr5(String attr5) {
method getAttr6 (line 328) | public String getAttr6() {
method setAttr6 (line 335) | public void setAttr6(String attr6) {
method getAttr7 (line 342) | public String getAttr7() {
method setAttr7 (line 349) | public void setAttr7(String attr7) {
method getAttr8 (line 356) | public String getAttr8() {
method setAttr8 (line 363) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/GateLog.java
class GateLog (line 10) | @Table(name = "gate_log")
method getId (line 39) | public Integer getId() {
method setId (line 46) | public void setId(Integer id) {
method getMenu (line 53) | public String getMenu() {
method setMenu (line 60) | public void setMenu(String menu) {
method getUri (line 68) | public String getUri() {
method setUri (line 75) | public void setUri(String uri) {
method getCrtTime (line 81) | public Date getCrtTime() {
method setCrtTime (line 88) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 95) | public String getCrtUser() {
method setCrtUser (line 102) | public void setCrtUser(String crtUser) {
method getCrtName (line 109) | public String getCrtName() {
method setCrtName (line 116) | public void setCrtName(String crtName) {
method getCrtHost (line 123) | public String getCrtHost() {
method setCrtHost (line 130) | public void setCrtHost(String crtHost) {
method getOpt (line 134) | public String getOpt() {
method setOpt (line 138) | public void setOpt(String opt) {
method getBody (line 142) | public String getBody() {
method setBody (line 146) | public void setBody(String body) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Group.java
class Group (line 8) | @Table(name = "base_group")
method getId (line 72) | public Integer getId() {
method setId (line 79) | public void setId(Integer id) {
method getCode (line 86) | public String getCode() {
method setCode (line 93) | public void setCode(String code) {
method getName (line 100) | public String getName() {
method setName (line 107) | public void setName(String name) {
method getParentId (line 114) | public Integer getParentId() {
method setParentId (line 121) | public void setParentId(Integer parentId) {
method getPath (line 128) | public String getPath() {
method setPath (line 135) | public void setPath(String path) {
method getType (line 142) | public String getType() {
method setType (line 149) | public void setType(String type) {
method getGroupType (line 156) | public Integer getGroupType() {
method setGroupType (line 163) | public void setGroupType(Integer groupType) {
method getDescription (line 170) | public String getDescription() {
method setDescription (line 177) | public void setDescription(String description) {
method getCrtTime (line 184) | public Date getCrtTime() {
method setCrtTime (line 191) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 198) | public String getCrtUser() {
method setCrtUser (line 205) | public void setCrtUser(String crtUser) {
method getCrtName (line 212) | public String getCrtName() {
method setCrtName (line 219) | public void setCrtName(String crtName) {
method getCrtHost (line 226) | public String getCrtHost() {
method setCrtHost (line 233) | public void setCrtHost(String crtHost) {
method getUpdTime (line 240) | public Date getUpdTime() {
method setUpdTime (line 247) | public void setUpdTime(Date updTime) {
method getUpdUser (line 254) | public String getUpdUser() {
method setUpdUser (line 261) | public void setUpdUser(String updUser) {
method getUpdName (line 268) | public String getUpdName() {
method setUpdName (line 275) | public void setUpdName(String updName) {
method getUpdHost (line 282) | public String getUpdHost() {
method setUpdHost (line 289) | public void setUpdHost(String updHost) {
method getAttr1 (line 296) | public String getAttr1() {
method setAttr1 (line 303) | public void setAttr1(String attr1) {
method getAttr2 (line 310) | public String getAttr2() {
method setAttr2 (line 317) | public void setAttr2(String attr2) {
method getAttr3 (line 324) | public String getAttr3() {
method setAttr3 (line 331) | public void setAttr3(String attr3) {
method getAttr4 (line 338) | public String getAttr4() {
method setAttr4 (line 345) | public void setAttr4(String attr4) {
method getAttr5 (line 352) | public String getAttr5() {
method setAttr5 (line 359) | public void setAttr5(String attr5) {
method getAttr6 (line 366) | public String getAttr6() {
method setAttr6 (line 373) | public void setAttr6(String attr6) {
method getAttr7 (line 380) | public String getAttr7() {
method setAttr7 (line 387) | public void setAttr7(String attr7) {
method getAttr8 (line 394) | public String getAttr8() {
method setAttr8 (line 401) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/GroupType.java
class GroupType (line 6) | @Table(name = "base_group_type")
method getId (line 60) | public Integer getId() {
method setId (line 67) | public void setId(Integer id) {
method getCode (line 74) | public String getCode() {
method setCode (line 81) | public void setCode(String code) {
method getName (line 88) | public String getName() {
method setName (line 95) | public void setName(String name) {
method getDescription (line 102) | public String getDescription() {
method setDescription (line 109) | public void setDescription(String description) {
method getCrtTime (line 116) | public Date getCrtTime() {
method setCrtTime (line 123) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 130) | public String getCrtUser() {
method setCrtUser (line 137) | public void setCrtUser(String crtUser) {
method getCrtName (line 144) | public String getCrtName() {
method setCrtName (line 151) | public void setCrtName(String crtName) {
method getCrtHost (line 158) | public String getCrtHost() {
method setCrtHost (line 165) | public void setCrtHost(String crtHost) {
method getUpdTime (line 172) | public Date getUpdTime() {
method setUpdTime (line 179) | public void setUpdTime(Date updTime) {
method getUpdUser (line 186) | public String getUpdUser() {
method setUpdUser (line 193) | public void setUpdUser(String updUser) {
method getUpdName (line 200) | public String getUpdName() {
method setUpdName (line 207) | public void setUpdName(String updName) {
method getUpdHost (line 214) | public String getUpdHost() {
method setUpdHost (line 221) | public void setUpdHost(String updHost) {
method getAttr1 (line 228) | public String getAttr1() {
method setAttr1 (line 235) | public void setAttr1(String attr1) {
method getAttr2 (line 242) | public String getAttr2() {
method setAttr2 (line 249) | public void setAttr2(String attr2) {
method getAttr3 (line 256) | public String getAttr3() {
method setAttr3 (line 263) | public void setAttr3(String attr3) {
method getAttr4 (line 270) | public String getAttr4() {
method setAttr4 (line 277) | public void setAttr4(String attr4) {
method getAttr5 (line 284) | public String getAttr5() {
method setAttr5 (line 291) | public void setAttr5(String attr5) {
method getAttr6 (line 298) | public String getAttr6() {
method setAttr6 (line 305) | public void setAttr6(String attr6) {
method getAttr7 (line 312) | public String getAttr7() {
method setAttr7 (line 319) | public void setAttr7(String attr7) {
method getAttr8 (line 326) | public String getAttr8() {
method setAttr8 (line 333) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Menu.java
class Menu (line 8) | @Table(name = "base_menu")
method getId (line 73) | public Integer getId() {
method setId (line 80) | public void setId(Integer id) {
method getCode (line 87) | public String getCode() {
method setCode (line 94) | public void setCode(String code) {
method getTitle (line 101) | public String getTitle() {
method setTitle (line 108) | public void setTitle(String title) {
method getParentId (line 115) | public Integer getParentId() {
method setParentId (line 122) | public void setParentId(Integer parentId) {
method getHref (line 129) | public String getHref() {
method setHref (line 136) | public void setHref(String href) {
method getIcon (line 143) | public String getIcon() {
method setIcon (line 150) | public void setIcon(String icon) {
method getType (line 157) | public String getType() {
method setType (line 164) | public void setType(String type) {
method getDescription (line 171) | public String getDescription() {
method setDescription (line 178) | public void setDescription(String description) {
method getCrtTime (line 185) | public Date getCrtTime() {
method setCrtTime (line 192) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 199) | public String getCrtUser() {
method setCrtUser (line 206) | public void setCrtUser(String crtUser) {
method getCrtName (line 213) | public String getCrtName() {
method setCrtName (line 220) | public void setCrtName(String crtName) {
method getCrtHost (line 227) | public String getCrtHost() {
method setCrtHost (line 234) | public void setCrtHost(String crtHost) {
method getUpdTime (line 241) | public Date getUpdTime() {
method setUpdTime (line 248) | public void setUpdTime(Date updTime) {
method getUpdUser (line 255) | public String getUpdUser() {
method setUpdUser (line 262) | public void setUpdUser(String updUser) {
method getUpdName (line 269) | public String getUpdName() {
method setUpdName (line 276) | public void setUpdName(String updName) {
method getUpdHost (line 283) | public String getUpdHost() {
method setUpdHost (line 290) | public void setUpdHost(String updHost) {
method getAttr1 (line 297) | public String getAttr1() {
method setAttr1 (line 304) | public void setAttr1(String attr1) {
method getAttr2 (line 311) | public String getAttr2() {
method setAttr2 (line 318) | public void setAttr2(String attr2) {
method getAttr3 (line 325) | public String getAttr3() {
method setAttr3 (line 332) | public void setAttr3(String attr3) {
method getAttr4 (line 339) | public String getAttr4() {
method setAttr4 (line 346) | public void setAttr4(String attr4) {
method getAttr5 (line 353) | public String getAttr5() {
method setAttr5 (line 360) | public void setAttr5(String attr5) {
method getAttr6 (line 367) | public String getAttr6() {
method setAttr6 (line 374) | public void setAttr6(String attr6) {
method getAttr7 (line 381) | public String getAttr7() {
method setAttr7 (line 388) | public void setAttr7(String attr7) {
method getAttr8 (line 395) | public String getAttr8() {
method setAttr8 (line 402) | public void setAttr8(String attr8) {
method getPath (line 409) | public String getPath() {
method setPath (line 416) | public void setPath(String path) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/OnlineLog.java
class OnlineLog (line 10) | @Data
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/ResourceAuthority.java
class ResourceAuthority (line 6) | @Table(name = "base_resource_authority")
method ResourceAuthority (line 58) | public ResourceAuthority(String authorityType, String resourceType) {
method ResourceAuthority (line 63) | public ResourceAuthority() {
method getId (line 69) | public Integer getId() {
method setId (line 76) | public void setId(Integer id) {
method getAuthorityId (line 83) | public String getAuthorityId() {
method setAuthorityId (line 90) | public void setAuthorityId(String authorityId) {
method getAuthorityType (line 97) | public String getAuthorityType() {
method setAuthorityType (line 104) | public void setAuthorityType(String authorityType) {
method getResourceId (line 111) | public String getResourceId() {
method setResourceId (line 118) | public void setResourceId(String resourceId) {
method getResourceType (line 125) | public String getResourceType() {
method setResourceType (line 132) | public void setResourceType(String resourceType) {
method getParentId (line 139) | public String getParentId() {
method setParentId (line 146) | public void setParentId(String parentId) {
method getPath (line 153) | public String getPath() {
method setPath (line 160) | public void setPath(String path) {
method getDescription (line 167) | public String getDescription() {
method setDescription (line 174) | public void setDescription(String description) {
method getCrtTime (line 181) | public Date getCrtTime() {
method setCrtTime (line 188) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 195) | public String getCrtUser() {
method setCrtUser (line 202) | public void setCrtUser(String crtUser) {
method getCrtName (line 209) | public String getCrtName() {
method setCrtName (line 216) | public void setCrtName(String crtName) {
method getCrtHost (line 223) | public String getCrtHost() {
method setCrtHost (line 230) | public void setCrtHost(String crtHost) {
method getAttr1 (line 237) | public String getAttr1() {
method setAttr1 (line 244) | public void setAttr1(String attr1) {
method getAttr2 (line 251) | public String getAttr2() {
method setAttr2 (line 258) | public void setAttr2(String attr2) {
method getAttr3 (line 265) | public String getAttr3() {
method setAttr3 (line 272) | public void setAttr3(String attr3) {
method getAttr4 (line 279) | public String getAttr4() {
method setAttr4 (line 286) | public void setAttr4(String attr4) {
method getAttr5 (line 293) | public String getAttr5() {
method setAttr5 (line 300) | public void setAttr5(String attr5) {
method getAttr6 (line 307) | public String getAttr6() {
method setAttr6 (line 314) | public void setAttr6(String attr6) {
method getAttr7 (line 321) | public String getAttr7() {
method setAttr7 (line 328) | public void setAttr7(String attr7) {
method getAttr8 (line 335) | public String getAttr8() {
method setAttr8 (line 342) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/User.java
class User (line 6) | @Table(name = "base_user")
method getId (line 78) | public Integer getId() {
method setId (line 85) | public void setId(Integer id) {
method getUsername (line 92) | public String getUsername() {
method setUsername (line 99) | public void setUsername(String username) {
method getPassword (line 106) | public String getPassword() {
method setPassword (line 113) | public void setPassword(String password) {
method getName (line 120) | public String getName() {
method setName (line 127) | public void setName(String name) {
method getBirthday (line 134) | public String getBirthday() {
method setBirthday (line 141) | public void setBirthday(String birthday) {
method getAddress (line 148) | public String getAddress() {
method setAddress (line 155) | public void setAddress(String address) {
method getMobilePhone (line 162) | public String getMobilePhone() {
method setMobilePhone (line 169) | public void setMobilePhone(String mobilePhone) {
method getTelPhone (line 176) | public String getTelPhone() {
method setTelPhone (line 183) | public void setTelPhone(String telPhone) {
method getEmail (line 190) | public String getEmail() {
method setEmail (line 197) | public void setEmail(String email) {
method getSex (line 204) | public String getSex() {
method setSex (line 211) | public void setSex(String sex) {
method getType (line 218) | public String getType() {
method setType (line 225) | public void setType(String type) {
method getDescription (line 232) | public String getDescription() {
method setDescription (line 239) | public void setDescription(String description) {
method getCrtTime (line 246) | public Date getCrtTime() {
method setCrtTime (line 253) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 260) | public String getCrtUser() {
method setCrtUser (line 267) | public void setCrtUser(String crtUser) {
method getCrtName (line 274) | public String getCrtName() {
method setCrtName (line 281) | public void setCrtName(String crtName) {
method getCrtHost (line 288) | public String getCrtHost() {
method setCrtHost (line 295) | public void setCrtHost(String crtHost) {
method getUpdTime (line 302) | public Date getUpdTime() {
method setUpdTime (line 309) | public void setUpdTime(Date updTime) {
method getUpdUser (line 316) | public String getUpdUser() {
method setUpdUser (line 323) | public void setUpdUser(String updUser) {
method getUpdName (line 330) | public String getUpdName() {
method setUpdName (line 337) | public void setUpdName(String updName) {
method getUpdHost (line 344) | public String getUpdHost() {
method setUpdHost (line 351) | public void setUpdHost(String updHost) {
method getAttr1 (line 358) | public String getAttr1() {
method setAttr1 (line 365) | public void setAttr1(String attr1) {
method getAttr2 (line 372) | public String getAttr2() {
method setAttr2 (line 379) | public void setAttr2(String attr2) {
method getAttr3 (line 386) | public String getAttr3() {
method setAttr3 (line 393) | public void setAttr3(String attr3) {
method getAttr4 (line 400) | public String getAttr4() {
method setAttr4 (line 407) | public void setAttr4(String attr4) {
method getAttr5 (line 414) | public String getAttr5() {
method setAttr5 (line 421) | public void setAttr5(String attr5) {
method getAttr6 (line 428) | public String getAttr6() {
method setAttr6 (line 435) | public void setAttr6(String attr6) {
method getAttr7 (line 442) | public String getAttr7() {
method setAttr7 (line 449) | public void setAttr7(String attr7) {
method getAttr8 (line 456) | public String getAttr8() {
method setAttr8 (line 463) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/ElementMapper.java
type ElementMapper (line 9) | public interface ElementMapper extends Mapper<Element> {
method selectAuthorityElementByUserId (line 10) | public List<Element> selectAuthorityElementByUserId(@Param("userId")St...
method selectAuthorityMenuElementByUserId (line 11) | public List<Element> selectAuthorityMenuElementByUserId(@Param("userId...
method selectAuthorityElementByClientId (line 12) | public List<Element> selectAuthorityElementByClientId(@Param("clientId...
method selectAllElementPermissions (line 13) | public List<Element> selectAllElementPermissions();
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GateLogMapper.java
type GateLogMapper (line 6) | public interface GateLogMapper extends Mapper<GateLog> {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GroupMapper.java
type GroupMapper (line 7) | public interface GroupMapper extends Mapper<Group> {
method deleteGroupMembersById (line 8) | public void deleteGroupMembersById (@Param("groupId") int groupId);
method deleteGroupLeadersById (line 9) | public void deleteGroupLeadersById (@Param("groupId") int groupId);
method insertGroupMembersById (line 10) | public void insertGroupMembersById (@Param("groupId") int groupId,@Par...
method insertGroupLeadersById (line 11) | public void insertGroupLeadersById (@Param("groupId") int groupId,@Par...
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GroupTypeMapper.java
type GroupTypeMapper (line 6) | public interface GroupTypeMapper extends Mapper<GroupType> {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/MenuMapper.java
type MenuMapper (line 9) | public interface MenuMapper extends Mapper<Menu> {
method selectMenuByAuthorityId (line 10) | public List<Menu> selectMenuByAuthorityId(@Param("authorityId") String...
method selectAuthorityMenuByUserId (line 17) | public List<Menu> selectAuthorityMenuByUserId (@Param("userId") int us...
method selectAuthoritySystemByUserId (line 24) | public List<Menu> selectAuthoritySystemByUserId (@Param("userId") int ...
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/ResourceAuthorityMapper.java
type ResourceAuthorityMapper (line 7) | public interface ResourceAuthorityMapper extends Mapper<ResourceAuthorit...
method deleteByAuthorityIdAndResourceType (line 8) | public void deleteByAuthorityIdAndResourceType(@Param("authorityId")St...
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/UserMapper.java
type UserMapper (line 9) | public interface UserMapper extends Mapper<User> {
method selectMemberByGroupId (line 10) | public List<User> selectMemberByGroupId(@Param("groupId") int groupId);
method selectLeaderByGroupId (line 11) | public List<User> selectLeaderByGroupId(@Param("groupId") int groupId);
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/ElementController.java
class ElementController (line 26) | @Controller
method page (line 32) | @RequestMapping(value = "/list", method = RequestMethod.GET)
method getAuthorityElement (line 46) | @RequestMapping(value = "/user", method = RequestMethod.GET)
method getAuthorityElement (line 54) | @RequestMapping(value = "/user/menu", method = RequestMethod.GET)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GateLogController.java
class GateLogController (line 22) | @Controller
method page (line 25) | @RequestMapping(value = "/pageByOrder",method = RequestMethod.GET)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GroupController.java
class GroupController (line 33) | @Controller
method list (line 40) | @RequestMapping(value = "/list", method = RequestMethod.GET)
method modifiyUsers (line 59) | @RequestMapping(value = "/{id}/user", method = RequestMethod.PUT)
method getUsers (line 66) | @RequestMapping(value = "/{id}/user", method = RequestMethod.GET)
method modifyMenuAuthority (line 72) | @RequestMapping(value = "/{id}/authority/menu", method = RequestMethod...
method getMenuAuthority (line 80) | @RequestMapping(value = "/{id}/authority/menu", method = RequestMethod...
method addElementAuthority (line 86) | @RequestMapping(value = "/{id}/authority/element/add", method = Reques...
method removeElementAuthority (line 93) | @RequestMapping(value = "/{id}/authority/element/remove", method = Req...
method getElementAuthority (line 100) | @RequestMapping(value = "/{id}/authority/element", method = RequestMet...
method tree (line 107) | @RequestMapping(value = "/tree", method = RequestMethod.GET)
method getTree (line 124) | private List<GroupTree> getTree(List<Group> groups,int root) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GroupTypeController.java
class GroupTypeController (line 16) | @Controller
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/MenuController.java
class MenuController (line 30) | @Controller
method list (line 36) | @RequestMapping(value = "/list", method = RequestMethod.GET)
method getTree (line 46) | @RequestMapping(value = "/tree", method = RequestMethod.GET)
method getSystem (line 58) | @RequestMapping(value = "/system", method = RequestMethod.GET)
method listMenu (line 66) | @RequestMapping(value = "/menuTree", method = RequestMethod.GET)
method listAuthorityMenu (line 84) | @RequestMapping(value = "/authorityTree", method = RequestMethod.GET)
method listUserAuthorityMenu (line 98) | @RequestMapping(value = "/user/authorityTree", method = RequestMethod....
method listUserAuthoritySystem (line 112) | @RequestMapping(value = "/user/system", method = RequestMethod.GET)
method getMenuTree (line 119) | private List<MenuTree> getMenuTree(List<Menu> menus,int root) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/UserController.java
class UserController (line 28) | @RestController
method getUserInfo (line 37) | @RequestMapping(value = "/front/info", method = RequestMethod.GET)
method getUserInfoV2 (line 48) | @RequestMapping(value = "/v2/front/info", method = RequestMethod.GET)
method getMenusByUsername (line 55) | @RequestMapping(value = "/front/menus", method = RequestMethod.GET)
method getAllMenus (line 61) | @RequestMapping(value = "/front/menu/all", method = RequestMethod.GET)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/LogRest.java
class LogRest (line 19) | @RequestMapping("/api")
method saveLog (line 26) | @RequestMapping(value = "/log/save", method = RequestMethod.POST)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/UserRest.java
class UserRest (line 18) | @RestController
method getAllPermission (line 24) | @RequestMapping(value = "/permissions", method = RequestMethod.GET)
method getPermissionByUsername (line 30) | @RequestMapping(value = "/user/{username}/permissions", method = Reque...
method checkUserPermission (line 36) | @RequestMapping(value = "/user/{username}/check_permission", method = ...
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/service/PermissionService.java
class PermissionService (line 39) | @Service
method getUserByUsername (line 54) | public UserInfo getUserByUsername(String username) {
method validate (line 62) | public UserInfo validate(String username, String password) {
method getAllPermission (line 72) | public List<PermissionInfo> getAllPermission() {
method menu2permission (line 88) | private void menu2permission(List<Menu> menus, List<PermissionInfo> re...
method getPermissionByUsername (line 110) | public List<PermissionInfo> getPermissionByUsername(String username) {
method element2permission (line 128) | private void element2permission(List<PermissionInfo> result, List<Elem...
method getMenuTree (line 143) | private List<MenuTree> getMenuTree(List<Menu> menus, int root) {
method getUserInfoV2 (line 154) | public FrontUserV2 getUserInfoV2() {
method getUserInfo (line 230) | public FrontUser getUserInfo(String token) throws Exception {
method getMenusByUsername (line 250) | public List<MenuTree> getMenusByUsername(String token) throws Exception {
method checkUserPermission (line 260) | public Mono<CheckPermissionInfo> checkUserPermission(String username, ...
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/util/Sha256PasswordEncoder.java
class Sha256PasswordEncoder (line 36) | public class Sha256PasswordEncoder implements PasswordEncoder {
method encode (line 38) | @Override
method matches (line 49) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessInterface.java
class AccessInterface (line 9) | @Data
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessMenuTree.java
class AccessMenuTree (line 17) | @Data
method setChildren (line 25) | @Override
method add (line 31) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessRouteTree.java
class AccessRouteTree (line 18) | @Data
method setChildren (line 36) | @Override
method add (line 42) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AuthorityMenuTree.java
class AuthorityMenuTree (line 16) | public class AuthorityMenuTree extends TreeNode implements Serializable{
method getIcon (line 21) | public String getIcon() {
method setIcon (line 25) | public void setIcon(String icon) {
method AuthorityMenuTree (line 29) | public AuthorityMenuTree(String text, List<AuthorityMenuTree> nodes) {
method AuthorityMenuTree (line 34) | public AuthorityMenuTree() {
method getText (line 37) | public String getText() {
method setText (line 41) | public void setText(String text) {
method getNodes (line 45) | public List<AuthorityMenuTree> getNodes() {
method setNodes (line 49) | public void setNodes(List<AuthorityMenuTree> nodes) {
method setChildren (line 53) | @Override
method add (line 59) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/FrontUser.java
class FrontUser (line 10) | public class FrontUser {
method getImage (line 20) | public String getImage() {
method setImage (line 24) | public void setImage(String image) {
method getId (line 30) | public String getId() {
method setId (line 34) | public void setId(String id) {
method getUsername (line 38) | public String getUsername() {
method setUsername (line 42) | public void setUsername(String username) {
method getName (line 46) | public String getName() {
method setName (line 50) | public void setName(String name) {
method getDescription (line 54) | public String getDescription() {
method setDescription (line 58) | public void setDescription(String description) {
method getMenus (line 61) | public List<PermissionInfo> getMenus() {
method setMenus (line 65) | public void setMenus(List<PermissionInfo> menus) {
method getElements (line 69) | public List<PermissionInfo> getElements() {
method setElements (line 73) | public void setElements(List<PermissionInfo> elements) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/FrontUserV2.java
class FrontUserV2 (line 11) | @Data
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/GroupTree.java
class GroupTree (line 11) | public class GroupTree extends TreeNode {
method getLabel (line 14) | public String getLabel() {
method setLabel (line 18) | public void setLabel(String label) {
method getName (line 24) | public String getName() {
method setName (line 28) | public void setName(String name) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/GroupUsers.java
class GroupUsers (line 10) | public class GroupUsers {
method GroupUsers (line 14) | public GroupUsers() {
method GroupUsers (line 17) | public GroupUsers(List<User> members, List<User> leaders) {
method getMembers (line 22) | public List<User> getMembers() {
method setMembers (line 26) | public void setMembers(List<User> members) {
method getLeaders (line 30) | public List<User> getLeaders() {
method setLeaders (line 34) | public void setLeaders(List<User> leaders) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/MenuTree.java
class MenuTree (line 8) | public class MenuTree extends TreeNode {
method getCode (line 20) | public String getCode() {
method setCode (line 24) | public void setCode(String code) {
method getPath (line 28) | public String getPath() {
method setPath (line 32) | public void setPath(String path) {
method getComponent (line 36) | public String getComponent() {
method setComponent (line 40) | public void setComponent(String component) {
method getAuthority (line 44) | public String getAuthority() {
method setAuthority (line 48) | public void setAuthority(String authority) {
method getRedirect (line 52) | public String getRedirect() {
method setRedirect (line 56) | public void setRedirect(String redirect) {
method getLabel (line 60) | public String getLabel() {
method setLabel (line 64) | public void setLabel(String label) {
method MenuTree (line 70) | public MenuTree() {
method MenuTree (line 73) | public MenuTree(int id, String name, int parentId) {
method MenuTree (line 79) | public MenuTree(int id, String name, MenuTree parent) {
method getIcon (line 85) | public String getIcon() {
method setIcon (line 89) | public void setIcon(String icon) {
method getTitle (line 93) | public String getTitle() {
method setTitle (line 97) | public void setTitle(String title) {
method getHref (line 101) | public String getHref() {
method setHref (line 105) | public void setHref(String href) {
method isSpread (line 109) | public boolean isSpread() {
method setSpread (line 113) | public void setSpread(boolean spread) {
method getType (line 117) | public String getType() {
method setType (line 121) | public void setType(String type) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/bean/ClientInfo.java
class ClientInfo (line 9) | public class ClientInfo implements IJWTInfo {
method ClientInfo (line 13) | public ClientInfo(String clientId, String name, String id) {
method setId (line 19) | public void setId(String id) {
method getClientId (line 24) | public String getClientId() {
method setClientId (line 28) | public void setClientId(String clientId) {
method setName (line 32) | public void setName(String name) {
method getUniqueName (line 36) | @Override
method getId (line 41) | @Override
method getName (line 46) | @Override
method getTokenId (line 51) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/biz/ClientBiz.java
class ClientBiz (line 21) | @Service
method getClientServices (line 28) | public List<Client> getClientServices(int id) {
method modifyClientServices (line 32) | public void modifyClientServices(int id, String clients) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/biz/ClientServiceBiz.java
class ClientServiceBiz (line 12) | @Service
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/AuthController.java
class AuthController (line 21) | @RestController
method createAuthenticationToken (line 37) | @RequestMapping(value = "token", method = RequestMethod.POST)
method refreshAndGetAuthenticationToken (line 55) | @RequestMapping(value = "refresh", method = RequestMethod.GET)
method verify (line 63) | @RequestMapping(value = "verify", method = RequestMethod.GET)
method logout (line 69) | @RequestMapping(value = "logout", method = RequestMethod.DELETE)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/CaptchaController.java
class CaptchaController (line 26) | @RestController
method captcha (line 33) | @RequestMapping("/captcha")
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/ClientController.java
class ClientController (line 17) | @RestController
method getAllowedClient (line 28) | @RequestMapping(value = "/myClient")
method getUserPublicKey (line 34) | @RequestMapping(value = "/userPubKey",method = RequestMethod.POST)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/OnlineController.java
class OnlineController (line 23) | @RestController
method getOnlineInfo (line 30) | @RequestMapping("/page")
method forceLogout (line 48) | @RequestMapping("/{id}")
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/ServiceController.java
class ServiceController (line 15) | @RestController
method modifyUsers (line 19) | @RequestMapping(value = "/{id}/client", method = RequestMethod.PUT)
method getUsers (line 26) | @RequestMapping(value = "/{id}/client", method = RequestMethod.GET)
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/entity/Client.java
class Client (line 8) | @Table(name = "auth_client")
method getId (line 66) | public Integer getId() {
method setId (line 73) | public void setId(Integer id) {
method getCode (line 80) | public String getCode() {
method setCode (line 87) | public void setCode(String code) {
method getSecret (line 94) | public String getSecret() {
method setSecret (line 101) | public void setSecret(String secret) {
method getName (line 108) | public String getName() {
method setName (line 115) | public void setName(String name) {
method getLocked (line 122) | public String getLocked() {
method setLocked (line 129) | public void setLocked(String locked) {
method getDescription (line 136) | public String getDescription() {
method setDescription (line 143) | public void setDescription(String description) {
method getCrtTime (line 150) | public Date getCrtTime() {
method setCrtTime (line 157) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 164) | public String getCrtUser() {
method setCrtUser (line 171) | public void setCrtUser(String crtUser) {
method getCrtName (line 178) | public String getCrtName() {
method setCrtName (line 185) | public void setCrtName(String crtName) {
method getCrtHost (line 192) | public String getCrtHost() {
method setCrtHost (line 199) | public void setCrtHost(String crtHost) {
method getUpdTime (line 206) | public Date getUpdTime() {
method setUpdTime (line 213) | public void setUpdTime(Date updTime) {
method getUpdUser (line 220) | public String getUpdUser() {
method setUpdUser (line 227) | public void setUpdUser(String updUser) {
method getUpdName (line 234) | public String getUpdName() {
method setUpdName (line 241) | public void setUpdName(String updName) {
method getUpdHost (line 248) | public String getUpdHost() {
method setUpdHost (line 255) | public void setUpdHost(String updHost) {
method getAttr1 (line 262) | public String getAttr1() {
method setAttr1 (line 269) | public void setAttr1(String attr1) {
method getAttr2 (line 276) | public String getAttr2() {
method setAttr2 (line 283) | public void setAttr2(String attr2) {
method getAttr3 (line 290) | public String getAttr3() {
method setAttr3 (line 297) | public void setAttr3(String attr3) {
method getAttr4 (line 304) | public String getAttr4() {
method setAttr4 (line 311) | public void setAttr4(String attr4) {
method getAttr5 (line 318) | public String getAttr5() {
method setAttr5 (line 325) | public void setAttr5(String attr5) {
method getAttr6 (line 332) | public String getAttr6() {
method setAttr6 (line 339) | public void setAttr6(String attr6) {
method getAttr7 (line 346) | public String getAttr7() {
method setAttr7 (line 353) | public void setAttr7(String attr7) {
method getAttr8 (line 360) | public String getAttr8() {
method setAttr8 (line 367) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/entity/ClientService.java
class ClientService (line 8) | @Table(name = "auth_client_service")
method getId (line 52) | public Integer getId() {
method setId (line 59) | public void setId(Integer id) {
method getServiceId (line 66) | public String getServiceId() {
method setServiceId (line 73) | public void setServiceId(String serviceId) {
method getClientId (line 80) | public String getClientId() {
method setClientId (line 87) | public void setClientId(String clientId) {
method getDescription (line 94) | public String getDescription() {
method setDescription (line 101) | public void setDescription(String description) {
method getCrtTime (line 108) | public Date getCrtTime() {
method setCrtTime (line 115) | public void setCrtTime(Date crtTime) {
method getCrtUser (line 122) | public String getCrtUser() {
method setCrtUser (line 129) | public void setCrtUser(String crtUser) {
method getCrtName (line 136) | public String getCrtName() {
method setCrtName (line 143) | public void setCrtName(String crtName) {
method getCrtHost (line 150) | public String getCrtHost() {
method setCrtHost (line 157) | public void setCrtHost(String crtHost) {
method getAttr1 (line 164) | public String getAttr1() {
method setAttr1 (line 171) | public void setAttr1(String attr1) {
method getAttr2 (line 178) | public String getAttr2() {
method setAttr2 (line 185) | public void setAttr2(String attr2) {
method getAttr3 (line 192) | public String getAttr3() {
method setAttr3 (line 199) | public void setAttr3(String attr3) {
method getAttr4 (line 206) | public String getAttr4() {
method setAttr4 (line 213) | public void setAttr4(String attr4) {
method getAttr5 (line 220) | public String getAttr5() {
method setAttr5 (line 227) | public void setAttr5(String attr5) {
method getAttr6 (line 234) | public String getAttr6() {
method setAttr6 (line 241) | public void setAttr6(String attr6) {
method getAttr7 (line 248) | public String getAttr7() {
method setAttr7 (line 255) | public void setAttr7(String attr7) {
method getAttr8 (line 262) | public String getAttr8() {
method setAttr8 (line 269) | public void setAttr8(String attr8) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/interceptor/UserAuthRestInterceptor.java
class UserAuthRestInterceptor (line 20) | public class UserAuthRestInterceptor extends HandlerInterceptorAdapter {
method preHandle (line 27) | @Override
method afterCompletion (line 47) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/mapper/ClientMapper.java
type ClientMapper (line 8) | public interface ClientMapper extends Mapper<Client> {
method selectAllowedClient (line 17) | List<String> selectAllowedClient(String serviceId);
method selectAuthorityServiceInfo (line 19) | List<Client> selectAuthorityServiceInfo(int clientId);
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/mapper/ClientServiceMapper.java
type ClientServiceMapper (line 6) | public interface ClientServiceMapper extends Mapper<ClientService> {
method deleteByServiceId (line 7) | void deleteByServiceId(int id);
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/runner/AuthServerRunner.java
class AuthServerRunner (line 16) | @Configuration
method run (line 26) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/service/AuthClientService.java
type AuthClientService (line 9) | public interface AuthClientService {
method getAllowedClient (line 17) | public List<String> getAllowedClient(String serviceId, String secret);
method getAllowedClient (line 24) | public List<String> getAllowedClient(String serviceId);
method registryClient (line 26) | public void registryClient();
method validate (line 28) | public void validate(String clientId, String secret) throws Exception;
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/service/AuthService.java
type AuthService (line 8) | public interface AuthService {
method login (line 9) | Map login(JwtAuthenticationRequest authenticationRequest) throws Excep...
method refresh (line 10) | String refresh(String oldToken) throws Exception;
method validate (line 11) | void validate(String token) throws Exception;
method logout (line 13) | void logout(String token) throws Exception;
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/service/impl/AuthServiceImpl.java
class AuthServiceImpl (line 29) | @Service
method login (line 45) | @Override
method validate (line 61) | @Override
method refresh (line 66) | @Override
method logout (line 71) | @Override
method writeOnlineLog (line 79) | @Async
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/service/impl/DBAuthClientService.java
class DBAuthClientService (line 21) | @Service
method DBAuthClientService (line 29) | @Autowired
method getClient (line 35) | private Client getClient(String clientId, String secret) {
method validate (line 45) | @Override
method getAllowedClient (line 55) | @Override
method getAllowedClient (line 65) | @Override
method getClient (line 75) | private Client getClient(String clientId) {
method registryClient (line 82) | @Override
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/util/user/JwtAuthenticationRequest.java
class JwtAuthenticationRequest (line 5) | public class JwtAuthenticationRequest implements Serializable {
method JwtAuthenticationRequest (line 14) | public JwtAuthenticationRequest(String username, String password, Stri...
method JwtAuthenticationRequest (line 21) | public JwtAuthenticationRequest() {
method getPassword (line 24) | public String getPassword() {
method setPassword (line 28) | public void setPassword(String password) {
method getUsername (line 32) | public String getUsername() {
method setUsername (line 36) | public void setUsername(String username) {
method getVerCode (line 40) | public String getVerCode() {
method setVerCode (line 44) | public void setVerCode(String verCode) {
method getUuid (line 48) | public String getUuid() {
method setUuid (line 52) | public void setUuid(String uuid) {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/util/user/JwtAuthenticationResponse.java
class JwtAuthenticationResponse (line 5) | public class JwtAuthenticationResponse implements Serializable {
method JwtAuthenticationResponse (line 10) | public JwtAuthenticationResponse(String token) {
method getToken (line 14) | public String getToken() {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/util/user/JwtTokenUtil.java
class JwtTokenUtil (line 14) | @Component
method generateToken (line 25) | public String generateToken(IJWTInfo jwtInfo) throws Exception {
method getInfoFromToken (line 29) | public IJWTInfo getInfoFromToken(String token) throws Exception {
FILE: ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/vo/FrontUser.java
class FrontUser (line 10) | public class FrontUser {
method getImage (line 18) | public String getImage() {
method setImage (line 22) | public void setImage(String image) {
method getId (line 28) | public String getId() {
method setId (line 32) | public void setId(String id) {
method getUsername (line 36) | public String getUsername() {
method setUsername (line 40) | public void setUsername(String username) {
method getName (line 44) | public String getName() {
method setName (line 48) | public void setName(String name) {
method getDescription (line 52) | public String getDescription() {
method setDescription (line 56) | public void setDescription(String description) {
method getMenus (line 59) | public List<PermissionInfo> getMenus() {
method setMenus (line 63) | public void setMenus(List<PermissionInfo> menus) {
method getElements (line 67) | public List<PermissionInfo> getElements() {
method setElements (line 71) | public void setElements(List<PermissionInfo> elements) {
FILE: ace-modules/ace-generator/src/main/db/cloud_sample.sql
type `sample_data_test` (line 27) | CREATE TABLE `sample_data_test` (
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/GeneratorServerBootstrap.java
class GeneratorServerBootstrap (line 12) | @SpringCloudApplication
method main (line 16) | public static void main(String[] args) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/config/DataSourceConfigurer.java
class DataSourceConfigurer (line 14) | @Configuration
method sampleDatasource (line 17) | @Bean("Sample数据库")
method adminDatasource (line 24) | @Bean("Admin数据库")
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/config/DynamicDataSource.java
class DynamicDataSource (line 19) | public class DynamicDataSource extends AbstractRoutingDataSource {
method determineCurrentLookupKey (line 32) | @Override
method setTargetDataSources (line 42) | @Override
method getDataSourceMap (line 53) | public Map<Object, Object> getDataSourceMap() {
method getInstance (line 61) | public static synchronized DynamicDataSource getInstance(){
method isExistDataSource (line 77) | public static boolean isExistDataSource(String key) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/config/DynamicDataSourceContextHolder.java
class DynamicDataSourceContextHolder (line 10) | public class DynamicDataSourceContextHolder {
method setDataSourceKey (line 31) | public static synchronized void setDataSourceKey(String key) {
method getDataSourceKey (line 40) | public static String getDataSourceKey() {
method clearDataSourceKey (line 47) | public static void clearDataSourceKey() {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/config/DynamicDatasourceConfig.java
class DynamicDatasourceConfig (line 20) | @Configuration
method dynamicDataSource (line 32) | @Bean
method transactionManager (line 56) | @Bean
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/config/SwitchDB.java
class SwitchDB (line 14) | @Configuration
method change (line 31) | public String change(String dbName) {
method toDB (line 44) | private void toDB(String dbName) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/entity/ColumnEntity.java
class ColumnEntity (line 33) | public class ColumnEntity {
method getColumnName (line 50) | public String getColumnName() {
method setColumnName (line 53) | public void setColumnName(String columnName) {
method getDataType (line 56) | public String getDataType() {
method setDataType (line 59) | public void setDataType(String dataType) {
method getComments (line 62) | public String getComments() {
method setComments (line 65) | public void setComments(String comments) {
method getAttrname (line 68) | public String getAttrname() {
method setAttrname (line 71) | public void setAttrname(String attrname) {
method getAttrName (line 74) | public String getAttrName() {
method setAttrName (line 77) | public void setAttrName(String attrName) {
method getAttrType (line 80) | public String getAttrType() {
method setAttrType (line 83) | public void setAttrType(String attrType) {
method getExtra (line 86) | public String getExtra() {
method setExtra (line 89) | public void setExtra(String extra) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/entity/TableEntity.java
class TableEntity (line 35) | public class TableEntity {
method getTableName (line 50) | public String getTableName() {
method setTableName (line 53) | public void setTableName(String tableName) {
method getComments (line 56) | public String getComments() {
method setComments (line 59) | public void setComments(String comments) {
method getPk (line 62) | public ColumnEntity getPk() {
method setPk (line 65) | public void setPk(ColumnEntity pk) {
method getColumns (line 68) | public List<ColumnEntity> getColumns() {
method setColumns (line 71) | public void setColumns(List<ColumnEntity> columns) {
method getClassName (line 74) | public String getClassName() {
method setClassName (line 77) | public void setClassName(String className) {
method getClassname (line 80) | public String getClassname() {
method setClassname (line 83) | public void setClassname(String classname) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/mapper/GeneratorMapper.java
type GeneratorMapper (line 36) | public interface GeneratorMapper {
method queryList (line 38) | List<Map<String, Object>> queryList(Map<String, Object> map);
method queryTotal (line 40) | int queryTotal(Map<String, Object> map);
method queryTable (line 42) | Map<String, String> queryTable(String tableName);
method queryColumns (line 44) | List<Map<String, String>> queryColumns(String tableName);
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/rest/GeneratorRest.java
class GeneratorRest (line 48) | @Controller
method getDbList (line 64) | @ResponseBody
method list (line 73) | @ResponseBody
method code (line 87) | @RequestMapping("/build")
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/service/GeneratorService.java
class GeneratorService (line 46) | @Service
method queryList (line 51) | public List<Map<String, Object>> queryList(Query query) {
method queryTotal (line 59) | public int queryTotal(Map<String, Object> map) {
method queryTable (line 63) | public Map<String, String> queryTable(String tableName) {
method queryColumns (line 67) | public List<Map<String, String>> queryColumns(String tableName) {
method generatorCode (line 71) | public byte[] generatorCode(String[] tableNames, String path, String m...
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/utils/DateUtils.java
class DateUtils (line 29) | public class DateUtils {
method format (line 35) | public static String format(Date date) {
method format (line 39) | public static String format(Date date, String pattern) {
FILE: ace-modules/ace-generator/src/main/java/com/github/wxiaoqi/security/generator/utils/GeneratorUtils.java
class GeneratorUtils (line 52) | public class GeneratorUtils {
method getTemplates (line 54) | public static List<String> getTemplates() {
method generatorCode (line 69) | public static void generatorCode(Map<String, String> table,
method columnToJava (line 161) | public static String columnToJava(String columnName) {
method tableToJava (line 168) | public static String tableToJava(String tableName, String tablePrefix) {
method getConfig (line 178) | public static Configuration getConfig() {
method getFileName (line 189) | public static String getFileName(String template, String className, St...
method toLowerCaseFirstOne (line 224) | public static String toLowerCaseFirstOne(String s) {
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/SampleBootstrap.java
class SampleBootstrap (line 17) | @EnableDiscoveryClient
method main (line 26) | public static void main(String[] args) {
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/biz/SampleDataTestBiz.java
class SampleDataTestBiz (line 15) | @Service
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/config/WebConfiguration.java
class WebConfiguration (line 14) | @Configuration("admimWebConfig")
method getGlobalExceptionHandler (line 17) | @Bean
method addInterceptors (line 22) | @Override
method getUserAuthRestInterceptor (line 30) | @Bean
method getIncludePathPatterns (line 39) | private ArrayList<String> getIncludePathPatterns() {
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/entity/SampleDataTest.java
class SampleDataTest (line 17) | @Table(name = "sample_data_test")
method setId (line 65) | public void setId(Integer id) {
method getId (line 71) | public Integer getId() {
method setName (line 77) | public void setName(String name) {
method getName (line 83) | public String getName() {
method setDepartId (line 89) | public void setDepartId(String departId) {
method getDepartId (line 95) | public String getDepartId() {
method setCrtUserName (line 101) | public void setCrtUserName(String crtUserName) {
method getCrtUserName (line 107) | public String getCrtUserName() {
method setCrtUserId (line 113) | public void setCrtUserId(String crtUserId) {
method getCrtUserId (line 119) | public String getCrtUserId() {
method setCrtTime (line 125) | public void setCrtTime(Date crtTime) {
method getCrtTime (line 131) | public Date getCrtTime() {
method setUpdUserName (line 137) | public void setUpdUserName(String updUserName) {
method getUpdUserName (line 143) | public String getUpdUserName() {
method setUpdUserId (line 149) | public void setUpdUserId(String updUserId) {
method getUpdUserId (line 155) | public String getUpdUserId() {
method setUpdTime (line 161) | public void setUpdTime(Date updTime) {
method getUpdTime (line 167) | public Date getUpdTime() {
method setTenantId (line 173) | public void setTenantId(String tenantId) {
method getTenantId (line 179) | public String getTenantId() {
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/mapper/SampleDataTestMapper.java
type SampleDataTestMapper (line 13) | public interface SampleDataTestMapper extends Mapper<SampleDataTest> {
FILE: ace-modules/ace-sample/src/main/java/com/github/wxiaoqi/security/sample/rest/SampleDataTestController.java
class SampleDataTestController (line 12) | @RestController
method whoAmI (line 15) | @GetMapping("/who")
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/ToolBootstrap.java
class ToolBootstrap (line 37) | @SpringBootApplication
method main (line 40) | public static void main(String[] args) {
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/config/CloudStorageConfig.java
class CloudStorageConfig (line 38) | @Configuration
method getType (line 86) | public Integer getType() {
method setType (line 90) | public void setType(Integer type) {
method getQiniuDomain (line 94) | public String getQiniuDomain() {
method setQiniuDomain (line 98) | public void setQiniuDomain(String qiniuDomain) {
method getQiniuAccessKey (line 102) | public String getQiniuAccessKey() {
method setQiniuAccessKey (line 106) | public void setQiniuAccessKey(String qiniuAccessKey) {
method getQiniuSecretKey (line 110) | public String getQiniuSecretKey() {
method setQiniuSecretKey (line 114) | public void setQiniuSecretKey(String qiniuSecretKey) {
method getQiniuBucketName (line 118) | public String getQiniuBucketName() {
method setQiniuBucketName (line 122) | public void setQiniuBucketName(String qiniuBucketName) {
method getQiniuPrefix (line 126) | public String getQiniuPrefix() {
method setQiniuPrefix (line 130) | public void setQiniuPrefix(String qiniuPrefix) {
method getAliyunDomain (line 134) | public String getAliyunDomain() {
method setAliyunDomain (line 138) | public void setAliyunDomain(String aliyunDomain) {
method getAliyunPrefix (line 142) | public String getAliyunPrefix() {
method setAliyunPrefix (line 146) | public void setAliyunPrefix(String aliyunPrefix) {
method getAliyunEndPoint (line 150) | public String getAliyunEndPoint() {
method setAliyunEndPoint (line 154) | public void setAliyunEndPoint(String aliyunEndPoint) {
method getAliyunAccessKeyId (line 158) | public String getAliyunAccessKeyId() {
method setAliyunAccessKeyId (line 162) | public void setAliyunAccessKeyId(String aliyunAccessKeyId) {
method getAliyunAccessKeySecret (line 166) | public String getAliyunAccessKeySecret() {
method setAliyunAccessKeySecret (line 170) | public void setAliyunAccessKeySecret(String aliyunAccessKeySecret) {
method getAliyunBucketName (line 174) | public String getAliyunBucketName() {
method setAliyunBucketName (line 178) | public void setAliyunBucketName(String aliyunBucketName) {
method getQcloudDomain (line 182) | public String getQcloudDomain() {
method setQcloudDomain (line 186) | public void setQcloudDomain(String qcloudDomain) {
method getQcloudPrefix (line 190) | public String getQcloudPrefix() {
method setQcloudPrefix (line 194) | public void setQcloudPrefix(String qcloudPrefix) {
method getQcloudAppId (line 198) | public Integer getQcloudAppId() {
method setQcloudAppId (line 202) | public void setQcloudAppId(Integer qcloudAppId) {
method getQcloudSecretId (line 206) | public String getQcloudSecretId() {
method setQcloudSecretId (line 210) | public void setQcloudSecretId(String qcloudSecretId) {
method getQcloudSecretKey (line 214) | public String getQcloudSecretKey() {
method setQcloudSecretKey (line 218) | public void setQcloudSecretKey(String qcloudSecretKey) {
method getQcloudBucketName (line 222) | public String getQcloudBucketName() {
method setQcloudBucketName (line 226) | public void setQcloudBucketName(String qcloudBucketName) {
method getQcloudRegion (line 230) | public String getQcloudRegion() {
method setQcloudRegion (line 234) | public void setQcloudRegion(String qcloudRegion) {
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/config/LuceneConfiguration.java
class LuceneConfiguration (line 42) | @Configuration
method luceneUtil (line 47) | @Bean
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/cloud/AliyunCloudStorageService.java
class AliyunCloudStorageService (line 39) | public class AliyunCloudStorageService extends CloudStorageService {
method AliyunCloudStorageService (line 42) | public AliyunCloudStorageService(CloudStorageConfig config){
method init (line 49) | private void init(){
method upload (line 54) | @Override
method upload (line 59) | @Override
method uploadSuffix (line 70) | @Override
method uploadSuffix (line 75) | @Override
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/cloud/CloudStorageService.java
class CloudStorageService (line 39) | public abstract class CloudStorageService {
method getPath (line 49) | public String getPath(String prefix, String suffix) {
method upload (line 67) | public abstract String upload(byte[] data, String path);
method uploadSuffix (line 75) | public abstract String uploadSuffix(byte[] data, String suffix);
method upload (line 83) | public abstract String upload(InputStream inputStream, String path);
method uploadSuffix (line 91) | public abstract String uploadSuffix(InputStream inputStream, String su...
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/cloud/OSSFactory.java
class OSSFactory (line 38) | @Component
method build (line 43) | public CloudStorageService build() {
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/cloud/QcloudCloudStorageService.java
class QcloudCloudStorageService (line 45) | public class QcloudCloudStorageService extends CloudStorageService {
method QcloudCloudStorageService (line 48) | public QcloudCloudStorageService(CloudStorageConfig config){
method init (line 55) | private void init(){
method upload (line 67) | @Override
method upload (line 85) | @Override
method uploadSuffix (line 95) | @Override
method uploadSuffix (line 100) | @Override
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/cloud/QiniuCloudStorageService.java
class QiniuCloudStorageService (line 44) | public class QiniuCloudStorageService extends CloudStorageService {
method QiniuCloudStorageService (line 48) | public QiniuCloudStorageService(CloudStorageConfig config){
method init (line 55) | private void init(){
method upload (line 61) | @Override
method upload (line 75) | @Override
method uploadSuffix (line 85) | @Override
method uploadSuffix (line 90) | @Override
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/constants/OSSConstant.java
class OSSConstant (line 32) | public class OSSConstant {
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/oss/controller/OssController.java
class OssController (line 43) | @RestController
method upload (line 51) | @RequestMapping("/upload")
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/controller/SearchController.java
class SearchController (line 41) | @RestController
method search (line 47) | @RequestMapping(value = "/w/{word}", method = RequestMethod.GET)
method createIndexObject (line 52) | @RequestMapping(value = "/index", method = RequestMethod.POST)
method removeIndexObject (line 58) | @RequestMapping(value = "/index", method = RequestMethod.DELETE)
method batchCreateIndexObject (line 64) | @RequestMapping(value = "/index", method = RequestMethod.PATCH)
method updateIndexObject (line 72) | @RequestMapping(value = "/index", method = RequestMethod.PUT)
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/lucene/LuceneDao.java
class LuceneDao (line 59) | public class LuceneDao {
method setIndexDer (line 67) | public void setIndexDer(String indexDer) {
method getAnalyzer (line 71) | public Analyzer getAnalyzer() {
method getDirectory (line 78) | public Directory getDirectory() throws IOException {
method create (line 89) | public void create(IndexObject indexObject) {
method deleteAll (line 115) | public void deleteAll() {
method update (line 141) | public void update(IndexObject indexObject) {
method page (line 169) | public TableResultResponse<IndexObject> page(Integer pageNumber, Integ...
method getLastScoreDoc (line 208) | private ScoreDoc getLastScoreDoc(Integer pageNumber,Integer pageSize,Q...
method addStringHighlighter (line 219) | private Highlighter addStringHighlighter(Query query){
method delete (line 229) | public void delete(IndexObject indexObject) {
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/lucene/util/DocumentUtil.java
class DocumentUtil (line 45) | public class DocumentUtil {
method IndexObject2Document (line 47) | public static Document IndexObject2Document(IndexObject indexObject) {
method document2IndexObject (line 58) | public static IndexObject document2IndexObject(Analyzer analyzer, Hig...
method stringFormatHighlighterOut (line 72) | private static String stringFormatHighlighterOut(Analyzer analyzer, Hi...
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/lucene/util/IKAnalyzer5x.java
class IKAnalyzer5x (line 30) | public class IKAnalyzer5x extends Analyzer{
method useSmart (line 34) | public boolean useSmart() {
method setUseSmart (line 38) | public void setUseSmart(boolean useSmart) {
method IKAnalyzer5x (line 47) | public IKAnalyzer5x(){
method IKAnalyzer5x (line 56) | public IKAnalyzer5x(boolean useSmart){
method createComponents (line 74) | @Override
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/lucene/util/IKTokenizer5x.java
class IKTokenizer5x (line 37) | public class IKTokenizer5x extends Tokenizer{
method IKTokenizer5x (line 55) | public IKTokenizer5x(boolean useSmart){
method incrementToken (line 64) | @Override
method reset (line 89) | @Override
method end (line 95) | @Override
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/lucene/util/QueryUtil.java
class QueryUtil (line 41) | public class QueryUtil {
method queryStringFilter (line 43) | private static String queryStringFilter(String query) {
method query (line 48) | public static Query query(String query, Analyzer analyzer, String... f...
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/service/LuceneService.java
type LuceneService (line 36) | public interface LuceneService {
method save (line 38) | void save(IndexObject indexObject);
method update (line 40) | void update(IndexObject indexObject);
method delete (line 42) | void delete(IndexObject indexObject);
method deleteAll (line 44) | void deleteAll();
method page (line 46) | TableResultResponse page(Integer pageNumber, Integer pageSize, String ...
FILE: ace-modules/ace-tool/src/main/java/com/github/wxiaoqi/search/service/impl/LuceneServiceImpl.java
class LuceneServiceImpl (line 42) | @Service
method save (line 49) | @Override
method update (line 55) | @Override
method delete (line 60) | @Override
method deleteAll (line 65) | @Override
method page (line 70) | @Override
FILE: alibaba-base/nacos.sql
type `config_info` (line 5) | CREATE TABLE `config_info` (
type `config_info_aggr` (line 30) | CREATE TABLE `config_info_aggr` (
type `config_info_beta` (line 48) | CREATE TABLE `config_info_beta` (
type `config_info_tag` (line 69) | CREATE TABLE `config_info_tag` (
type `config_tags_relation` (line 90) | CREATE TABLE `config_tags_relation` (
type `group_capacity` (line 107) | CREATE TABLE `group_capacity` (
type `his_config_info` (line 126) | CREATE TABLE `his_config_info` (
type `tenant_capacity` (line 151) | CREATE TABLE `tenant_capacity` (
type `tenant_info` (line 167) | CREATE TABLE `tenant_info` (
Condensed preview — 294 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,742K chars).
[
{
"path": ".gitignore",
"chars": 129,
"preview": "*/target\n*.iml\n/.idea\n*.class\ntarget/\n.project\n.settings/\n.classpath\nace-modules/ace-tool/src/main/resources/application"
},
{
"path": "LICENSE",
"chars": 22664,
"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": 2731,
"preview": "### Cloud-Platform\r\n\r\nCloud-Platform是国内首个基于`Spring \r\nCloud`微`服务`化`开发平台`,具有统一授权、认证后台管理系统,其中包含具备用户管理、资源权限管理、网关API\r\n管理等多个模块"
},
{
"path": "ace-api/pom.xml",
"chars": 716,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/CheckPermissionInfo.java",
"chars": 302,
"preview": "package com.github.wxiaoqi.security.api.vo.authority;\n\nimport lombok.Data;\n\nimport java.util.function.Consumer;\n\n/**\n * "
},
{
"path": "ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/authority/PermissionInfo.java",
"chars": 1223,
"preview": "package com.github.wxiaoqi.security.api.vo.authority;\r\n\r\nimport java.io.Serializable;\r\n\r\n/**\r\n * ${DESCRIPTION}\r\n *\r\n * "
},
{
"path": "ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/log/LogInfo.java",
"chars": 2073,
"preview": "package com.github.wxiaoqi.security.api.vo.log;\r\n\r\nimport java.io.Serializable;\r\nimport java.util.Date;\r\n\r\n/**\r\n * ${DES"
},
{
"path": "ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/search/IndexObject.java",
"chars": 2599,
"preview": "/*\n *\n * * Copyright (C) 2018 the sun<463540703@qq.com>\n *\n * * AG-Enterprise 企业版源码\n * * 郑重声明:\n * * 如果你从其他途径获取到"
},
{
"path": "ace-api/src/main/java/com/github/wxiaoqi/security/api/vo/user/UserInfo.java",
"chars": 1328,
"preview": "package com.github.wxiaoqi.security.api.vo.user;\r\n\r\nimport java.io.Serializable;\r\nimport java.util.Date;\r\n\r\n/**\r\n * ${DE"
},
{
"path": "ace-dev-base/ace-auth-sdk/pom.xml",
"chars": 1375,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/EnableAceAuthClient.java",
"chars": 478,
"preview": "package com.github.wxiaoqi.security.auth.client;\n\nimport com.github.wxiaoqi.security.auth.client.configuration.AutoConfi"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/annotation/IgnoreUserToken.java",
"chars": 400,
"preview": "package com.github.wxiaoqi.security.auth.client.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.a"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/FeignOkHttpConfig.java",
"chars": 1296,
"preview": "package com.github.wxiaoqi.security.auth.client.config;\n\nimport com.github.wxiaoqi.security.auth.client.interceptor.OkHt"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/ServiceAuthConfig.java",
"chars": 1021,
"preview": "package com.github.wxiaoqi.security.auth.client.config;\n\nimport org.springframework.beans.factory.annotation.Value;\n\nimp"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/config/UserAuthConfig.java",
"chars": 799,
"preview": "package com.github.wxiaoqi.security.auth.client.config;\n\nimport org.springframework.beans.factory.annotation.Value;\n\nimp"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/configuration/AutoConfiguration.java",
"chars": 729,
"preview": "package com.github.wxiaoqi.security.auth.client.configuration;\n\nimport com.github.wxiaoqi.security.auth.client.config.Se"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtIllegalArgumentException.java",
"chars": 238,
"preview": "package com.github.wxiaoqi.security.auth.client.exception;\n\n/**\n * Created by ace on 2017/9/15.\n */\npublic class JwtIlle"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtSignatureException.java",
"chars": 231,
"preview": "package com.github.wxiaoqi.security.auth.client.exception;\n\n/**\n *\n * @author ace\n * @date 2017/9/15\n */\npublic class Jw"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/exception/JwtTokenExpiredException.java",
"chars": 232,
"preview": "package com.github.wxiaoqi.security.auth.client.exception;\n\n/**\n * Created by ace on 2017/9/15.\n */\npublic class JwtToke"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/feign/ServiceAuthFeign.java",
"chars": 721,
"preview": "package com.github.wxiaoqi.security.auth.client.feign;\n\nimport com.github.wxiaoqi.security.common.msg.ObjectRestResponse"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/OkHttpTokenInterceptor.java",
"chars": 1755,
"preview": "package com.github.wxiaoqi.security.auth.client.interceptor;\n\nimport com.github.wxiaoqi.security.auth.client.config.User"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/interceptor/UserAuthRestInterceptor.java",
"chars": 2717,
"preview": "package com.github.wxiaoqi.security.auth.client.interceptor;\n\nimport com.github.wxiaoqi.security.auth.client.annotation."
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/jwt/UserAuthUtil.java",
"chars": 1204,
"preview": "package com.github.wxiaoqi.security.auth.client.jwt;\n\nimport com.github.wxiaoqi.security.auth.client.config.UserAuthConf"
},
{
"path": "ace-dev-base/ace-auth-sdk/src/main/java/com/github/wxiaoqi/security/auth/client/runner/AuthClientRunner.java",
"chars": 1739,
"preview": "package com.github.wxiaoqi.security.auth.client.runner;\n\nimport com.github.wxiaoqi.security.auth.client.config.ServiceAu"
},
{
"path": "ace-dev-base/ace-common/pom.xml",
"chars": 3143,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/biz/BaseBiz.java",
"chars": 2910,
"preview": "package com.github.wxiaoqi.security.common.biz;\n\nimport com.github.pagehelper.Page;\nimport com.github.pagehelper.PageHel"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/CommonConstants.java",
"chars": 1261,
"preview": "package com.github.wxiaoqi.security.common.constant;\n\n/**\n * Created by ace on 2017/8/29.\n */\npublic class CommonConstan"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RedisKeyConstant.java",
"chars": 437,
"preview": "package com.github.wxiaoqi.security.common.constant;\n\n/**\n * @author Ths Sun\n * @create 2020/7/26.\n */\npublic class Redi"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/RestCodeConstants.java",
"chars": 242,
"preview": "package com.github.wxiaoqi.security.common.constant;\n\n/**\n * Created by ace on 2017/8/23.\n */\npublic class RestCodeConst"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/constant/UserConstant.java",
"chars": 204,
"preview": "package com.github.wxiaoqi.security.common.constant;\n\n/**\n * ${DESCRIPTION}\n *\n * @author the sun\n * @create 2017-06-14 "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/context/BaseContextHandler.java",
"chars": 3621,
"preview": "package com.github.wxiaoqi.security.common.context;\n\nimport com.github.wxiaoqi.security.common.constant.CommonConstants;"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/BaseException.java",
"chars": 904,
"preview": "package com.github.wxiaoqi.security.common.exception;\n\n/**\n * Created by ace on 2017/9/8.\n */\npublic class BaseException"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientForbiddenException.java",
"chars": 428,
"preview": "package com.github.wxiaoqi.security.common.exception.auth;\n\n\nimport com.github.wxiaoqi.security.common.constant.CommonCo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientInvalidException.java",
"chars": 421,
"preview": "package com.github.wxiaoqi.security.common.exception.auth;\n\n\nimport com.github.wxiaoqi.security.common.constant.CommonCo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/ClientTokenException.java",
"chars": 417,
"preview": "package com.github.wxiaoqi.security.common.exception.auth;\n\n\nimport com.github.wxiaoqi.security.common.constant.CommonCo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserInvalidException.java",
"chars": 419,
"preview": "package com.github.wxiaoqi.security.common.exception.auth;\n\n\nimport com.github.wxiaoqi.security.common.constant.CommonCo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/exception/auth/UserTokenException.java",
"chars": 410,
"preview": "package com.github.wxiaoqi.security.common.exception.auth;\n\n\nimport com.github.wxiaoqi.security.common.constant.CommonCo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/GlobalExceptionHandler.java",
"chars": 2501,
"preview": "package com.github.wxiaoqi.security.common.handler;\n\nimport com.github.wxiaoqi.security.common.constant.CommonConstants;"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/BaseResponse.java",
"chars": 651,
"preview": "package com.github.wxiaoqi.security.common.msg;\n\n/**\n * Created by ace on 2017/8/23.\n */\npublic class BaseResponse {\n "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/ObjectRestResponse.java",
"chars": 423,
"preview": "package com.github.wxiaoqi.security.common.msg;\n\n/**\n * Created by Ace on 2017/6/11.\n */\npublic class ObjectRestResponse"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/TableResultResponse.java",
"chars": 1346,
"preview": "package com.github.wxiaoqi.security.common.msg;\n\nimport java.util.List;\n\n/**\n * ${DESCRIPTION}\n *\n * @author the sun\n * "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenErrorResponse.java",
"chars": 396,
"preview": "package com.github.wxiaoqi.security.common.msg.auth;\n\nimport com.github.wxiaoqi.security.common.constant.RestCodeConstan"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/msg/auth/TokenForbiddenResponse.java",
"chars": 409,
"preview": "package com.github.wxiaoqi.security.common.msg.auth;\n\nimport com.github.wxiaoqi.security.common.constant.RestCodeConstan"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/BaseController.java",
"chars": 2549,
"preview": "package com.github.wxiaoqi.security.common.rest;\n\nimport com.github.wxiaoqi.security.common.biz.BaseBiz;\nimport com.gith"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/BaseService.java",
"chars": 1642,
"preview": "package com.github.wxiaoqi.security.common.service;\n\nimport java.util.List;\n\n/**\n * ${DESCRIPTION}\n *\n * @author the sun"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/service/impl/BaseServiceImpl.java",
"chars": 2000,
"preview": "package com.github.wxiaoqi.security.common.service.impl;\n\nimport com.github.wxiaoqi.security.common.service.BaseService;"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/AddressUtils.java",
"chars": 1309,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.github.wxiaoqi.secu"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ClientUtil.java",
"chars": 649,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport javax.servlet.http.HttpServletRequest;\n\npublic class ClientUtil"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/EntityUtils.java",
"chars": 3898,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport com.github.wxiaoqi.security.common.context.BaseContextHandler;\n"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/IpUtils.java",
"chars": 4386,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport javax.servlet.http.HttpServletRequest;\n\n/**\n * @author Ths Sun\n"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/Query.java",
"chars": 964,
"preview": "package com.github.wxiaoqi.security.common.util;\n\n\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\n/**\n * 查询参数\n *"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/ReflectionUtils.java",
"chars": 10826,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport java.lang.reflect.Field;\nimport java.lang.reflect.InvocationTar"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/StringHelper.java",
"chars": 223,
"preview": "package com.github.wxiaoqi.security.common.util;\n\n/**\n * Created by ace on 2017/9/10.\n */\npublic class StringHelper {\n "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/TreeUtil.java",
"chars": 1640,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport com.github.wxiaoqi.security.common.vo.TreeNode;\n\nimport java.ut"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/UUIDUtils.java",
"chars": 985,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport java.util.UUID;\n\n/**\n * Created by ace on 2017/9/27.\n */\npublic"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/WebUtils.java",
"chars": 1116,
"preview": "package com.github.wxiaoqi.security.common.util;\n\nimport org.springframework.web.context.request.RequestAttributes;\nimpo"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpHelper.java",
"chars": 1177,
"preview": "package com.github.wxiaoqi.security.common.util.http;\n\nimport lombok.extern.slf4j.Slf4j;\n\nimport javax.servlet.ServletRe"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/http/HttpUtils.java",
"chars": 8490,
"preview": "package com.github.wxiaoqi.security.common.util.http;\n\nimport com.github.wxiaoqi.security.common.constant.CommonConstant"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/IJWTInfo.java",
"chars": 400,
"preview": "package com.github.wxiaoqi.security.common.util.jwt;\n\n/**\n * Created by ace on 2017/9/10.\n */\npublic interface IJWTInfo "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTHelper.java",
"chars": 3878,
"preview": "package com.github.wxiaoqi.security.common.util.jwt;\n\nimport com.github.wxiaoqi.security.common.constant.CommonConstants"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/JWTInfo.java",
"chars": 2088,
"preview": "package com.github.wxiaoqi.security.common.util.jwt;\n\nimport com.github.wxiaoqi.security.common.util.UUIDUtils;\n\nimport "
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/util/jwt/RsaKeyHelper.java",
"chars": 5892,
"preview": "package com.github.wxiaoqi.security.common.util.jwt;\n\nimport sun.misc.BASE64Decoder;\nimport sun.misc.BASE64Encoder;\n\nimp"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/TreeNode.java",
"chars": 726,
"preview": "package com.github.wxiaoqi.security.common.vo;\n\nimport java.util.List;\n\n/**\n * Created by Ace on 2017/6/12.\n */\npublic c"
},
{
"path": "ace-dev-base/ace-common/src/main/java/com/github/wxiaoqi/security/common/web/ParameterRequestWrapper.java",
"chars": 1818,
"preview": "package com.github.wxiaoqi.security.common.web;\n\n\nimport org.apache.commons.io.IOUtils;\n\nimport javax.servlet.ReadListen"
},
{
"path": "ace-dev-base/pom.xml",
"chars": 647,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-gate/pom.xml",
"chars": 7228,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-gate/src/main/docker/Dockerfile",
"chars": 203,
"preview": "FROM livingobjects/jre8\nVOLUME /tmp\n# 将jar包添加到容器中并更名为app.jar\nADD ace-gate.jar app.jar\n# 运行jar包\nRUN bash -c 'touch /app.j"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/GatewayServerBootstrap.java",
"chars": 719,
"preview": "package com.github.wxiaoqi.security.gate;\n\nimport com.github.wxiaoqi.security.auth.client.EnableAceAuthClient;\nimport co"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/config/GatewayConfig.java",
"chars": 2185,
"preview": "package com.github.wxiaoqi.security.gate.config;\n\nimport feign.codec.Decoder;\nimport org.springframework.beans.BeansExce"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/filter/AccessGatewayFilter.java",
"chars": 7939,
"preview": "package com.github.wxiaoqi.security.gate.filter;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.github.wxiaoqi.secu"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/handler/RequestBodyRoutePredicateFactory.java",
"chars": 4725,
"preview": "/*\n * Copyright 2013-2018 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogService.java",
"chars": 220,
"preview": "package com.github.wxiaoqi.security.gate.service;\n\nimport com.github.wxiaoqi.security.api.vo.log.LogInfo;\n\n/**\n * @autho"
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/service/LogServiceImpl.java",
"chars": 914,
"preview": "package com.github.wxiaoqi.security.gate.service;\n\nimport com.github.wxiaoqi.security.api.vo.log.LogInfo;\nimport lombok."
},
{
"path": "ace-gate/src/main/java/com/github/wxiaoqi/security/gate/utils/DBLog.java",
"chars": 2412,
"preview": "package com.github.wxiaoqi.security.gate.utils;\r\n\r\nimport com.github.wxiaoqi.security.api.vo.log.LogInfo;\r\nimport com.gi"
},
{
"path": "ace-gate/src/main/resources/application.yml",
"chars": 3303,
"preview": "server:\n port: 8765\n\n#请求和响应GZIP压缩支持\nfeign:\n httpclient:\n enabled: false\n okhttp:\n enabled: true\n compression:\n"
},
{
"path": "ace-infrastructure/ace-monitor/pom.xml",
"chars": 3730,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-infrastructure/ace-monitor/src/main/docker/Dockerfile",
"chars": 173,
"preview": "FROM livingobjects/jre8\nVOLUME /tmp\nADD ace-monitor.jar app.jar\nRUN bash -c 'touch /app.jar'\nENTRYPOINT [\"java\",\"-Djava."
},
{
"path": "ace-infrastructure/ace-monitor/src/main/java/com/github/wxiaoqi/security/monitor/MonitorBootstrap.java",
"chars": 593,
"preview": "package com.github.wxiaoqi.security.monitor;\n\nimport de.codecentric.boot.admin.server.config.EnableAdminServer;\nimport o"
},
{
"path": "ace-infrastructure/ace-monitor/src/main/resources/application.yml",
"chars": 463,
"preview": "spring:\n application:\n name: ace-monitor\n cloud:\n nacos:\n discovery:\n server-addr: 127"
},
{
"path": "ace-infrastructure/ace-nacos/db/init_nacos.sql",
"chars": 48262,
"preview": "\n\nCREATE DATABASE ag_nacos DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nUse ag_nacos;/*\n Navicat Premium Da"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/LICENSE",
"chars": 17336,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "ace-infrastructure/ace-nacos/nacos/NOTICE",
"chars": 1305,
"preview": "Nacos\nCopyright 2018-2019 The Apache Software Foundation\n\nThis product includes software developed at\nThe Alibaba Middle"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/derby.log",
"chars": 833,
"preview": "----------------------------------------------------------------\nThu Oct 24 22:48:05 CST 2019:\nBooting Derby version The"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/logs/access_log.2019-10-24.log",
"chars": 1196716,
"preview": "192.168.0.102 - - [24/Oct/2019:22:48:13 +0800] \"GET /nacos/v1/cs/health HTTP/1.1\" 200 2 178\n192.168.0.102 - - [24/Oct/20"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/logs/access_log.2019-10-25.log",
"chars": 1538,
"preview": "192.168.0.102 - - [25/Oct/2019:01:31:19 +0800] \"GET /nacos/v1/cs/health HTTP/1.1\" 200 2 17\n192.168.0.102 - - [25/Oct/201"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/shutdown.cmd",
"chars": 948,
"preview": "@echo off\nrem Copyright 1999-2018 Alibaba Group Holding Ltd.\nrem Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/shutdown.sh",
"chars": 877,
"preview": "#!/bin/sh\n\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n# Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/startup.cmd",
"chars": 1917,
"preview": "@echo off\nrem Copyright 1999-2018 Alibaba Group Holding Ltd.\nrem Licensed under the Apache License, Version 2.0 (the \"Li"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/bin/startup.sh",
"chars": 3528,
"preview": "#!/bin/sh\n\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n# Licensed under the Apache License, Version 2.0 (the \"Licen"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/application.properties",
"chars": 1278,
"preview": "# spring\n\nserver.contextPath=/nacos\nserver.servlet.contextPath=/nacos\nserver.port=8848\n\nnacos.cmdb.dumpTaskInterval=3600"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/application.properties.example",
"chars": 408,
"preview": "# spring\n\nserver.contextPath=/nacos\nserver.servlet.contextPath=/nacos\nserver.port=8848\n\n\ndb.num=2\ndb.url.0=jdbc:mysql://"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/cluster.conf.example",
"chars": 58,
"preview": "#it is ip\n#example\n10.10.109.214\n11.16.128.34\n11.16.128.36"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/nacos-logback.xml",
"chars": 24908,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration scan=\"true\" scanPeriod=\"10 seconds\">\n\n <springProperty scope=\"c"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/nacos-mysql.sql",
"chars": 9100,
"preview": "/******************************************/\n/* 数据库全名 = nacos_config */\n/* 表名称 = config_info */\n/***************"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/conf/schema.sql",
"chars": 7281,
"preview": "CREATE SCHEMA nacos AUTHORIZATION nacos;\n\nCREATE TABLE config_info (\n id bigint NOT NULL generated by default as identi"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/derby-data/README_DO_NOT_TOUCH_FILES.txt",
"chars": 608,
"preview": "\n# *************************************************************************\n# *** DO NOT TOUCH FILES IN TH"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/derby-data/log/README_DO_NOT_TOUCH_FILES.txt",
"chars": 532,
"preview": "\n# *************************************************************************\n# *** DO NOT TOUCH FILES IN TH"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/derby-data/seg0/README_DO_NOT_TOUCH_FILES.txt",
"chars": 533,
"preview": "\n# *************************************************************************\n# *** DO NOT TOUCH FILES IN TH"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/derby-data/service.properties",
"chars": 955,
"preview": "#/Users/ace/git/Cloud-Platform-v1/ace-control/ace-nacos/nacos/data/derby-data\n# ****************************************"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/naming/data/public/com.alibaba.nacos.naming.domains.meta.public##ace-admin",
"chars": 844,
"preview": "{\"key\":\"com.alibaba.nacos.naming.domains.meta.public##ace-admin\",\"timestamp\":1,\"value\":\"{\\\"checksum\\\":\\\"bd99ddc357c1d1b9"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/naming/data/public/com.alibaba.nacos.naming.domains.meta.public##ace-auth",
"chars": 842,
"preview": "{\"key\":\"com.alibaba.nacos.naming.domains.meta.public##ace-auth\",\"timestamp\":1,\"value\":\"{\\\"checksum\\\":\\\"c0752e08cb2cd891a"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/naming/data/public/com.alibaba.nacos.naming.domains.meta.public##ace-gateway",
"chars": 848,
"preview": "{\"key\":\"com.alibaba.nacos.naming.domains.meta.public##ace-gateway\",\"timestamp\":1,\"value\":\"{\\\"checksum\\\":\\\"1ee9b49299890a"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/naming/data/public/com.alibaba.nacos.naming.domains.meta.public##ace-monitor",
"chars": 848,
"preview": "{\"key\":\"com.alibaba.nacos.naming.domains.meta.public##ace-monitor\",\"timestamp\":1,\"value\":\"{\\\"checksum\\\":\\\"6f624274745f44"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/data/naming/meta.properties",
"chars": 39,
"preview": "#Thu Oct 24 23:06:37 CST 2019\nterm=401\n"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/cmdb-main.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-acl.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-app.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-client-request.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-dump.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-fatal.log",
"chars": 101,
"preview": "2019-10-24 22:48:07,885 WARN useAddressServer:true\n\n2019-10-24 22:48:08,051 WARN isQuickStart:false\n\n"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-memory.log",
"chars": 564972,
"preview": "2019-10-25 01:31:22,413 INFO notifySingleServiceThreadPool-java.util.concurrent.ScheduledThreadPoolExecutor, toNotifyTas"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-memory.log.2019-10-24.0",
"chars": 71544,
"preview": "2019-10-24 22:48:07,985 INFO [long-pulling] client count 0\n\n2019-10-24 22:48:17,928 INFO notifySingleServiceThreadPool-j"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-notify.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-pull-check.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-pull.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-sdk-request.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-server.log",
"chars": 327543,
"preview": "2019-10-25 08:31:51,506 ERROR unhealthIp:192.168.0.102:8848, unhealthCount:13\n\n2019-10-25 08:31:56,502 ERROR unhealthIp:"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-server.log.2019-10-24.0",
"chars": 1137,
"preview": "2019-10-24 22:48:04,088 INFO notifyConnectTimeout:200\n\n2019-10-24 22:48:04,089 INFO notifySocketTimeout:8000\n\n2019-10-24"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/config-trace.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/nacos.log",
"chars": 481542,
"preview": "2019-10-26 01:15:22,011 INFO Nacos is starting...\n\n2019-10-26 01:15:23,414 INFO Nacos is starting...\n\n2019-10-26 01:15:2"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/nacos.log.2019-10-24.0",
"chars": 2323509,
"preview": "2019-10-25 01:31:14,029 INFO Nacos is starting...\n\n2019-10-25 01:31:16,075 INFO Nacos is starting...\n\n2019-10-25 01:31:1"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/nacos.log.2019-10-25.0",
"chars": 7132,
"preview": "2019-10-25 08:35:18,706 INFO [capacityManagement] start correct usage\n\n2019-10-25 08:35:18,747 WARN clearConfigHistory s"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/nacos_gc.log.0.current",
"chars": 5924,
"preview": "Java HotSpot(TM) 64-Bit Server VM (25.131-b11) for bsd-amd64 JRE (1.8.0_131-b11), built on Mar 15 2017 01:32:22 by \"java"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-cache.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-debug.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-device.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-event.log",
"chars": 6631,
"preview": "2019-10-24 22:52:45,177 INFO com.alibaba.nacos.naming.core.VirtualClusterDomain@512179a {POS} {IP-UPDATE} [192.168.0.102"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-performance.log",
"chars": 3604,
"preview": "2019-10-25 08:30:48,760 INFO PERFORMANCE:|4|0|-1|-1\n\n2019-10-25 08:35:48,782 INFO PERFORMANCE:|4|0|-1|-1\n\n2019-10-25 08:"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-performance.log.2019-10-24.0",
"chars": 477,
"preview": "2019-10-24 22:48:38,298 INFO PERFORMANCE:|0|0|-1|-1\n\n2019-10-24 22:53:38,306 INFO PERFORMANCE:|1|1|-1|-1\n\n2019-10-24 22:"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-push.log",
"chars": 62464,
"preview": "2019-10-25 02:31:21,733 INFO [NACOS-PUSH] clientMap size: 0\n\n2019-10-25 04:31:34,830 INFO [NACOS-PUSH] clientMap size: 0"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-push.log.2019-10-24.0",
"chars": 13929,
"preview": "2019-10-24 22:48:15,022 INFO [NACOS-PUSH] clientMap size: 0\n\n2019-10-24 22:48:35,027 INFO [NACOS-PUSH] clientMap size: 0"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-raft.log",
"chars": 583908,
"preview": "2019-10-25 01:31:16,842 INFO [RAFT] send beat with 8 keys.\n\n2019-10-25 01:31:16,847 INFO raw beat data size: 622, size o"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-raft.log.2019-10-24.0",
"chars": 84686,
"preview": "2019-10-24 22:48:01,145 INFO Switch init start!\n\n2019-10-24 22:48:01,201 INFO add listener for switch or domain meta. \n\n"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-router.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-rt.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-server.log.2019-10-25.0",
"chars": 6338,
"preview": "2019-10-25 02:31:20,293 WARN server beat out of date, current: {\"adWeight\":0,\"alive\":true,\"ip\":\"192.168.0.102:8848\",\"las"
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-tag.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/naming-tenant.log",
"chars": 0,
"preview": ""
},
{
"path": "ace-infrastructure/ace-nacos/nacos/logs/start.out",
"chars": 2964227,
"preview": "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSiz"
},
{
"path": "ace-infrastructure/pom.xml",
"chars": 617,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-modules/ace-admin/db/init.sql",
"chars": 49967,
"preview": "\nCREATE DATABASE cloud_admin_v1 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nUse cloud_admin_v1;\n/*\n Navica"
},
{
"path": "ace-modules/ace-admin/pom.xml",
"chars": 9792,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmlns:xsi=\"http://www"
},
{
"path": "ace-modules/ace-admin/src/main/docker/Dockerfile",
"chars": 206,
"preview": "FROM livingobjects/jre8\nVOLUME /tmp\nADD ace-admin.jar app.jar\nADD wait-for-it.sh /wait-for-it.sh\nRUN bash -c 'touch /app"
},
{
"path": "ace-modules/ace-admin/src/main/docker/wait-for-it.sh",
"chars": 4070,
"preview": "#!/usr/bin/env bash\n# Use this script to test if a given TCP host/port are available\n\ncmdname=$(basename $0)\n\nechoerr("
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/AdminBootstrap.java",
"chars": 980,
"preview": "package com.github.wxiaoqi.security;\n\nimport com.spring4all.swagger.EnableSwagger2Doc;\nimport org.mybatis.spring.annotat"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/KeyConfiguration.java",
"chars": 419,
"preview": "package com.github.wxiaoqi.security.configuration;\n\nimport lombok.Data;\nimport org.springframework.beans.factory.annotat"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/RedisConfiguration.java",
"chars": 1372,
"preview": "package com.github.wxiaoqi.security.configuration;\n\nimport com.fasterxml.jackson.annotation.JsonAutoDetect;\nimport com.f"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/UserConfiguration.java",
"chars": 365,
"preview": "package com.github.wxiaoqi.security.configuration;\n\nimport lombok.Data;\nimport org.springframework.beans.factory.annotat"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/configuration/WebConfiguration.java",
"chars": 1720,
"preview": "package com.github.wxiaoqi.security.configuration;\n\nimport com.github.wxiaoqi.security.common.handler.GlobalExceptionHan"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/ElementBiz.java",
"chars": 1221,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.common.biz.BaseBiz;\nimport co"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GateLogBiz.java",
"chars": 762,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.GateLog;"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GroupBiz.java",
"chars": 6937,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.common.biz.BaseBiz;\nimport co"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/GroupTypeBiz.java",
"chars": 568,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.GroupTyp"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/MenuBiz.java",
"chars": 2021,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.common.biz.BaseBiz;\nimport co"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/ResourceAuthorityBiz.java",
"chars": 572,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Resource"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/biz/UserBiz.java",
"chars": 1259,
"preview": "package com.github.wxiaoqi.security.modules.admin.biz;\n\nimport com.github.wxiaoqi.security.common.biz.BaseBiz;\nimport co"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/constant/AdminCommonConstant.java",
"chars": 1069,
"preview": "package com.github.wxiaoqi.security.modules.admin.constant;\n\n/**\n * ${DESCRIPTION}\n *\n * @author the sun\n * @create 2017"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Element.java",
"chars": 5643,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(na"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/GateLog.java",
"chars": 2465,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport com.fasterxml.jackson.annotation.JsonFormat;\n\nimport j"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Group.java",
"chars": 6471,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport com.github.wxiaoqi.security.modules.admin.constant.Adm"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/GroupType.java",
"chars": 5297,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(na"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/Menu.java",
"chars": 6609,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport com.github.wxiaoqi.security.modules.admin.constant.Adm"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/OnlineLog.java",
"chars": 529,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport lombok.Data;\n\n/**\n * 当前在线会话\n * \n * @author Ths Sun\n */"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/ResourceAuthority.java",
"chars": 5775,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(na"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/entity/User.java",
"chars": 7405,
"preview": "package com.github.wxiaoqi.security.modules.admin.entity;\n\nimport java.util.Date;\nimport javax.persistence.*;\n\n@Table(na"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/ElementMapper.java",
"chars": 651,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Eleme"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GateLogMapper.java",
"chars": 223,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.GateL"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GroupMapper.java",
"chars": 605,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Group"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/GroupTypeMapper.java",
"chars": 229,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Group"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/MenuMapper.java",
"chars": 743,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Menu;"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/ResourceAuthorityMapper.java",
"chars": 433,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.Resou"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/mapper/UserMapper.java",
"chars": 434,
"preview": "package com.github.wxiaoqi.security.modules.admin.mapper;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.User;"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/ElementController.java",
"chars": 2570,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.wxiaoqi.security.modules.admin.biz.ElementBiz"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GateLogController.java",
"chars": 1562,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.pagehelper.PageHelper;\nimport com.github.wxia"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GroupController.java",
"chars": 5533,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.wxiaoqi.security.modules.admin.biz.GroupBiz;\n"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/GroupTypeController.java",
"chars": 1191,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.wxiaoqi.security.modules.admin.biz.GroupTypeB"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/MenuController.java",
"chars": 5024,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.wxiaoqi.security.common.msg.ObjectRestRespons"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rest/UserController.java",
"chars": 2512,
"preview": "package com.github.wxiaoqi.security.modules.admin.rest;\n\nimport com.github.wxiaoqi.security.common.msg.ObjectRestRespons"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/LogRest.java",
"chars": 979,
"preview": "package com.github.wxiaoqi.security.modules.admin.rpc;\n\nimport com.github.wxiaoqi.security.api.vo.log.LogInfo;\nimport co"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/UserRest.java",
"chars": 1476,
"preview": "package com.github.wxiaoqi.security.modules.admin.rpc;\n\nimport com.github.wxiaoqi.security.api.vo.authority.CheckPermiss"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/rpc/service/PermissionService.java",
"chars": 12908,
"preview": "package com.github.wxiaoqi.security.modules.admin.rpc.service;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fas"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/util/Sha256PasswordEncoder.java",
"chars": 1758,
"preview": "/*\n *\n * * Copyright (C) 2018 老干爹<2014314038@qq.com>\n *\n * * Boot-Platform 企业版源码\n * * 郑重声明:\n * * 如果你从其他途径获取到,请告"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessInterface.java",
"chars": 200,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport lombok.Data;\n\n/**\n * @author Ths Sun\n * @create 2020/7/17."
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessMenuTree.java",
"chars": 887,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.common.vo.TreeNode;\nimport lom"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AccessRouteTree.java",
"chars": 1091,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.github.wxiaoqi"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/AuthorityMenuTree.java",
"chars": 1466,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.common.vo.TreeNode;\nimport org"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/FrontUser.java",
"chars": 1488,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.api.vo.authority.PermissionInf"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/FrontUserV2.java",
"chars": 869,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport lombok.Data;\n\nimport java.util.ArrayList;\nimport java.util"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/GroupTree.java",
"chars": 533,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.common.vo.TreeNode;\n\n/**\n * ${"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/GroupUsers.java",
"chars": 739,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.modules.admin.entity.User;\n\nim"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/admin/vo/MenuTree.java",
"chars": 2334,
"preview": "package com.github.wxiaoqi.security.modules.admin.vo;\n\nimport com.github.wxiaoqi.security.common.vo.TreeNode;\n\n/**\n * Cr"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/bean/ClientInfo.java",
"chars": 1003,
"preview": "package com.github.wxiaoqi.security.modules.auth.bean;\n\n\nimport com.github.wxiaoqi.security.common.util.jwt.IJWTInfo;\n\n/"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/biz/ClientBiz.java",
"chars": 1472,
"preview": "package com.github.wxiaoqi.security.modules.auth.biz;\n\nimport com.github.wxiaoqi.security.modules.auth.entity.Client;\nim"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/biz/ClientServiceBiz.java",
"chars": 444,
"preview": "package com.github.wxiaoqi.security.modules.auth.biz;\n\nimport com.github.wxiaoqi.security.modules.auth.entity.ClientServ"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/AuthController.java",
"chars": 3049,
"preview": "package com.github.wxiaoqi.security.modules.auth.controller;\n\nimport com.github.wxiaoqi.security.common.exception.auth.U"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/CaptchaController.java",
"chars": 2037,
"preview": "package com.github.wxiaoqi.security.modules.auth.controller;\n\nimport com.alibaba.druid.util.Base64;\nimport com.github.wx"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/ClientController.java",
"chars": 1475,
"preview": "package com.github.wxiaoqi.security.modules.auth.controller;\n\nimport com.github.wxiaoqi.security.common.msg.ObjectRestRe"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/OnlineController.java",
"chars": 2314,
"preview": "package com.github.wxiaoqi.security.modules.auth.controller;\n\nimport com.alibaba.fastjson.JSON;\nimport com.github.wxiaoq"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/controller/ServiceController.java",
"chars": 1090,
"preview": "package com.github.wxiaoqi.security.modules.auth.controller;\n\nimport com.github.wxiaoqi.security.common.msg.ObjectRestRe"
},
{
"path": "ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/modules/auth/entity/Client.java",
"chars": 5851,
"preview": "package com.github.wxiaoqi.security.modules.auth.entity;\n\nimport javax.persistence.Column;\nimport javax.persistence.Id;\n"
}
]
// ... and 94 more files (download for full content)
About this extraction
This page contains the full source code of the wxiaoqi/ace-admin GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 294 files (73.6 MB), approximately 2.4M tokens, and a symbol index with 1337 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.