├── .idea ├── .gitignore ├── XiaoYu1.iml ├── xiaoyu.iml ├── dictionaries ├── vcs.xml ├── $CACHE_FILE$ ├── encodings.xml ├── libraries │ ├── Maven__org_ow2_asm_asm_5_0_4.xml │ ├── Maven__com_alibaba_druid_1_1_22.xml │ ├── Maven__io_reactivex_rxjava_1_3_8.xml │ ├── Maven__commons_io_commons_io_2_2.xml │ ├── Maven__io_reactivex_rxnetty_0_4_9.xml │ ├── Maven__net_minidev_json_smart_2_3.xml │ ├── Maven__org_objenesis_objenesis_2_6.xml │ ├── Maven__com_alibaba_fastjson_1_2_73.xml │ ├── Maven__javax_inject_javax_inject_1.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_30.xml │ ├── Maven__com_fasterxml_classmate_1_5_1.xml │ ├── Maven__com_netflix_ribbon_ribbon_2_3_0.xml │ ├── Maven__javax_ws_rs_jsr311_api_1_1_1.xml │ ├── Maven__commons_lang_commons_lang_2_6.xml │ ├── Maven__org_glassfish_jakarta_el_3_0_3.xml │ ├── Maven__org_opentest4j_opentest4j_1_2_0.xml │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_30.xml │ ├── Maven__org_skyscreamer_jsonassert_1_5_0.xml │ ├── Maven__io_prometheus_simpleclient_0_5_0.xml │ ├── Maven__net_minidev_accessors_smart_1_2.xml │ ├── Maven__ch_qos_logback_logback_core_1_2_3.xml │ ├── Maven__com_google_code_findbugs_jsr305_3_0_2.xml │ ├── Maven__com_jayway_jsonpath_json_path_2_4_0.xml │ ├── Maven__com_sun_jersey_jersey_core_1_19_1.xml │ ├── Maven__io_reactivex_rxnetty_servo_0_4_9.xml │ ├── Maven__com_google_guava_guava_29_0_android.xml │ ├── Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml │ ├── Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml │ ├── Maven__com_netflix_servo_servo_core_0_12_21.xml │ ├── Maven__com_sun_jersey_jersey_client_1_19_1.xml │ ├── Maven__com_google_guava_failureaccess_1_0_1.xml │ ├── Maven__io_reactivex_rxnetty_contexts_0_4_9.xml │ ├── Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml │ ├── Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml │ ├── Maven__ch_qos_logback_logback_classic_1_2_3.xml │ ├── Maven__io_github_openfeign_feign_core_10_10_1.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_13.xml │ ├── Maven__org_apiguardian_apiguardian_api_1_1_0.xml │ ├── Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml │ ├── Maven__io_github_openfeign_feign_slf4j_10_10_1.xml │ ├── Maven__io_github_openfeign_form_feign_form_3_8_0.xml │ ├── Maven__com_netflix_archaius_archaius_core_0_7_6.xml │ ├── Maven__com_google_j2objc_j2objc_annotations_1_3.xml │ ├── Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml │ ├── Maven__commons_fileupload_commons_fileupload_1_4.xml │ ├── Maven__io_github_openfeign_feign_hystrix_10_10_1.xml │ ├── Maven__org_reactivestreams_reactive_streams_1_0_3.xml │ ├── Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml │ ├── Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml │ ├── Maven__commons_collections_commons_collections_3_2_2.xml │ ├── Maven__org_checkerframework_checker_compat_qual_2_5_5.xml │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml │ ├── Maven__org_synchronoss_cloud_nio_stream_storage_1_1_3.xml │ ├── Maven__commons_configuration_commons_configuration_1_8.xml │ ├── Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml │ ├── Maven__com_alibaba_druid_spring_boot_starter_1_1_22.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_11_2.xml │ ├── Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml │ ├── Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml │ ├── Maven__org_synchronoss_cloud_nio_multipart_parser_1_1_0.xml │ ├── Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml │ ├── Maven__com_google_errorprone_error_prone_annotations_2_3_4.xml │ ├── Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml │ ├── Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml │ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml │ ├── Maven__org_springframework_cloud_spring_cloud_commons_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_context_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_starter_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_security_spring_security_jwt_1_1_1_RELEASE.xml │ ├── Maven__org_springframework_security_spring_security_rsa_1_0_9_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_gateway_core_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_starter_gateway_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_security_oauth_spring_security_oauth2_2_3_6_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_2_3_RELEASE.xml │ ├── Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_2_3_RELEASE.xml │ └── Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml ├── compiler.xml ├── misc.xml ├── inspectionProfiles │ └── Project_Default.xml └── $PRODUCT_WORKSPACE_FILE$ ├── data ├── nacos_config.zip ├── mysql data │ └── mysql表说明 ├── data目录说明 └── seata │ ├── registry.conf │ └── file.conf ├── XiaoYu.iml ├── xiaoyu-manage ├── xxl-job-admin │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── static │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── plugins │ │ │ │ │ │ ├── layer │ │ │ │ │ │ │ └── theme │ │ │ │ │ │ │ │ └── default │ │ │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ │ └── codemirror │ │ │ │ │ │ │ └── addon │ │ │ │ │ │ │ └── hint │ │ │ │ │ │ │ └── show-hint.css │ │ │ │ │ └── adminlte │ │ │ │ │ │ ├── plugins │ │ │ │ │ │ └── iCheck │ │ │ │ │ │ │ └── square │ │ │ │ │ │ │ ├── blue.png │ │ │ │ │ │ │ └── blue@2x.png │ │ │ │ │ │ └── bower_components │ │ │ │ │ │ ├── Ionicons │ │ │ │ │ │ └── fonts │ │ │ │ │ │ │ ├── ionicons.eot │ │ │ │ │ │ │ ├── ionicons.ttf │ │ │ │ │ │ │ └── ionicons.woff │ │ │ │ │ │ ├── font-awesome │ │ │ │ │ │ └── fonts │ │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ │ └── bootstrap │ │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ ├── application.properties │ │ │ │ └── templates │ │ │ │ │ ├── common │ │ │ │ │ └── common.exception.ftl │ │ │ │ │ └── help.ftl │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── xxl │ │ │ │ └── job │ │ │ │ └── admin │ │ │ │ ├── core │ │ │ │ ├── exception │ │ │ │ │ └── XxlJobException.java │ │ │ │ ├── alarm │ │ │ │ │ └── JobAlarm.java │ │ │ │ ├── route │ │ │ │ │ ├── strategy │ │ │ │ │ │ ├── ExecutorRouteFirst.java │ │ │ │ │ │ ├── ExecutorRouteLast.java │ │ │ │ │ │ ├── ExecutorRouteRandom.java │ │ │ │ │ │ └── ExecutorRouteRound.java │ │ │ │ │ └── ExecutorRouter.java │ │ │ │ ├── trigger │ │ │ │ │ └── TriggerTypeEnum.java │ │ │ │ ├── util │ │ │ │ │ └── FtlUtil.java │ │ │ │ ├── old │ │ │ │ │ ├── RemoteHttpJobBean.java │ │ │ │ │ └── XxlJobThreadPool.java │ │ │ │ └── model │ │ │ │ │ ├── XxlJobLogReport.java │ │ │ │ │ ├── XxlJobRegistry.java │ │ │ │ │ ├── XxlJobUser.java │ │ │ │ │ ├── XxlJobLogGlue.java │ │ │ │ │ └── XxlJobGroup.java │ │ │ │ ├── XxlJobAdminApplication.java │ │ │ │ ├── controller │ │ │ │ ├── annotation │ │ │ │ │ └── PermissionLimit.java │ │ │ │ └── interceptor │ │ │ │ │ ├── WebMvcConfig.java │ │ │ │ │ └── CookieInterceptor.java │ │ │ │ └── dao │ │ │ │ ├── XxlJobLogGlueDao.java │ │ │ │ ├── XxlJobLogReportDao.java │ │ │ │ ├── XxlJobUserDao.java │ │ │ │ ├── XxlJobGroupDao.java │ │ │ │ ├── XxlJobRegistryDao.java │ │ │ │ └── XxlJobInfoDao.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── xxl │ │ │ └── job │ │ │ └── admin │ │ │ ├── util │ │ │ └── I18nUtilTest.java │ │ │ ├── dao │ │ │ ├── XxlJobRegistryDaoTest.java │ │ │ ├── XxlJobLogGlueDaoTest.java │ │ │ └── XxlJobGroupDaoTest.java │ │ │ ├── controller │ │ │ ├── AbstractSpringMvcTest.java │ │ │ └── JobInfoControllerTest.java │ │ │ └── core │ │ │ └── util │ │ │ └── JacksonUtilTest.java │ └── Dockerfile ├── xiaoyu-admin │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ └── bootstrap.yml │ │ │ └── java │ │ │ └── com │ │ │ └── xiaoyu │ │ │ └── admin │ │ │ ├── XiaoYuAdminApplication.java │ │ │ └── config │ │ │ └── SecuritySecureConfig.java │ └── Dockerfile └── pom.xml ├── xiaoyu-common ├── xiaoyu-common-core │ ├── target │ │ ├── xiaoyu-common-core-1.0.1.jar │ │ ├── classes │ │ │ ├── META-INF │ │ │ │ └── spring.factories │ │ │ └── com │ │ │ │ └── xiaoyu │ │ │ │ └── common │ │ │ │ └── core │ │ │ │ ├── bo │ │ │ │ └── R.class │ │ │ │ ├── constant │ │ │ │ ├── AppConstant.class │ │ │ │ ├── AuthConstant.class │ │ │ │ ├── CommonConstants.class │ │ │ │ └── ResultConstant.class │ │ │ │ └── handler │ │ │ │ └── NacosConfigHandler.class │ │ ├── maven-archiver │ │ │ └── pom.properties │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── src │ │ ├── resources │ │ │ ├── META-INF │ │ │ │ └── spring.factories │ │ │ └── banner.txt │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── xiaoyu │ │ │ └── common │ │ │ └── core │ │ │ └── constant │ │ │ ├── CommonConstants.java │ │ │ ├── AppConstant.java │ │ │ ├── AuthConstant.java │ │ │ └── ResultConstant.java │ └── pom.xml ├── xiaoyu-common-job │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── spring.factories │ │ │ └── java │ │ │ └── com │ │ │ └── xiaoyu │ │ │ └── common │ │ │ └── job │ │ │ └── props │ │ │ └── XxlJobExecutorProperties.java │ └── pom.xml ├── xiaoyu-common-redis │ ├── target │ │ └── classes │ │ │ ├── com │ │ │ └── xiaoyu │ │ │ │ └── common │ │ │ │ └── redis │ │ │ │ ├── config │ │ │ │ ├── RedisConfig.class │ │ │ │ └── RedisCacheManagerConfig.class │ │ │ │ ├── RedisAutoConfiguration.class │ │ │ │ └── handler │ │ │ │ └── RedisHandler.class │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── application.yml │ └── src │ │ └── main │ │ ├── resources │ │ ├── META-INF │ │ │ └── spring.factories │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── xiaoyu │ │ └── common │ │ └── redis │ │ └── annotation │ │ └── Lock.java └── xiaoyu-common-security │ ├── target │ └── classes │ │ ├── com │ │ └── xiaoyu │ │ │ └── common │ │ │ └── security │ │ │ ├── config │ │ │ ├── TokenConfig.class │ │ │ └── ResourceServerConfig.class │ │ │ ├── filter │ │ │ └── AuthenticationFilter.class │ │ │ ├── annotation │ │ │ └── PermissionAuthorize.class │ │ │ ├── exception │ │ │ └── AccessDeniedException.class │ │ │ ├── handler │ │ │ ├── GlobalExceptionHandler.class │ │ │ ├── CustomAccessDeniedHandler.class │ │ │ └── PermissionAuthorizeHandler.class │ │ │ └── custom │ │ │ └── ResourceAuthExceptionEntryPoint.class │ │ └── META-INF │ │ └── spring.factories │ └── src │ └── main │ ├── resources │ └── META-INF │ │ └── spring.factories │ └── java │ └── com │ └── xiaoyu │ └── common │ └── security │ ├── exception │ └── AccessDeniedException.java │ ├── annotation │ └── PermissionAuthorize.java │ ├── handler │ ├── GlobalExceptionHandler.java │ └── CustomAccessDeniedHandler.java │ └── config │ ├── TokenConfig.java │ └── WhitelistPathConfig.java ├── xiaoyu-service-api ├── xiaoyu-user-api │ ├── target │ │ ├── xiaoyu-user-api-1.0.1.jar │ │ ├── maven-archiver │ │ │ └── pom.properties │ │ ├── classes │ │ │ └── com │ │ │ │ └── xiaoyu │ │ │ │ └── user │ │ │ │ ├── entity │ │ │ │ ├── SystemRole.class │ │ │ │ ├── SystemUser.class │ │ │ │ ├── SystemUserRole.class │ │ │ │ ├── SystemPermission.class │ │ │ │ └── SystemRolePermission.class │ │ │ │ ├── feign │ │ │ │ └── IUserClient.class │ │ │ │ └── fallback │ │ │ │ ├── UserFallbackFactory.class │ │ │ │ └── UserFallbackFactory$1.class │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── com │ │ └── xiaoyu │ │ └── user │ │ ├── entity │ │ ├── SystemRole.java │ │ ├── SystemUserRole.java │ │ └── SystemUser.java │ │ └── fallback │ │ └── UserFallbackFactory.java └── pom.xml ├── xiaoyu-service ├── xiaoyu-system-service │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ ├── mapper │ │ │ │ └── SystemLogMapper.xml │ │ │ └── bootstrap.yml │ │ │ └── java │ │ │ └── com │ │ │ └── xiaoyu │ │ │ └── system │ │ │ ├── mapper │ │ │ └── SystemLogMapper.java │ │ │ ├── service │ │ │ └── ISystemLogService.java │ │ │ ├── controller │ │ │ └── SystemLogController.java │ │ │ └── XiaoYuSystemServiceApplication.java │ └── Dockerfile └── xiaoyu-user-service │ ├── src │ ├── main │ │ ├── resources │ │ │ ├── mapper │ │ │ │ ├── SystemUserMapper.xml │ │ │ │ ├── SystemUserRoleMapper.xml │ │ │ │ ├── SystemRolePermissionMapper.xml │ │ │ │ ├── SystemRoleMapper.xml │ │ │ │ └── SystemPermissionMapper.xml │ │ │ └── bootstrap.yml │ │ └── java │ │ │ └── com │ │ │ └── xiaoyu │ │ │ └── user │ │ │ ├── mapper │ │ │ ├── SystemUserMapper.java │ │ │ ├── SystemRolePermissionMapper.java │ │ │ ├── SystemRoleMapper.java │ │ │ ├── SystemUserRoleMapper.java │ │ │ └── SystemPermissionMapper.java │ │ │ ├── service │ │ │ ├── ISystemUserService.java │ │ │ ├── ISystemRoleService.java │ │ │ ├── ISystemUserRoleService.java │ │ │ ├── impl │ │ │ │ ├── SystemUserServiceImpl.java │ │ │ │ ├── SystemRoleServiceImpl.java │ │ │ │ ├── SystemUserRoleServiceImpl.java │ │ │ │ └── SystemPermissionServiceImpl.java │ │ │ └── ISystemPermissionService.java │ │ │ ├── sentinel │ │ │ ├── fallback │ │ │ │ └── UserFallback.java │ │ │ └── block │ │ │ │ └── UserBlock.java │ │ │ ├── XiaoYuUserServiceApplication.java │ │ │ ├── job │ │ │ └── QueryListJob.java │ │ │ └── controller │ │ │ └── UserController.java │ └── test │ │ └── java │ │ └── com │ │ └── xiaoyu │ │ └── user │ │ └── XiaoyuUserServiceApplicationTests.java │ └── Dockerfile ├── xiaoyu-auth ├── Dockerfile └── src │ ├── main │ ├── resources │ │ └── bootstrap.yml │ └── java │ │ └── com │ │ └── xiaoyu │ │ └── auth │ │ ├── XiaoYuAuthApplication.java │ │ └── config │ │ ├── TokenConfig.java │ │ └── WebSecurityConfig.java │ └── test │ └── java │ └── com │ └── xiaoyu │ └── common │ └── security │ └── XiaoyuAuthApplicationTests.java └── xiaoyu-gateway ├── Dockerfile └── src ├── test └── java │ └── com │ └── xiaoyu │ └── gateway │ └── XiaoyuGatewayApplicationTests.java └── main ├── java └── com │ └── xiaoyu │ └── gateway │ ├── XiaoYuGatewayApplication.java │ └── config │ └── WhitelistPathConfig.java └── resources └── bootstrap.yml /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /data/nacos_config.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/data/nacos_config.zip -------------------------------------------------------------------------------- /.idea/XiaoYu1.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.idea/xiaoyu.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /data/mysql data/mysql表说明: -------------------------------------------------------------------------------- 1 | 2 | 其中包含oauth2 、seata 的建表sql,然后就是一些系统表 3 | 4 | xxl_job 5 | 是一个单独的库,其中的表是为了分布式job平台 6 | 7 | -------------------------------------------------------------------------------- /XiaoYu.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/xiaoyu-common-core-1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/xiaoyu-common-core-1.0.1.jar -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/xiaoyu-user-api-1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/xiaoyu-user-api-1.0.1.jar -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.core.handler.NacosConfigHandler 3 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.core.handler.NacosConfigHandler 3 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/application.properties -------------------------------------------------------------------------------- /.idea/dictionaries: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Tue Nov 03 08:55:50 CST 2020 3 | version=1.0.1 4 | groupId=com.xiaoyu 5 | artifactId=xiaoyu-common-core 6 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Tue Nov 03 08:55:53 CST 2020 3 | version=1.0.1 4 | groupId=com.xiaoyu 5 | artifactId=xiaoyu-user-api 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/bo/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/bo/R.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/icon.png -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemRole.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemRole.class -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemUser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemUser.class -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/feign/IUserClient.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/feign/IUserClient.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue.png -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemUserRole.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemUserRole.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/plugins/iCheck/square/blue@2x.png -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemPermission.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemPermission.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/AppConstant.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/AppConstant.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/AuthConstant.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/AuthConstant.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-job/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.job.config.XxlJobConfig,\ 3 | com.xiaoyu.common.job.props.XxlJobExecutorProperties 4 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/config/RedisConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/config/RedisConfig.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/CommonConstants.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/CommonConstants.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/ResultConstant.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/constant/ResultConstant.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/RedisAutoConfiguration.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/RedisAutoConfiguration.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/handler/RedisHandler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/handler/RedisHandler.class -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemRolePermission.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/entity/SystemRolePermission.class -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/fallback/UserFallbackFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/fallback/UserFallbackFactory.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/handler/NacosConfigHandler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-core/target/classes/com/xiaoyu/common/core/handler/NacosConfigHandler.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/config/TokenConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/config/TokenConfig.class -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/fallback/UserFallbackFactory$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-service-api/xiaoyu-user-api/target/classes/com/xiaoyu/user/fallback/UserFallbackFactory$1.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.eot -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.ttf -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/Ionicons/fonts/ionicons.woff -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/config/RedisCacheManagerConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-redis/target/classes/com/xiaoyu/common/redis/config/RedisCacheManagerConfig.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/config/ResourceServerConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/config/ResourceServerConfig.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/filter/AuthenticationFilter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/filter/AuthenticationFilter.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.redis.RedisAutoConfiguration,\ 3 | com.xiaoyu.common.redis.config.RedisConfig,\ 4 | com.xiaoyu.common.redis.handler.LockHandler -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/annotation/PermissionAuthorize.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/annotation/PermissionAuthorize.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/exception/AccessDeniedException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/exception/AccessDeniedException.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/GlobalExceptionHandler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/GlobalExceptionHandler.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.redis.RedisAutoConfiguration,\ 3 | com.xiaoyu.common.redis.config.RedisConfig,\ 4 | com.xiaoyu.common.redis.handler.LockHandler -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/CustomAccessDeniedHandler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/CustomAccessDeniedHandler.class -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/PermissionAuthorizeHandler.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/handler/PermissionAuthorizeHandler.class -------------------------------------------------------------------------------- /data/data目录说明: -------------------------------------------------------------------------------- 1 | 2 | seata、sentinel、nacos启动包百度云链接 3 | https://pan.baidu.com/s/1JF8sGBQxBHpARRigQ-BVkQ 4 | 提取码:zq6k 5 | 6 | 7 | 启动最难配置的就是 seata ,考虑到配置难度,在seata目录下有相关配置可以参考。 8 | 9 | nacos_config.zip中包含了 启动项目所需的nacos配置,其中分组SEATA_GROUP的配置都是 seata的配置,分组为 10 | DEFAULT_GROUP 的配置都是 系统配置,只需在nacos中导入即可 -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/custom/ResourceAuthExceptionEntryPoint.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-common/xiaoyu-common-security/target/classes/com/xiaoyu/common/security/custom/ResourceAuthExceptionEntryPoint.class -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /xiaoyu-manage/xiaoyu-admin/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9999 3 | 4 | spring: 5 | application: 6 | name: xiaoyu-admin 7 | cloud: 8 | #Nacos 配置中心 服务配置 9 | nacos: 10 | config: 11 | server-addr: @nacos-ip@ 12 | file-extension: yaml 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AncientDreams/XiaoYu/HEAD/xiaoyu-manage/xxl-job-admin/src/main/resources/static/adminlte/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/resources/mapper/SystemLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/mapper/SystemUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/mapper/SystemUserRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-slim 2 | MAINTAINER xuxueli 3 | 4 | ENV PARAMS="" 5 | 6 | ENV TZ=PRC 7 | RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 8 | 9 | ADD target/xxl-job-admin-*.jar /app.jar 10 | 11 | ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /app.jar $PARAMS"] -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/mapper/SystemRolePermissionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /xiaoyu-auth/Dockerfile: -------------------------------------------------------------------------------- 1 | # FROM 镜像地址,网易镜像库的8-alpine java版本 2 | FROM hub.c.163.com/library/java:8-alpine 3 | 4 | # 维护者信息 5 | MAINTAINER zxy 6 | 7 | ADD xiaoyu-auth-1.0.1.jar app.jar 8 | 9 | #指定于外界交互的端口 10 | EXPOSE 8100 11 | 12 | #运行对应的jar包 13 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 14 | 15 | -------------------------------------------------------------------------------- /xiaoyu-gateway/Dockerfile: -------------------------------------------------------------------------------- 1 | # FROM 镜像地址,网易镜像库的8-alpine java版本 2 | FROM hub.c.163.com/library/java:8-alpine 3 | 4 | # 维护者信息 5 | MAINTAINER zxy 6 | 7 | ADD xiaoyu-gateway-1.0.1.jar app.jar 8 | 9 | #指定于外界交互的端口 10 | EXPOSE 8887 11 | 12 | #运行对应的jar包 13 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 14 | 15 | -------------------------------------------------------------------------------- /xiaoyu-manage/xiaoyu-admin/Dockerfile: -------------------------------------------------------------------------------- 1 | # FROM 镜像地址,网易镜像库的8-alpine java版本 2 | FROM hub.c.163.com/library/java:8-alpine 3 | 4 | # 维护者信息 5 | MAINTAINER zxy 6 | 7 | ADD xiaoyu-admin-1.0.1.jar app.jar 8 | 9 | #指定于外界交互的端口 10 | EXPOSE 9999 11 | 12 | #运行对应的jar包 13 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 14 | 15 | -------------------------------------------------------------------------------- /xiaoyu-gateway/src/test/java/com/xiaoyu/gateway/XiaoyuGatewayApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.gateway; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class XiaoyuGatewayApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/Dockerfile: -------------------------------------------------------------------------------- 1 | # FROM 镜像地址,网易镜像库的8-alpine java版本 2 | FROM hub.c.163.com/library/java:8-alpine 3 | 4 | # 维护者信息 5 | MAINTAINER zxy 6 | 7 | ADD xiaoyu-user-service-1.0.1.jar app.jar 8 | 9 | #指定于外界交互的端口 10 | EXPOSE 8888 11 | 12 | #运行对应的jar包 13 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 14 | 15 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/Dockerfile: -------------------------------------------------------------------------------- 1 | # FROM 镜像地址,网易镜像库的8-alpine java版本 2 | FROM hub.c.163.com/library/java:8-alpine 3 | 4 | # 维护者信息 5 | MAINTAINER zxy 6 | 7 | ADD xiaoyu-system-service-0.0.1-SNAPSHOT.jar app.jar 8 | 9 | #指定于外界交互的端口 10 | EXPOSE 9000 11 | 12 | #运行对应的jar包 13 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] 14 | 15 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/test/java/com/xiaoyu/user/XiaoyuUserServiceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class XiaoyuUserServiceApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/exception/XxlJobException.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.exception; 2 | 3 | /** 4 | * @author xuxueli 2019-05-04 23:19:29 5 | */ 6 | public class XxlJobException extends RuntimeException { 7 | 8 | public XxlJobException() { 9 | } 10 | public XxlJobException(String message) { 11 | super(message); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\xiaoyu\common\core\constant\AppConstant.class 2 | com\xiaoyu\common\core\constant\CommonConstants.class 3 | com\xiaoyu\common\core\handler\NacosConfigHandler.class 4 | com\xiaoyu\common\core\constant\AuthConstant.class 5 | com\xiaoyu\common\core\constant\ResultConstant.class 6 | com\xiaoyu\common\core\bo\R.class 7 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/target/classes/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.security.config.ResourceServerConfig,\ 3 | com.xiaoyu.common.security.filter.AuthenticationFilter,\ 4 | com.xiaoyu.common.security.handler.PermissionAuthorizeHandler,\ 5 | com.xiaoyu.common.security.handler.GlobalExceptionHandler,\ 6 | com.xiaoyu.common.security.config.WhitelistPathConfig -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | com.xiaoyu.common.security.config.ResourceServerConfig,\ 3 | com.xiaoyu.common.security.filter.AuthenticationFilter,\ 4 | com.xiaoyu.common.security.handler.PermissionAuthorizeHandler,\ 5 | com.xiaoyu.common.security.handler.GlobalExceptionHandler,\ 6 | com.xiaoyu.common.security.config.WhitelistPathConfig -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/mapper/SystemUserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xiaoyu.user.entity.SystemUser; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author ZhangXianYu 12 | * @since 2020-09-15 13 | */ 14 | public interface SystemUserMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/target/classes/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | # Redis 连接配置 3 | redis: 4 | host: 127.0.0.1 5 | port: 6379 6 | #密码,没有不写 7 | password: 8 | jedis: 9 | pool: 10 | #最大连接个数 11 | max-active: 10 12 | #最大等待时间 13 | max-wait: -1 14 | #最大空闲 15 | max-idle: 8 16 | #初始化最小 17 | min-idle: 5 18 | lettuce: 19 | shutdown-timeout: 0 20 | 21 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/java/com/xiaoyu/system/mapper/SystemLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.system.mapper; 2 | 3 | import com.xiaoyu.system.entity.SystemLog; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author ZhangXianYu 12 | * @since 2020-10-30 13 | */ 14 | public interface SystemLogMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/ISystemUserService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xiaoyu.user.entity.SystemUser; 5 | 6 | /** 7 | *

8 | * 服务类 9 | *

10 | * 11 | * @author ZhangXianYu 12 | * @since 2020-09-15 13 | */ 14 | public interface ISystemUserService extends IService { 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | # Redis 连接配置 3 | redis: 4 | host: 127.0.0.1 5 | port: 6379 6 | #密码,没有不写 7 | password: 8 | jedis: 9 | pool: 10 | #最大连接个数 11 | max-active: 10 12 | #最大等待时间 13 | max-wait: -1 14 | #最大空闲 15 | max-idle: 8 16 | #初始化最小 17 | min-idle: 5 18 | lettuce: 19 | shutdown-timeout: 0 20 | 21 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/ISystemRoleService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xiaoyu.user.entity.SystemRole; 5 | 6 | /** 7 | *

8 | * 系统角色实体类服务接口 9 | *

10 | * 11 | * @author ZhangXianYu 12 | * @since 2020-07-13 13 | */ 14 | public interface ISystemRoleService extends IService { 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/mapper/SystemRolePermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xiaoyu.user.entity.SystemRolePermission; 5 | 6 | /** 7 | *

8 | * Mapper 接口 9 | *

10 | * 11 | * @author ZhangXianYu 12 | * @since 2020-09-14 13 | */ 14 | public interface SystemRolePermissionMapper extends BaseMapper { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\xiaoyu\user\entity\SystemPermission.class 2 | com\xiaoyu\user\entity\SystemUserRole.class 3 | com\xiaoyu\user\feign\IUserClient.class 4 | com\xiaoyu\user\entity\SystemRolePermission.class 5 | com\xiaoyu\user\fallback\UserFallbackFactory.class 6 | com\xiaoyu\user\entity\SystemUser.class 7 | com\xiaoyu\user\entity\SystemRole.class 8 | com\xiaoyu\user\fallback\UserFallbackFactory$1.class 9 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/ISystemUserRoleService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xiaoyu.user.entity.SystemUserRole; 5 | 6 | /** 7 | *

8 | * 用户角色服务接口 9 | *

10 | * 11 | * @author ZhangXianYu Email: 1600501744@qq.com 12 | * @since 2020/9/18 0018 11:22 13 | */ 14 | public interface ISystemUserRoleService extends IService { 15 | 16 | 17 | } 18 | -------------------------------------------------------------------------------- /.idea/$CACHE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Ali-Check 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/XxlJobAdminApplication.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author xuxueli 2018-10-28 00:38:13 8 | */ 9 | @SpringBootApplication 10 | public class XxlJobAdminApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(XxlJobAdminApplication.class, args); 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/alarm/JobAlarm.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.alarm; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobInfo; 4 | import com.xxl.job.admin.core.model.XxlJobLog; 5 | 6 | /** 7 | * @author xuxueli 2020-01-19 8 | */ 9 | public interface JobAlarm { 10 | 11 | /** 12 | * job alarm 13 | * 14 | * @param info 15 | * @param jobLog 16 | * @return 17 | */ 18 | public boolean doAlarm(XxlJobInfo info, XxlJobLog jobLog); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/main/java/com/xiaoyu/common/core/constant/CommonConstants.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.core.constant; 2 | 3 | /** 4 | *

5 | * 通用常量 6 | *

7 | * 8 | * @author ZhangXianYu Email: 1600501744@qq.com 9 | * @since 2020/9/23 0023 13:57 10 | */ 11 | public interface CommonConstants { 12 | 13 | 14 | /** 15 | * 编码 16 | */ 17 | String UTF8 = "UTF-8"; 18 | 19 | /** 20 | * JSON 资源 21 | */ 22 | String CONTENT_TYPE = "application/json; charset=utf-8"; 23 | } 24 | -------------------------------------------------------------------------------- /xiaoyu-auth/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8000 3 | servlet: 4 | context-path: /auth 5 | 6 | spring: 7 | application: 8 | name: auth-service #@artifactId@ 9 | cloud: 10 | # Nacos 配置中心 服务配置 11 | nacos: 12 | config: 13 | server-addr: ${spring.cloud.nacos.discovery.server-addr} 14 | file-extension: yaml 15 | shared-configs: admin-service-config.yaml 16 | discovery: 17 | #Nacos 注册中心地址 ,默认是localhost:8848 18 | server-addr: @nacos-ip@ 19 | 20 | profiles: 21 | active: dev 22 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8888 3 | servlet: 4 | context-path: /user 5 | 6 | spring: 7 | application: 8 | name: user-service 9 | cloud: 10 | #Nacos 配置中心 服务配置 11 | nacos: 12 | config: 13 | server-addr: ${spring.cloud.nacos.discovery.server-addr} 14 | file-extension: yaml 15 | #共享公共配置文件 1.admin监控平台配置文件 2.服务开启job配置文件。 多个文件 ,分割 16 | shared-configs: admin-service-config.yaml,seata.yaml #,xxl.job.executor.yaml 17 | discovery: 18 | server-addr: @nacos-ip@ 19 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9000 3 | servlet: 4 | context-path: /system 5 | 6 | spring: 7 | application: 8 | name: system-service 9 | cloud: 10 | #Nacos 配置中心 服务配置 11 | nacos: 12 | config: 13 | server-addr: ${spring.cloud.nacos.discovery.server-addr} 14 | file-extension: yaml 15 | #共享公共配置文件 1.admin监控平台配置文件 2.服务开启job配置文件。 多个文件 ,分割 16 | shared-configs: admin-service-config.yaml,seata.yaml #,xxl.job.executor.yaml 17 | discovery: 18 | server-addr: @nacos-ip@ 19 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/mapper/SystemRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xiaoyu.user.entity.SystemRole; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * Mapper 接口 12 | *

13 | * 14 | * @author ZhangXianYu 15 | * @since 2020-09-14 16 | */ 17 | public interface SystemRoleMapper extends BaseMapper { 18 | 19 | List queryUserRole(@Param("userId") String userId); 20 | } 21 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/main/java/com/xiaoyu/common/core/constant/AppConstant.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.core.constant; 2 | 3 | /** 4 | *

5 | * 微服务应用 常量 6 | *

7 | * 8 | * @author ZhangXianYu Email: 1600501744@qq.com 9 | * @since 2020/9/15 11:34 10 | */ 11 | public interface AppConstant { 12 | 13 | String APPLICATION_USER_NAME = "user-service"; 14 | 15 | String USER_SERVICE_FEIGN_PACKAGES = "com.xiaoyu.user.feign"; 16 | String USER_SERVICE_MAPPER = "com.xiaoyu.user.mapper"; 17 | 18 | String SYSTEM_SERVICE_MAPPER = "com.xiaoyu.system.mapper"; 19 | } 20 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/sentinel/fallback/UserFallback.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.sentinel.fallback; 2 | 3 | import com.xiaoyu.common.core.bo.R; 4 | import lombok.extern.slf4j.Slf4j; 5 | 6 | 7 | /** 8 | *

9 | * 用户服务接口熔断处理 10 | *

11 | * 12 | * @author ZhangXianYu Email: 1600501744@qq.com 13 | * @since 2020/9/30 9:22 14 | */ 15 | @Slf4j 16 | public class UserFallback { 17 | 18 | public static R listBack(Throwable e) { 19 | log.error(e.getMessage(), e); 20 | return R.fail("查询错误:" + e.getMessage()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /data/seata/registry.conf: -------------------------------------------------------------------------------- 1 | registry { 2 | # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa 3 | type = "nacos" 4 | 5 | nacos { 6 | application = "seata-server" 7 | serverAddr = "localhost:8848" 8 | group = "DEFAULT_GROUP" 9 | namespace = "" 10 | cluster = "default" 11 | username = "" 12 | password = "" 13 | } 14 | } 15 | 16 | config { 17 | # file、nacos 、apollo、zk、consul、etcd3 18 | type = "nacos" 19 | 20 | nacos { 21 | serverAddr = "localhost:8848" 22 | namespace = "" 23 | group = "DEFAULT_GROUP" 24 | username = "" 25 | password = "" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /xiaoyu-gateway/src/main/java/com/xiaoyu/gateway/XiaoYuGatewayApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.gateway; 2 | 3 | 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 7 | 8 | 9 | /** 10 | * @author zxy 11 | */ 12 | @SpringBootApplication 13 | @EnableDiscoveryClient 14 | public class XiaoYuGatewayApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(XiaoYuGatewayApplication.class, args); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/mapper/SystemUserRoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xiaoyu.user.entity.SystemUserRole; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * Mapper 接口 12 | *

13 | * 14 | * @author ZhangXianYu 15 | * @since 2020-09-14 16 | */ 17 | public interface SystemUserRoleMapper extends BaseMapper { 18 | 19 | List queryUserRole(@Param(value = "userId") String userId); 20 | } 21 | -------------------------------------------------------------------------------- /xiaoyu-manage/xiaoyu-admin/src/main/java/com/xiaoyu/admin/XiaoYuAdminApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.admin; 2 | 3 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * 微服务健康监控 9 | * 10 | * @author zxy 11 | */ 12 | @SpringBootApplication 13 | @EnableAdminServer 14 | public class XiaoYuAdminApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(XiaoYuAdminApplication.class, args); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /xiaoyu-auth/src/test/java/com/xiaoyu/common/security/XiaoyuAuthApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | import org.springframework.security.crypto.bcrypt.BCrypt; 6 | 7 | @SpringBootTest 8 | class XiaoyuAuthApplicationTests { 9 | 10 | @Test 11 | void contextLoads() { 12 | 13 | System.out.println(BCrypt.hashpw("secret", BCrypt.gensalt())); 14 | System.out.println(BCrypt.checkpw("secret", "$2a$10$jHPWu2ScGNIPxw8M07Uw6umCcejbfJRS7w6Xpn8S/uCKxyQwCXHfC")); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/sentinel/block/UserBlock.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.sentinel.block; 2 | 3 | import com.alibaba.csp.sentinel.slots.block.BlockException; 4 | import com.xiaoyu.common.core.bo.R; 5 | import lombok.extern.slf4j.Slf4j; 6 | 7 | /** 8 | *

9 | * 用户服务接口限流处理 10 | *

11 | * 12 | * @author ZhangXianYu Email: 1600501744@qq.com 13 | * @since 2020/10/9 9:53 14 | */ 15 | @Slf4j 16 | public class UserBlock { 17 | 18 | public static R listBlock(BlockException e) { 19 | log.error(e.getMessage(), e); 20 | return R.fail("服务器繁忙,请稍后再试!"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/mapper/SystemRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteFirst.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.route.strategy; 2 | 3 | import com.xxl.job.admin.core.route.ExecutorRouter; 4 | import com.xxl.job.core.biz.model.ReturnT; 5 | import com.xxl.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by xuxueli on 17/3/10. 11 | */ 12 | public class ExecutorRouteFirst extends ExecutorRouter { 13 | 14 | @Override 15 | public ReturnT route(TriggerParam triggerParam, List addressList){ 16 | return new ReturnT(addressList.get(0)); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/main/java/com/xiaoyu/common/core/constant/AuthConstant.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.core.constant; 2 | 3 | /** 4 | *

5 | * 认证服务常量 6 | *

7 | * 8 | * @author ZhangXianYu Email: 1600501744@qq.com 9 | * @since 2020/9/16 0016 9:36 10 | */ 11 | public interface AuthConstant { 12 | 13 | /** 14 | * 对称秘钥 15 | */ 16 | String SALINGER = "XiaoYu"; 17 | 18 | String AUTH_KEY = "XiaoYu-Auth"; 19 | 20 | /** 21 | * 网关响应消息 22 | */ 23 | String LACK_TOKEN = "令牌缺失,拒绝访问"; 24 | 25 | String DECRYPTION_FAILURE = "解密失败,请求未授权"; 26 | 27 | String TOKEN_EXPIRED = "令牌已过期,请重新认证"; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteLast.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.route.strategy; 2 | 3 | import com.xxl.job.admin.core.route.ExecutorRouter; 4 | import com.xxl.job.core.biz.model.ReturnT; 5 | import com.xxl.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by xuxueli on 17/3/10. 11 | */ 12 | public class ExecutorRouteLast extends ExecutorRouter { 13 | 14 | @Override 15 | public ReturnT route(TriggerParam triggerParam, List addressList) { 16 | return new ReturnT(addressList.get(addressList.size()-1)); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_druid_1_1_22.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | xiaoyu-service-api 7 | com.xiaoyu 8 | 1.0.1 9 | 10 | 4.0.0 11 | 12 | xiaoyu-user-api 13 | ${XiaoYu-version} 14 | XiaoYu 用户api 15 | 16 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/impl/SystemUserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.xiaoyu.user.entity.SystemUser; 5 | import com.xiaoyu.user.mapper.SystemUserMapper; 6 | import com.xiaoyu.user.service.ISystemUserService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 服务实现类 12 | *

13 | * 14 | * @author ZhangXianYu 15 | * @since 2020-09-15 16 | */ 17 | @Service 18 | public class SystemUserServiceImpl extends ServiceImpl implements ISystemUserService { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_reactivex_rxjava_1_3_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_reactivex_rxnetty_0_4_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-redis/src/main/java/com/xiaoyu/common/redis/annotation/Lock.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.redis.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | *

10 | * 基于Redis锁的实现,如需满足更加复杂的业务,请自行实现 11 | *

12 | * 13 | * @author ZhangXianYu Email: 1600501744@qq.com 14 | * @since 2020/10/9 15:54 15 | */ 16 | @Target({ElementType.METHOD}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface Lock { 19 | 20 | /** 21 | * 锁超时时间,单位毫秒,默认超时时间10s 22 | */ 23 | long timeout() default 10000; 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_json_smart_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_fastjson_1_2_73.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_inject_javax_inject_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/impl/SystemRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service.impl; 2 | 3 | 4 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 5 | 6 | import com.xiaoyu.user.entity.SystemRole; 7 | import com.xiaoyu.user.mapper.SystemRoleMapper; 8 | import com.xiaoyu.user.service.ISystemRoleService; 9 | import org.springframework.stereotype.Service; 10 | 11 | 12 | /** 13 | *

14 | * 系统角色实体类服务接口实现 15 | *

16 | * 17 | * @author ZhangXianYu 18 | * @since 2020-07-13 19 | */ 20 | @Service 21 | public class SystemRoleServiceImpl extends ServiceImpl implements ISystemRoleService { 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_classmate_1_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_ribbon_ribbon_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/annotation/PermissionLimit.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.controller.annotation; 2 | 3 | 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * 权限限制 11 | * @author xuxueli 2015-12-12 18:29:02 12 | */ 13 | @Target(ElementType.METHOD) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface PermissionLimit { 16 | 17 | /** 18 | * 登录拦截 (默认拦截) 19 | */ 20 | boolean limit() default true; 21 | 22 | /** 23 | * 要求管理员权限 24 | * 25 | * @return 26 | */ 27 | boolean adminuser() default false; 28 | 29 | } -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-gateway/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8887 3 | spring: 4 | application: 5 | name: gateway-service #@artifactId@ 6 | cloud: 7 | # Nacos 配置中心 服务配置 8 | nacos: 9 | config: 10 | server-addr: ${spring.cloud.nacos.discovery.server-addr} 11 | file-extension: yaml 12 | shared-configs: admin-service-config.yaml 13 | discovery: 14 | server-addr: @nacos-ip@ 15 | # 16 | profiles: 17 | active: dev 18 | 19 | # 忽略 nocos 心跳日志 20 | logging: 21 | level: 22 | com: 23 | alibaba: 24 | nacos: 25 | client: 26 | naming: error 27 | 28 | config: classpath:logback/logback.xml 29 | file: 30 | #日志保存路径 31 | path: log -------------------------------------------------------------------------------- /xiaoyu-manage/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | XiaoYu 7 | com.xiaoyu 8 | 1.0.1 9 | 10 | 4.0.0 11 | 12 | xiaoyu-manage 13 | pom 14 | 15 | 16 | xiaoyu-admin 17 | xxl-job-admin 18 | 19 | 20 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/ISystemPermissionService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xiaoyu.user.entity.SystemPermission; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 系统用户权限服务接口 11 | *

12 | * 13 | * @author ZhangXianYu Email: 1600501744@qq.com 14 | * @since 2020/9/18 14:01 15 | */ 16 | public interface ISystemPermissionService extends IService { 17 | 18 | /** 19 | * 通过用户名查询拥有的权限URL 20 | * 21 | * @param userName 用户名 22 | * @return List 23 | */ 24 | List findByUerName(String userName); 25 | } 26 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_glassfish_jakarta_el_3_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_30.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/exception/AccessDeniedException.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.exception; 2 | 3 | import lombok.Data; 4 | import lombok.EqualsAndHashCode; 5 | 6 | /** 7 | *

8 | * 系统拒绝访问抛出此异常 9 | *

10 | * 11 | * @author ZhangXianYu Email: 1600501744@qq.com 12 | * @since 2020/9/27 14:13 13 | */ 14 | @EqualsAndHashCode(callSuper = true) 15 | @Data 16 | public class AccessDeniedException extends RuntimeException { 17 | 18 | private static final long serialVersionUID = 1L; 19 | 20 | /** 21 | * 错误码 22 | */ 23 | protected String errorCode; 24 | /** 25 | * 错误信息 26 | */ 27 | protected String errorMsg; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_prometheus_simpleclient_0_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobLogGlueDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobLogGlue; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * job log for glue 11 | * @author xuxueli 2016-5-19 18:04:56 12 | */ 13 | @Mapper 14 | public interface XxlJobLogGlueDao { 15 | 16 | public int save(XxlJobLogGlue xxlJobLogGlue); 17 | 18 | public List findByJobId(@Param("jobId") int jobId); 19 | 20 | public int removeOld(@Param("jobId") int jobId, @Param("limit") int limit); 21 | 22 | public int deleteByJobId(@Param("jobId") int jobId); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_reactivex_rxnetty_servo_0_4_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/impl/SystemUserRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.xiaoyu.user.entity.SystemUserRole; 5 | import com.xiaoyu.user.mapper.SystemUserRoleMapper; 6 | import com.xiaoyu.user.service.ISystemUserRoleService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * 用户角色服务接口实现 12 | *

13 | * 14 | * @author ZhangXianYu Email: 1600501744@qq.com 15 | * @since 2020/9/18 0018 11:23 16 | */ 17 | @Service 18 | public class SystemUserRoleServiceImpl extends ServiceImpl implements ISystemUserRoleService { 19 | } 20 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_guava_29_0_android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_ribbon_ribbon_core_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hdrhistogram_HdrHistogram_2_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_servo_servo_core_0_12_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_failureaccess_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_reactivex_rxnetty_contexts_0_4_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/ExecutorRouter.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.route; 2 | 3 | import com.xxl.job.core.biz.model.ReturnT; 4 | import com.xxl.job.core.biz.model.TriggerParam; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by xuxueli on 17/3/10. 12 | */ 13 | public abstract class ExecutorRouter { 14 | protected static Logger logger = LoggerFactory.getLogger(ExecutorRouter.class); 15 | 16 | /** 17 | * route address 18 | * 19 | * @param addressList 20 | * @return ReturnT.content=address 21 | */ 22 | public abstract ReturnT route(TriggerParam triggerParam, List addressList); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_github_openfeign_feign_core_10_10_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_hystrix_hystrix_core_1_5_18.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_github_openfeign_feign_slf4j_10_10_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_github_openfeign_form_feign_form_3_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/java/com/xiaoyu/system/service/ISystemLogService.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.system.service; 2 | 3 | import com.xiaoyu.common.core.bo.R; 4 | import com.xiaoyu.system.entity.SystemLog; 5 | import com.baomidou.mybatisplus.extension.service.IService; 6 | import io.seata.spring.annotation.GlobalTransactional; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | /** 10 | *

11 | * 服务类 12 | *

13 | * 14 | * @author ZhangXianYu 15 | * @since 2020-10-30 16 | */ 17 | public interface ISystemLogService extends IService { 18 | 19 | /** 20 | * 测试分布式事务 21 | * 22 | * @return R 23 | * @throws Exception 异常 24 | */ 25 | R testSeataGlobalTransactional() throws Exception; 26 | } 27 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_archaius_archaius_core_0_7_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /data/seata/file.conf: -------------------------------------------------------------------------------- 1 | 2 | ## transaction log store, only used in seata-server 3 | store { 4 | ## store mode: file、db、redis 5 | mode = "db" 6 | 7 | ## database store property 8 | db { 9 | ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc. 10 | datasource = "druid" 11 | ## mysql/oracle/postgresql/h2/oceanbase etc. 12 | dbType = "mysql" 13 | driverClassName = "com.mysql.cj.jdbc.Driver" 14 | url = "jdbc:mysql://127/testquistart" 15 | user = "root" 16 | password = "" 17 | minConn = 5 18 | maxConn = 30 19 | globalTable = "global_table" 20 | branchTable = "branch_table" 21 | lockTable = "lock_table" 22 | queryLimit = 100 23 | maxWait = 5000 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_ribbon_ribbon_transport_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_github_openfeign_feign_hystrix_10_10_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_ribbon_ribbon_httpclient_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/XiaoYuUserServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user; 2 | 3 | import com.xiaoyu.common.core.constant.AppConstant; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 8 | 9 | /** 10 | * 用户服务启动类 11 | * 12 | * @author zxy 13 | */ 14 | @SpringBootApplication 15 | @MapperScan(AppConstant.USER_SERVICE_MAPPER) 16 | @EnableDiscoveryClient 17 | public class XiaoYuUserServiceApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(XiaoYuUserServiceApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /xiaoyu-auth/src/main/java/com/xiaoyu/auth/XiaoYuAuthApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.auth; 2 | 3 | import com.xiaoyu.common.core.constant.AppConstant; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 7 | import org.springframework.cloud.openfeign.EnableFeignClients; 8 | 9 | /** 10 | * 微服务权限认证服务启动类 11 | * 12 | * @author zxy 13 | */ 14 | @SpringBootApplication 15 | @EnableDiscoveryClient 16 | @EnableFeignClients(basePackages = {AppConstant.USER_SERVICE_FEIGN_PACKAGES}) 17 | public class XiaoYuAuthApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(XiaoYuAuthApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobLogReportDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobLogReport; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | /** 11 | * job log 12 | * @author xuxueli 2019-11-22 13 | */ 14 | @Mapper 15 | public interface XxlJobLogReportDao { 16 | 17 | public int save(XxlJobLogReport xxlJobLogReport); 18 | 19 | public int update(XxlJobLogReport xxlJobLogReport); 20 | 21 | public List queryLogReport(@Param("triggerDayFrom") Date triggerDayFrom, 22 | @Param("triggerDayTo") Date triggerDayTo); 23 | 24 | public XxlJobLogReport queryLogReportTotal(); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_4_1_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_ribbon_ribbon_loadbalancer_2_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRandom.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.route.strategy; 2 | 3 | import com.xxl.job.admin.core.route.ExecutorRouter; 4 | import com.xxl.job.core.biz.model.ReturnT; 5 | import com.xxl.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | import java.util.Random; 9 | 10 | /** 11 | * Created by xuxueli on 17/3/10. 12 | */ 13 | public class ExecutorRouteRandom extends ExecutorRouter { 14 | 15 | private static Random localRandom = new Random(); 16 | 17 | @Override 18 | public ReturnT route(TriggerParam triggerParam, List addressList) { 19 | String address = addressList.get(localRandom.nextInt(addressList.size())); 20 | return new ReturnT(address); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_5_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_synchronoss_cloud_nio_stream_storage_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_configuration_commons_configuration_1_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_github_openfeign_form_feign_form_spring_3_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/mapper/SystemPermissionMapper.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xiaoyu.user.entity.SystemPermission; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * Mapper 接口 12 | *

13 | * 14 | * @author ZhangXianYu 15 | * @since 2020-09-14 16 | */ 17 | public interface SystemPermissionMapper extends BaseMapper { 18 | 19 | /** 20 | * 通过用户名查询拥有的权限url 21 | * 22 | * @param userName 用户名 23 | * @param exhibition 侧边栏是否显示 24 | * @return List 25 | */ 26 | List findByUerName(@Param("userName") String userName, @Param("exhibition") String exhibition); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_22.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_11_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_1_3_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jakarta_validation_jakarta_validation_api_2_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_synchronoss_cloud_nio_multipart_parser_1_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/trigger/TriggerTypeEnum.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.trigger; 2 | 3 | import com.xxl.job.admin.core.util.I18nUtil; 4 | 5 | /** 6 | * trigger type enum 7 | * 8 | * @author xuxueli 2018-09-16 04:56:41 9 | */ 10 | public enum TriggerTypeEnum { 11 | 12 | MANUAL(I18nUtil.getString("jobconf_trigger_type_manual")), 13 | CRON(I18nUtil.getString("jobconf_trigger_type_cron")), 14 | RETRY(I18nUtil.getString("jobconf_trigger_type_retry")), 15 | PARENT(I18nUtil.getString("jobconf_trigger_type_parent")), 16 | API(I18nUtil.getString("jobconf_trigger_type_api")); 17 | 18 | private TriggerTypeEnum(String title){ 19 | this.title = title; 20 | } 21 | private String title; 22 | public String getTitle() { 23 | return title; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/resources/mapper/SystemPermissionMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_netflix_commons_netflix_statistics_0_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/java/com/xiaoyu/system/controller/SystemLogController.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.system.controller; 2 | 3 | 4 | import com.xiaoyu.common.core.bo.R; 5 | import com.xiaoyu.system.service.ISystemLogService; 6 | import lombok.AllArgsConstructor; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | /** 11 | *

12 | * 前端控制器 13 | *

14 | * 15 | * @author ZhangXianYu 16 | * @since 2020-10-30 17 | */ 18 | @RestController 19 | @AllArgsConstructor 20 | public class SystemLogController { 21 | 22 | 23 | private final ISystemLogService iSystemLogService; 24 | 25 | 26 | @RequestMapping("/test") 27 | public R addLog() throws Exception { 28 | return iSystemLogService.testSeataGlobalTransactional(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_contribs_jersey_apache_client4_1_19_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\handler\NacosConfigHandler.java 2 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\constant\AppConstant.java 3 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\constant\ResultConstant.java 4 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\bo\R.java 5 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\constant\AuthConstant.java 6 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-common\xiaoyu-common-core\src\main\java\com\xiaoyu\common\core\constant\CommonConstants.java 7 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/static/plugins/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | white-space: pre; 29 | color: black; 30 | cursor: pointer; 31 | } 32 | 33 | li.CodeMirror-hint-active { 34 | background: #08f; 35 | color: white; 36 | } 37 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_netflix_netflix_commons_netflix_commons_util_0_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ${AnsiColor.BRIGHT_YELLOW} 2 | 3 | ___ ___ __ ___ ______ ____ ____ __ __ 4 | \ \ / / | | / \ / __ \ \ \ / / | | | | 5 | \ V / | | / ^ \ | | | | \ \/ / | | | | 6 | > < | | / /_\ \ | | | | \_ _/ | | | | 7 | / . \ | | / _____ \ | `--' | | | | `--' | 8 | /__/ \__\ |__| /__/ \__\ \______/ |__| \______/ 9 | 10 | https://github.com/AncientDreams/XiaoYu 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-job/src/main/java/com/xiaoyu/common/job/props/XxlJobExecutorProperties.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.job.props; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | *

9 | * XxlJob配置属性 10 | *

11 | * 12 | * @author ZhangXianYu Email: 1600501744@qq.com 13 | * @since 2020/10/12 17:36 14 | */ 15 | @Configuration 16 | @ConfigurationProperties(prefix = XxlJobExecutorProperties.PREFIX) 17 | @Data 18 | public class XxlJobExecutorProperties { 19 | 20 | final static String PREFIX = "xxl.job.executor"; 21 | 22 | private String appname; 23 | private String address; 24 | private String ip; 25 | private int port; 26 | private String logpath; 27 | private int logretentiondays; 28 | } 29 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_commons_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_context_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_security_spring_security_jwt_1_1_1_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_security_spring_security_rsa_1_0_9_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/templates/common/common.exception.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |

System Error

25 |

${exceptionMsg}

26 | Back 27 |

28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_gateway_core_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_ribbon_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_openfeign_core_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\entity\SystemRole.java 2 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\entity\SystemUser.java 3 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\feign\IUserClient.java 4 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\entity\SystemRolePermission.java 5 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\entity\SystemUserRole.java 6 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\entity\SystemPermission.java 7 | D:\Zhangxy\File\ideaData\XiaoYu\xiaoyu-service-api\xiaoyu-user-api\src\main\java\com\xiaoyu\user\fallback\UserFallbackFactory.java 8 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_gateway_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_security_oauth_spring_security_oauth2_2_3_6_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_netflix_archaius_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_openfeign_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/src/main/java/com/xiaoyu/common/core/constant/ResultConstant.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.core.constant; 2 | 3 | /** 4 | *

5 | * 微服务响应 常量 6 | *

7 | * 8 | * @author ZhangXianYu Email: 1600501744@qq.com 9 | * @since 2020/9/15 11:24 10 | */ 11 | public interface ResultConstant { 12 | 13 | String SUCCESS_CODE = "00"; 14 | 15 | String FAIL_CODE = "99"; 16 | 17 | String SUCCESS = "成功"; 18 | 19 | String FAIL = "失败"; 20 | 21 | String QUERY_SUCCESS = "查询成功"; 22 | 23 | String QUERY_FAIL = "查询失败"; 24 | 25 | String SAVE_SUCCESS = "保存成功"; 26 | 27 | String SAVE_FAIL = "保存失败"; 28 | 29 | String UPDATE_SUCCESS = "更新成功"; 30 | 31 | String UPDATE_FAIL = "更新失败"; 32 | 33 | String REMOVE_SUCCESS = "删除成功"; 34 | 35 | String REMOVE_FAIL = "删除失败"; 36 | 37 | String EXCEPTION = "发生异常"; 38 | 39 | String LOGIN_SUCCESS = "登录成功"; 40 | 41 | String USER_EXIST = "用户已存在"; 42 | 43 | String SERVER_ERROR = "服务器内部错误"; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/annotation/PermissionAuthorize.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | *

10 | * 注解功能: 标示在方法上表示次方法必须要有访问的URL权限 11 | *

12 | * 注解使用范围: 在controller中 13 | *

14 | * 注解的目的: 更加方便的通过Permission来控制权限 15 | *

16 | * 17 | * 注解处理类:{@link com.xiaoyu.common.security.handler.PermissionAuthorizeHandler} 18 | * 19 | * @author ZhangXianYu Email: 1600501744@qq.com 20 | * @since 2020/9/27 9:50 21 | */ 22 | @Target({ElementType.METHOD}) 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface PermissionAuthorize { 25 | 26 | /** 27 | * url 资源路径,表示拥有哪个url权限后能进行访问,默认会根据request mapping中的value中的去匹配 28 | *

29 | * value 参数是一个数组,如果数组中的url 有其中一条拥有就可以访问 30 | */ 31 | String[] value() default {}; 32 | } 33 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.controller.interceptor; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 | 7 | import javax.annotation.Resource; 8 | 9 | /** 10 | * web mvc config 11 | * 12 | * @author xuxueli 2018-04-02 20:48:20 13 | */ 14 | @Configuration 15 | public class WebMvcConfig implements WebMvcConfigurer { 16 | 17 | @Resource 18 | private PermissionInterceptor permissionInterceptor; 19 | @Resource 20 | private CookieInterceptor cookieInterceptor; 21 | 22 | @Override 23 | public void addInterceptors(InterceptorRegistry registry) { 24 | registry.addInterceptor(permissionInterceptor).addPathPatterns("/**"); 25 | registry.addInterceptor(cookieInterceptor).addPathPatterns("/**"); 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/util/I18nUtilTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.util; 2 | 3 | import com.xxl.job.admin.core.util.I18nUtil; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.ContextConfiguration; 8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | 11 | /** 12 | * email util test 13 | * 14 | * @author xuxueli 2017-12-22 17:16:23 15 | */ 16 | @RunWith(SpringRunner.class) 17 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 18 | public class I18nUtilTest { 19 | 20 | @Test 21 | public void test(){ 22 | System.out.println(I18nUtil.getString("admin_name")); 23 | System.out.println(I18nUtil.getMultString("admin_name", "admin_name_full")); 24 | System.out.println(I18nUtil.getMultString()); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_ribbon_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_cloud_spring_cloud_starter_netflix_archaius_2_2_3_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_listenablefuture_9999_0_empty_to_avoid_conflict_with_guava.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/job/QueryListJob.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.job; 2 | 3 | import com.xxl.job.core.biz.model.ReturnT; 4 | import com.xxl.job.core.handler.annotation.XxlJob; 5 | import com.xxl.job.core.log.XxlJobLogger; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.stereotype.Component; 8 | 9 | 10 | /** 11 | *

12 | * xxl-job 分布式任务 使用示例 13 | *

14 | * 15 | * @author ZhangXianYu Email: 1600501744@qq.com 16 | * @since 2020/10/12 17:18 17 | */ 18 | @Slf4j 19 | @Component 20 | public class QueryListJob { 21 | 22 | /** 23 | * 任务示例(Bean模式) 24 | */ 25 | @XxlJob(value = "queryList", init = "init", destroy = "destroy") 26 | public ReturnT demoJobHandler(String param) throws Exception { 27 | XxlJobLogger.log("XXL-JOB, Hello World." + param); 28 | return ReturnT.SUCCESS; 29 | } 30 | 31 | public void init() { 32 | log.info("init"); 33 | } 34 | 35 | public void destroy() { 36 | log.info("destory"); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/service/impl/SystemPermissionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.xiaoyu.user.entity.SystemPermission; 5 | import com.xiaoyu.user.mapper.SystemPermissionMapper; 6 | import com.xiaoyu.user.service.ISystemPermissionService; 7 | import lombok.AllArgsConstructor; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | *

14 | * 系统用户权限服务接口实现 15 | *

16 | * 17 | * @author ZhangXianYu Email: 1600501744@qq.com 18 | * @since 2020/9/18 14:02 19 | */ 20 | @Service 21 | @AllArgsConstructor 22 | public class SystemPermissionServiceImpl extends ServiceImpl implements ISystemPermissionService { 23 | 24 | final SystemPermissionMapper systemPermissionMapper; 25 | 26 | @Override 27 | public List findByUerName(String userName) { 28 | return systemPermissionMapper.findByUerName(userName, "01"); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobUserDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobUser; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | import java.util.List; 7 | 8 | /** 9 | * @author xuxueli 2019-05-04 16:44:59 10 | */ 11 | @Mapper 12 | public interface XxlJobUserDao { 13 | 14 | public List pageList(@Param("offset") int offset, 15 | @Param("pagesize") int pagesize, 16 | @Param("username") String username, 17 | @Param("role") int role); 18 | public int pageListCount(@Param("offset") int offset, 19 | @Param("pagesize") int pagesize, 20 | @Param("username") String username, 21 | @Param("role") int role); 22 | 23 | public XxlJobUser loadByUserName(@Param("username") String username); 24 | 25 | public int save(XxlJobUser xxlJobUser); 26 | 27 | public int update(XxlJobUser xxlJobUser); 28 | 29 | public int delete(@Param("id") int id); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-system-service/src/main/java/com/xiaoyu/system/XiaoYuSystemServiceApplication.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.system; 2 | 3 | import com.xiaoyu.common.core.constant.AppConstant; 4 | import com.xiaoyu.user.fallback.UserFallbackFactory; 5 | import org.mybatis.spring.annotation.MapperScan; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; 9 | import org.springframework.cloud.openfeign.EnableFeignClients; 10 | import org.springframework.context.annotation.Import; 11 | 12 | /** 13 | * 14 | * @author zxy 15 | */ 16 | @SpringBootApplication() 17 | @EnableDiscoveryClient 18 | @MapperScan(AppConstant.SYSTEM_SERVICE_MAPPER) 19 | @EnableFeignClients(basePackages = {AppConstant.USER_SERVICE_FEIGN_PACKAGES}) 20 | @Import(UserFallbackFactory.class) 21 | public class XiaoYuSystemServiceApplication { 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(XiaoYuSystemServiceApplication.class, args); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /xiaoyu-auth/src/main/java/com/xiaoyu/auth/config/TokenConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.auth.config; 2 | 3 | import com.xiaoyu.common.core.constant.AuthConstant; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.oauth2.provider.token.TokenStore; 7 | import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; 8 | import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; 9 | 10 | /** 11 | *

12 | * Token 13 | *

14 | * 15 | * @author ZhangXianYu Email: 1600501744@qq.com 16 | * @since 2020/9/14 11:58 17 | */ 18 | @Configuration 19 | public class TokenConfig { 20 | 21 | @Bean 22 | public TokenStore tokenStore() { 23 | //基于JWt 24 | return new JwtTokenStore(accessTokenConverter()); 25 | } 26 | 27 | @Bean 28 | public JwtAccessTokenConverter accessTokenConverter() { 29 | JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); 30 | converter.setSigningKey(AuthConstant.SALINGER); 31 | return converter; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/handler/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.handler; 2 | 3 | 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.xiaoyu.common.security.exception.AccessDeniedException; 6 | import org.springframework.http.HttpStatus; 7 | import org.springframework.web.bind.annotation.ControllerAdvice; 8 | import org.springframework.web.bind.annotation.ExceptionHandler; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | /** 12 | *

13 | * controller 全局异常处理,针对性处理AccessDeniedException 异常 14 | *

15 | * 16 | * @author ZhangXianYu Email: 1600501744@qq.com 17 | * @since 2020/9/27 14:15 18 | */ 19 | @ControllerAdvice 20 | public class GlobalExceptionHandler { 21 | 22 | @ExceptionHandler(value = AccessDeniedException.class) 23 | @ResponseBody 24 | public String exceptionHandler() { 25 | JSONObject jsonObject = new JSONObject(); 26 | jsonObject.put("code", HttpStatus.FORBIDDEN.value()); 27 | jsonObject.put("msg", "Permission denied,Please authorize"); 28 | return jsonObject.toJSONString(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobRegistryDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobRegistry; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.junit4.SpringRunner; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.Arrays; 11 | import java.util.Date; 12 | import java.util.List; 13 | 14 | @RunWith(SpringRunner.class) 15 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 16 | public class XxlJobRegistryDaoTest { 17 | 18 | @Resource 19 | private XxlJobRegistryDao xxlJobRegistryDao; 20 | 21 | @Test 22 | public void test(){ 23 | int ret = xxlJobRegistryDao.registryUpdate("g1", "k1", "v1", new Date()); 24 | if (ret < 1) { 25 | ret = xxlJobRegistryDao.registrySave("g1", "k1", "v1", new Date()); 26 | } 27 | 28 | List list = xxlJobRegistryDao.findAll(1, new Date()); 29 | 30 | int ret2 = xxlJobRegistryDao.removeDead(Arrays.asList(1)); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/config/TokenConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.config; 2 | 3 | import com.xiaoyu.common.core.constant.AuthConstant; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.security.oauth2.provider.token.TokenStore; 7 | import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; 8 | import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; 9 | 10 | /** 11 | *

12 | * Token 13 | *

14 | * 15 | * @author ZhangXianYu Email: 1600501744@qq.com 16 | * @since 2020/9/14 11:58 17 | */ 18 | @Configuration 19 | public class TokenConfig { 20 | 21 | @Bean 22 | public TokenStore tokenStore() { 23 | //基于JWt 24 | return new JwtTokenStore(accessTokenConverter()); 25 | } 26 | 27 | @Bean 28 | public JwtAccessTokenConverter accessTokenConverter() { 29 | JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); 30 | converter.setSigningKey(AuthConstant.SALINGER); 31 | return converter; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-job/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | xiaoyu-common 7 | com.xiaoyu 8 | 1.0.1 9 | 10 | 4.0.0 11 | 12 | xiaoyu-common-job 13 | ${common.version} 14 | jar 15 | XiaoYu 分布式任务执行器,微服务中需要使用到job就引入此包 16 | 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-starter-web 22 | true 23 | 24 | 25 | 26 | com.xuxueli 27 | xxl-job-core 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.util; 2 | 3 | import freemarker.ext.beans.BeansWrapper; 4 | import freemarker.ext.beans.BeansWrapperBuilder; 5 | import freemarker.template.Configuration; 6 | import freemarker.template.TemplateHashModel; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | 10 | /** 11 | * ftl util 12 | * 13 | * @author xuxueli 2018-01-17 20:37:48 14 | */ 15 | public class FtlUtil { 16 | private static Logger logger = LoggerFactory.getLogger(FtlUtil.class); 17 | 18 | private static BeansWrapper wrapper = new BeansWrapperBuilder(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS).build(); //BeansWrapper.getDefaultInstance(); 19 | 20 | public static TemplateHashModel generateStaticModel(String packageName) { 21 | try { 22 | TemplateHashModel staticModels = wrapper.getStaticModels(); 23 | TemplateHashModel fileStatics = (TemplateHashModel) staticModels.get(packageName); 24 | return fileStatics; 25 | } catch (Exception e) { 26 | logger.error(e.getMessage(), e); 27 | } 28 | return null; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /xiaoyu-gateway/src/main/java/com/xiaoyu/gateway/config/WhitelistPathConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.gateway.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.cloud.context.config.annotation.RefreshScope; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | *

12 | * 配置网关访问白名单,指定路径不做拦截。 13 | * 配置到 Nacos 中 14 | *

15 | * 16 | * @author ZhangXianYu Email: 1600501744@qq.com 17 | * @since 2020/8/31 15:20 18 | */ 19 | @Component 20 | @RefreshScope 21 | @ConfigurationProperties(prefix = WhitelistPathConfig.PREFIX) 22 | public class WhitelistPathConfig { 23 | 24 | static final String PREFIX = "ignore"; 25 | 26 | /** 27 | * 白名单 Url 28 | */ 29 | private List urls = new ArrayList<>(); 30 | 31 | public List getUrls() { 32 | return urls; 33 | } 34 | 35 | public void setUrls(List urls) { 36 | this.urls = urls; 37 | urls.add("/**/v2/api-docs"); 38 | urls.add("/**/doc.html"); 39 | urls.add("/**/webjars/**"); 40 | urls.add("/**/swagger-resources/**"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/old/RemoteHttpJobBean.java: -------------------------------------------------------------------------------- 1 | //package com.xxl.job.admin.core.jobbean; 2 | // 3 | //import com.xxl.job.admin.core.thread.JobTriggerPoolHelper; 4 | //import com.xxl.job.admin.core.trigger.TriggerTypeEnum; 5 | //import org.quartz.JobExecutionContext; 6 | //import org.quartz.JobExecutionException; 7 | //import org.quartz.JobKey; 8 | //import org.slf4j.Logger; 9 | //import org.slf4j.LoggerFactory; 10 | //import org.springframework.scheduling.quartz.QuartzJobBean; 11 | // 12 | ///** 13 | // * http job bean 14 | // * “@DisallowConcurrentExecution” disable concurrent, thread size can not be only one, better given more 15 | // * @author xuxueli 2015-12-17 18:20:34 16 | // */ 17 | ////@DisallowConcurrentExecution 18 | //public class RemoteHttpJobBean extends QuartzJobBean { 19 | // private static Logger logger = LoggerFactory.getLogger(RemoteHttpJobBean.class); 20 | // 21 | // @Override 22 | // protected void executeInternal(JobExecutionContext context) 23 | // throws JobExecutionException { 24 | // 25 | // // load jobId 26 | // JobKey jobKey = context.getTrigger().getJobKey(); 27 | // Integer jobId = Integer.valueOf(jobKey.getName()); 28 | // 29 | // 30 | // } 31 | // 32 | //} -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/controller/AbstractSpringMvcTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.controller; 2 | 3 | import org.junit.Before; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.ContextConfiguration; 8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | import org.springframework.test.context.web.WebAppConfiguration; 11 | import org.springframework.test.web.servlet.MockMvc; 12 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 13 | import org.springframework.web.context.WebApplicationContext; 14 | 15 | @RunWith(SpringRunner.class) 16 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 17 | public class AbstractSpringMvcTest { 18 | 19 | @Autowired 20 | private WebApplicationContext applicationContext; 21 | protected MockMvc mockMvc; 22 | 23 | @Before 24 | public void setup() { 25 | this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext).build(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/config/WhitelistPathConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.cloud.context.config.annotation.RefreshScope; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | *

12 | * 白名单访问url,无需通过网关鉴权可以直接访问。 13 | *

14 | * 15 | * @author ZhangXianYu Email: 1600501744@qq.com 16 | * @since 2020/8/31 15:20 17 | */ 18 | @Component 19 | @RefreshScope 20 | @ConfigurationProperties(prefix = WhitelistPathConfig.PREFIX) 21 | public class WhitelistPathConfig { 22 | 23 | static final String PREFIX = "ignore"; 24 | 25 | /** 26 | * 白名单 Url 27 | */ 28 | private List urls = new ArrayList<>(); 29 | 30 | public List getUrls() { 31 | return urls; 32 | } 33 | 34 | public void setUrls(List urls) { 35 | this.urls = urls; 36 | urls.add("/swagger-ui/**"); 37 | urls.add("/actuator/**"); 38 | urls.add("/**/v2/api-docs"); 39 | urls.add("/v2/api-docs"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/src/main/java/com/xiaoyu/user/entity/SystemRole.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | import java.io.Serializable; 11 | 12 | /** 13 | *

14 | * 15 | *

16 | * 17 | * @author ZhangXianYu 18 | * @since 2020-09-14 19 | */ 20 | @TableName("system_role") 21 | @Data 22 | @EqualsAndHashCode() 23 | public class SystemRole implements Serializable { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | /** 28 | * 角色编号 29 | */ 30 | @TableId(value = "role_no", type = IdType.AUTO) 31 | private Integer roleNo; 32 | 33 | 34 | /** 35 | * 角色code 36 | */ 37 | @TableField("role_code") 38 | private String roleCode; 39 | 40 | /** 41 | * 角色名称 42 | */ 43 | @TableField("role_name") 44 | private String roleName; 45 | 46 | /** 47 | * 角色描述 48 | */ 49 | @TableField("role_describe") 50 | private String roleDescribe; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/core/util/JacksonUtilTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.util; 2 | 3 | import org.hamcrest.core.Is; 4 | import org.junit.Test; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | import static com.xxl.job.admin.core.util.JacksonUtil.writeValueAsString; 10 | import static org.hamcrest.core.Is.is; 11 | import static org.junit.Assert.assertThat; 12 | 13 | public class JacksonUtilTest { 14 | 15 | @Test 16 | public void shouldWriteValueAsString() { 17 | //given 18 | Map map = new HashMap<>(); 19 | map.put("aaa", "111"); 20 | map.put("bbb", "222"); 21 | 22 | //when 23 | String json = writeValueAsString(map); 24 | 25 | //then 26 | assertThat(json, is("{\"aaa\":\"111\",\"bbb\":\"222\"}")); 27 | } 28 | 29 | @Test 30 | public void shouldReadValueAsObject() { 31 | //given 32 | String jsonString = "{\"aaa\":\"111\",\"bbb\":\"222\"}"; 33 | 34 | //when 35 | Map result = JacksonUtil.readValue(jsonString, Map.class); 36 | 37 | //then 38 | assertThat(result.get("aaa"), Is.is("111")); 39 | assertThat(result.get("bbb"), Is.is("222")); 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | xiaoyu-common 7 | com.xiaoyu 8 | 1.0.1 9 | 10 | 4.0.0 11 | 12 | xiaoyu-common-core 13 | xiaoyu-common-core 14 | ${common.version} 15 | jar 16 | XiaoYu 微服务核心公共包 17 | 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-web 23 | true 24 | 25 | 26 | 27 | com.alibaba.cloud 28 | spring-cloud-starter-alibaba-nacos-config 29 | 30 | true 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobLogReport.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.model; 2 | 3 | import java.util.Date; 4 | 5 | public class XxlJobLogReport { 6 | 7 | private int id; 8 | 9 | private Date triggerDay; 10 | 11 | private int runningCount; 12 | private int sucCount; 13 | private int failCount; 14 | 15 | public int getId() { 16 | return id; 17 | } 18 | 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | 23 | public Date getTriggerDay() { 24 | return triggerDay; 25 | } 26 | 27 | public void setTriggerDay(Date triggerDay) { 28 | this.triggerDay = triggerDay; 29 | } 30 | 31 | public int getRunningCount() { 32 | return runningCount; 33 | } 34 | 35 | public void setRunningCount(int runningCount) { 36 | this.runningCount = runningCount; 37 | } 38 | 39 | public int getSucCount() { 40 | return sucCount; 41 | } 42 | 43 | public void setSucCount(int sucCount) { 44 | this.sucCount = sucCount; 45 | } 46 | 47 | public int getFailCount() { 48 | return failCount; 49 | } 50 | 51 | public void setFailCount(int failCount) { 52 | this.failCount = failCount; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobLogGlueDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobLogGlue; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.junit4.SpringRunner; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.Date; 11 | import java.util.List; 12 | 13 | @RunWith(SpringRunner.class) 14 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 15 | public class XxlJobLogGlueDaoTest { 16 | 17 | @Resource 18 | private XxlJobLogGlueDao xxlJobLogGlueDao; 19 | 20 | @Test 21 | public void test(){ 22 | XxlJobLogGlue logGlue = new XxlJobLogGlue(); 23 | logGlue.setJobId(1); 24 | logGlue.setGlueType("1"); 25 | logGlue.setGlueSource("1"); 26 | logGlue.setGlueRemark("1"); 27 | 28 | logGlue.setAddTime(new Date()); 29 | logGlue.setUpdateTime(new Date()); 30 | int ret = xxlJobLogGlueDao.save(logGlue); 31 | 32 | List list = xxlJobLogGlueDao.findByJobId(1); 33 | 34 | int ret2 = xxlJobLogGlueDao.removeOld(1, 1); 35 | 36 | int ret3 =xxlJobLogGlueDao.deleteByJobId(1); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /xiaoyu-common/xiaoyu-common-security/src/main/java/com/xiaoyu/common/security/handler/CustomAccessDeniedHandler.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.common.security.handler; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.springframework.http.HttpStatus; 5 | import org.springframework.security.access.AccessDeniedException; 6 | import org.springframework.security.web.access.AccessDeniedHandler; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import java.io.IOException; 11 | import java.nio.charset.StandardCharsets; 12 | 13 | /** 14 | *

15 | * 拒绝访问处理器 16 | *

17 | *

18 | * 19 | * @author ZhangXianYu Email: 1600501744@qq.com 20 | * @since 2020/9/21 12:47 21 | */ 22 | public class CustomAccessDeniedHandler implements AccessDeniedHandler { 23 | 24 | @Override 25 | public void handle(HttpServletRequest request, HttpServletResponse response, 26 | AccessDeniedException accessDeniedException) throws IOException { 27 | JSONObject jsonObject = new JSONObject(); 28 | jsonObject.put("code",HttpStatus.FORBIDDEN.value()); 29 | jsonObject.put("msg","无权访问"); 30 | byte[] bytes = jsonObject.toString().getBytes(StandardCharsets.UTF_8); 31 | response.getOutputStream().write(bytes); 32 | } 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobGroupDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobGroup; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by xuxueli on 16/9/30. 11 | */ 12 | @Mapper 13 | public interface XxlJobGroupDao { 14 | 15 | public List findAll(); 16 | 17 | public List findByAddressType(@Param("addressType") int addressType); 18 | 19 | public int save(XxlJobGroup xxlJobGroup); 20 | 21 | public int update(XxlJobGroup xxlJobGroup); 22 | 23 | public int remove(@Param("id") int id); 24 | 25 | public XxlJobGroup load(@Param("id") int id); 26 | 27 | public List pageList(@Param("offset") int offset, 28 | @Param("pagesize") int pagesize, 29 | @Param("appname") String appname, 30 | @Param("title") String title); 31 | 32 | public int pageListCount(@Param("offset") int offset, 33 | @Param("pagesize") int pagesize, 34 | @Param("appname") String appname, 35 | @Param("title") String title); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/old/XxlJobThreadPool.java: -------------------------------------------------------------------------------- 1 | //package com.xxl.job.admin.core.quartz; 2 | // 3 | //import org.quartz.SchedulerConfigException; 4 | //import org.quartz.spi.ThreadPool; 5 | // 6 | ///** 7 | // * single thread pool, for async trigger 8 | // * 9 | // * @author xuxueli 2019-03-06 10 | // */ 11 | //public class XxlJobThreadPool implements ThreadPool { 12 | // 13 | // @Override 14 | // public boolean runInThread(Runnable runnable) { 15 | // 16 | // // async run 17 | // runnable.run(); 18 | // return true; 19 | // 20 | // //return false; 21 | // } 22 | // 23 | // @Override 24 | // public int blockForAvailableThreads() { 25 | // return 1; 26 | // } 27 | // 28 | // @Override 29 | // public void initialize() throws SchedulerConfigException { 30 | // 31 | // } 32 | // 33 | // @Override 34 | // public void shutdown(boolean waitForJobsToComplete) { 35 | // 36 | // } 37 | // 38 | // @Override 39 | // public int getPoolSize() { 40 | // return 1; 41 | // } 42 | // 43 | // @Override 44 | // public void setInstanceId(String schedInstId) { 45 | // 46 | // } 47 | // 48 | // @Override 49 | // public void setInstanceName(String schedName) { 50 | // 51 | // } 52 | // 53 | // // support 54 | // public void setThreadCount(int count) { 55 | // // 56 | // } 57 | // 58 | //} 59 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobRegistry.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.model; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by xuxueli on 16/9/30. 7 | */ 8 | public class XxlJobRegistry { 9 | 10 | private int id; 11 | private String registryGroup; 12 | private String registryKey; 13 | private String registryValue; 14 | private Date updateTime; 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | 24 | public String getRegistryGroup() { 25 | return registryGroup; 26 | } 27 | 28 | public void setRegistryGroup(String registryGroup) { 29 | this.registryGroup = registryGroup; 30 | } 31 | 32 | public String getRegistryKey() { 33 | return registryKey; 34 | } 35 | 36 | public void setRegistryKey(String registryKey) { 37 | this.registryKey = registryKey; 38 | } 39 | 40 | public String getRegistryValue() { 41 | return registryValue; 42 | } 43 | 44 | public void setRegistryValue(String registryValue) { 45 | this.registryValue = registryValue; 46 | } 47 | 48 | public Date getUpdateTime() { 49 | return updateTime; 50 | } 51 | 52 | public void setUpdateTime(Date updateTime) { 53 | this.updateTime = updateTime; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /xiaoyu-service-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | XiaoYu 7 | com.xiaoyu 8 | 1.0.1 9 | 10 | 4.0.0 11 | 12 | xiaoyu-service-api 13 | 1.0.1 14 | pom 15 | XiaoYu 微服务API集合 16 | 17 | 18 | xiaoyu-user-api 19 | 20 | 21 | 22 | 23 | 24 | 25 | com.baomidou 26 | mybatis-plus-boot-starter 27 | true 28 | 29 | 30 | 31 | org.springframework.cloud 32 | spring-cloud-starter-openfeign 33 | 34 | 35 | 36 | com.xiaoyu 37 | xiaoyu-common-core 38 | 39 | 40 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/dao/XxlJobGroupDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobGroup; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.junit4.SpringRunner; 8 | 9 | import javax.annotation.Resource; 10 | import java.util.List; 11 | 12 | @RunWith(SpringRunner.class) 13 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 14 | public class XxlJobGroupDaoTest { 15 | 16 | @Resource 17 | private XxlJobGroupDao xxlJobGroupDao; 18 | 19 | @Test 20 | public void test(){ 21 | List list = xxlJobGroupDao.findAll(); 22 | 23 | List list2 = xxlJobGroupDao.findByAddressType(0); 24 | 25 | XxlJobGroup group = new XxlJobGroup(); 26 | group.setAppname("setAppName"); 27 | group.setTitle("setTitle"); 28 | group.setAddressType(0); 29 | group.setAddressList("setAddressList"); 30 | 31 | int ret = xxlJobGroupDao.save(group); 32 | 33 | XxlJobGroup group2 = xxlJobGroupDao.load(group.getId()); 34 | group2.setAppname("setAppName2"); 35 | group2.setTitle("setTitle2"); 36 | group2.setAddressType(2); 37 | group2.setAddressList("setAddressList2"); 38 | 39 | int ret2 = xxlJobGroupDao.update(group2); 40 | 41 | int ret3 = xxlJobGroupDao.remove(group.getId()); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /xiaoyu-service/xiaoyu-user-service/src/main/java/com/xiaoyu/user/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.controller; 2 | 3 | import com.alibaba.csp.sentinel.annotation.SentinelResource; 4 | import com.xiaoyu.common.core.bo.R; 5 | import com.xiaoyu.common.security.annotation.PermissionAuthorize; 6 | import com.xiaoyu.user.entity.SystemUser; 7 | import com.xiaoyu.user.sentinel.block.UserBlock; 8 | import com.xiaoyu.user.sentinel.fallback.UserFallback; 9 | import com.xiaoyu.user.service.ISystemUserService; 10 | import io.swagger.annotations.Api; 11 | import lombok.AllArgsConstructor; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | *

19 | * 20 | *

21 | * 22 | * @author ZhangXianYu Email: 1600501744@qq.com 23 | * @since 2020/9/21 13:55 24 | */ 25 | @RestController 26 | @Api(value = "用户服务接口") 27 | @AllArgsConstructor 28 | public class UserController { 29 | 30 | private final ISystemUserService iSystemUserService; 31 | 32 | @RequestMapping(value = "/list") 33 | @SentinelResource(value = "list", blockHandlerClass = UserBlock.class, blockHandler = "listBlock", 34 | fallbackClass = UserFallback.class, fallback = "listBack") 35 | public R list() { 36 | return R.success("yes"); 37 | } 38 | 39 | @RequestMapping(value = "/user/view") 40 | @PermissionAuthorize 41 | public R> test() { 42 | return R.success(iSystemUserService.list()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/controller/interceptor/CookieInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.controller.interceptor; 2 | 3 | import com.xxl.job.admin.core.util.FtlUtil; 4 | import com.xxl.job.admin.core.util.I18nUtil; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.servlet.ModelAndView; 7 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 8 | 9 | import javax.servlet.http.Cookie; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import java.util.HashMap; 13 | 14 | /** 15 | * push cookies to model as cookieMap 16 | * 17 | * @author xuxueli 2015-12-12 18:09:04 18 | */ 19 | @Component 20 | public class CookieInterceptor extends HandlerInterceptorAdapter { 21 | 22 | @Override 23 | public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, 24 | ModelAndView modelAndView) throws Exception { 25 | 26 | // cookie 27 | if (modelAndView!=null && request.getCookies()!=null && request.getCookies().length>0) { 28 | HashMap cookieMap = new HashMap(); 29 | for (Cookie ck : request.getCookies()) { 30 | cookieMap.put(ck.getName(), ck); 31 | } 32 | modelAndView.addObject("cookieMap", cookieMap); 33 | } 34 | 35 | // static method 36 | if (modelAndView != null) { 37 | modelAndView.addObject("I18nUtil", FtlUtil.generateStaticModel(I18nUtil.class.getName())); 38 | } 39 | 40 | super.postHandle(request, response, handler, modelAndView); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 36 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/src/main/java/com/xiaoyu/user/fallback/UserFallbackFactory.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.fallback; 2 | 3 | import com.xiaoyu.common.core.bo.R; 4 | import com.xiaoyu.user.entity.SystemRole; 5 | import com.xiaoyu.user.entity.SystemUser; 6 | import com.xiaoyu.user.feign.IUserClient; 7 | import feign.hystrix.FallbackFactory; 8 | import org.springframework.stereotype.Component; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | *

14 | * 用户服务远程调用异常统一处理,这里是指执行完业务异常后的返回消息处理,sentinel 熔断是异常到了一定的阈值 15 | * 后,直接快速返回异常信息,并不会执行相关业务逻辑。 16 | *

17 | * 18 | * @author ZhangXianYu Email: 1600501744@qq.com 19 | * @since 2020/9/30 10:19 20 | */ 21 | @Component 22 | public class UserFallbackFactory implements FallbackFactory { 23 | 24 | @Override 25 | public IUserClient create(Throwable throwable) { 26 | return new IUserClient() { 27 | @Override 28 | public R userByUsername(String username) { 29 | return R.fail(throwable.getMessage()); 30 | } 31 | 32 | @Override 33 | public R> getSystemPermissions(String userName) { 34 | return R.fail(throwable.getMessage()); 35 | } 36 | 37 | @Override 38 | public R> queryUserRolesByUserId(String userName) { 39 | return R.fail(throwable.getMessage()); 40 | } 41 | 42 | @Override 43 | public R updateUserEmail(String userName) { 44 | return R.fail(throwable.getMessage()); 45 | } 46 | }; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /.idea/$PRODUCT_WORKSPACE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 1.8 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobUser.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.model; 2 | 3 | import org.springframework.util.StringUtils; 4 | 5 | /** 6 | * @author xuxueli 2019-05-04 16:43:12 7 | */ 8 | public class XxlJobUser { 9 | 10 | private int id; 11 | private String username; // 账号 12 | private String password; // 密码 13 | private int role; // 角色:0-普通用户、1-管理员 14 | private String permission; // 权限:执行器ID列表,多个逗号分割 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | 20 | public void setId(int id) { 21 | this.id = id; 22 | } 23 | 24 | public String getUsername() { 25 | return username; 26 | } 27 | 28 | public void setUsername(String username) { 29 | this.username = username; 30 | } 31 | 32 | public String getPassword() { 33 | return password; 34 | } 35 | 36 | public void setPassword(String password) { 37 | this.password = password; 38 | } 39 | 40 | public int getRole() { 41 | return role; 42 | } 43 | 44 | public void setRole(int role) { 45 | this.role = role; 46 | } 47 | 48 | public String getPermission() { 49 | return permission; 50 | } 51 | 52 | public void setPermission(String permission) { 53 | this.permission = permission; 54 | } 55 | 56 | // plugin 57 | public boolean validPermission(int jobGroup){ 58 | if (this.role == 1) { 59 | return true; 60 | } else { 61 | if (StringUtils.hasText(this.permission)) { 62 | for (String permissionItem : this.permission.split(",")) { 63 | if (String.valueOf(jobGroup).equals(permissionItem)) { 64 | return true; 65 | } 66 | } 67 | } 68 | return false; 69 | } 70 | 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobRegistryDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobRegistry; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by xuxueli on 16/9/30. 12 | */ 13 | @Mapper 14 | public interface XxlJobRegistryDao { 15 | 16 | public List findDead(@Param("timeout") int timeout, 17 | @Param("nowTime") Date nowTime); 18 | 19 | public int removeDead(@Param("ids") List ids); 20 | 21 | public List findAll(@Param("timeout") int timeout, 22 | @Param("nowTime") Date nowTime); 23 | 24 | public int registryUpdate(@Param("registryGroup") String registryGroup, 25 | @Param("registryKey") String registryKey, 26 | @Param("registryValue") String registryValue, 27 | @Param("updateTime") Date updateTime); 28 | 29 | public int registrySave(@Param("registryGroup") String registryGroup, 30 | @Param("registryKey") String registryKey, 31 | @Param("registryValue") String registryValue, 32 | @Param("updateTime") Date updateTime); 33 | 34 | public int registryDelete(@Param("registryGroup") String registryGroup, 35 | @Param("registryKey") String registryKey, 36 | @Param("registryValue") String registryValue); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/test/java/com/xxl/job/admin/controller/JobInfoControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.controller; 2 | 3 | import com.xxl.job.admin.service.LoginService; 4 | import org.junit.Before; 5 | import org.junit.Test; 6 | import org.springframework.http.MediaType; 7 | import org.springframework.test.web.servlet.MvcResult; 8 | import org.springframework.util.LinkedMultiValueMap; 9 | import org.springframework.util.MultiValueMap; 10 | 11 | import javax.servlet.http.Cookie; 12 | 13 | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; 14 | 15 | public class JobInfoControllerTest extends AbstractSpringMvcTest { 16 | 17 | private Cookie cookie; 18 | 19 | @Before 20 | public void login() throws Exception { 21 | MvcResult ret = mockMvc.perform( 22 | post("/login") 23 | .contentType(MediaType.APPLICATION_FORM_URLENCODED) 24 | .param("userName", "admin") 25 | .param("password", "123456") 26 | ).andReturn(); 27 | cookie = ret.getResponse().getCookie(LoginService.LOGIN_IDENTITY_KEY); 28 | } 29 | 30 | @Test 31 | public void testAdd() throws Exception { 32 | MultiValueMap parameters = new LinkedMultiValueMap(); 33 | parameters.add("jobGroup", "1"); 34 | 35 | MvcResult ret = mockMvc.perform( 36 | post("/jobinfo/pageList") 37 | .contentType(MediaType.APPLICATION_FORM_URLENCODED) 38 | //.content(paramsJson) 39 | .params(parameters) 40 | .cookie(cookie) 41 | ).andReturn(); 42 | 43 | System.out.println(ret.getResponse().getContentAsString()); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobLogGlue.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.model; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * xxl-job log for glue, used to track job code process 7 | * @author xuxueli 2016-5-19 17:57:46 8 | */ 9 | public class XxlJobLogGlue { 10 | 11 | private int id; 12 | private int jobId; // 任务主键ID 13 | private String glueType; // GLUE类型 #com.xxl.job.core.glue.GlueTypeEnum 14 | private String glueSource; 15 | private String glueRemark; 16 | private Date addTime; 17 | private Date updateTime; 18 | 19 | public int getId() { 20 | return id; 21 | } 22 | 23 | public void setId(int id) { 24 | this.id = id; 25 | } 26 | 27 | public int getJobId() { 28 | return jobId; 29 | } 30 | 31 | public void setJobId(int jobId) { 32 | this.jobId = jobId; 33 | } 34 | 35 | public String getGlueType() { 36 | return glueType; 37 | } 38 | 39 | public void setGlueType(String glueType) { 40 | this.glueType = glueType; 41 | } 42 | 43 | public String getGlueSource() { 44 | return glueSource; 45 | } 46 | 47 | public void setGlueSource(String glueSource) { 48 | this.glueSource = glueSource; 49 | } 50 | 51 | public String getGlueRemark() { 52 | return glueRemark; 53 | } 54 | 55 | public void setGlueRemark(String glueRemark) { 56 | this.glueRemark = glueRemark; 57 | } 58 | 59 | public Date getAddTime() { 60 | return addTime; 61 | } 62 | 63 | public void setAddTime(Date addTime) { 64 | this.addTime = addTime; 65 | } 66 | 67 | public Date getUpdateTime() { 68 | return updateTime; 69 | } 70 | 71 | public void setUpdateTime(Date updateTime) { 72 | this.updateTime = updateTime; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/dao/XxlJobInfoDao.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.dao; 2 | 3 | import com.xxl.job.admin.core.model.XxlJobInfo; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | 9 | 10 | /** 11 | * job info 12 | * @author xuxueli 2016-1-12 18:03:45 13 | */ 14 | @Mapper 15 | public interface XxlJobInfoDao { 16 | 17 | public List pageList(@Param("offset") int offset, 18 | @Param("pagesize") int pagesize, 19 | @Param("jobGroup") int jobGroup, 20 | @Param("triggerStatus") int triggerStatus, 21 | @Param("jobDesc") String jobDesc, 22 | @Param("executorHandler") String executorHandler, 23 | @Param("author") String author); 24 | public int pageListCount(@Param("offset") int offset, 25 | @Param("pagesize") int pagesize, 26 | @Param("jobGroup") int jobGroup, 27 | @Param("triggerStatus") int triggerStatus, 28 | @Param("jobDesc") String jobDesc, 29 | @Param("executorHandler") String executorHandler, 30 | @Param("author") String author); 31 | 32 | public int save(XxlJobInfo info); 33 | 34 | public XxlJobInfo loadById(@Param("id") int id); 35 | 36 | public int update(XxlJobInfo xxlJobInfo); 37 | 38 | public int delete(@Param("id") long id); 39 | 40 | public List getJobsByGroup(@Param("jobGroup") int jobGroup); 41 | 42 | public int findAllCount(); 43 | 44 | public List scheduleJobQuery(@Param("maxNextTime") long maxNextTime, @Param("pagesize") int pagesize ); 45 | 46 | public int scheduleUpdate(XxlJobInfo xxlJobInfo); 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/src/main/java/com/xiaoyu/user/entity/SystemUserRole.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | *

12 | * 13 | *

14 | * 15 | * @author ZhangXianYu 16 | * @since 2020-09-14 17 | */ 18 | @TableName("system_user_role") 19 | public class SystemUserRole implements Serializable { 20 | 21 | private static final long serialVersionUID = 1L; 22 | 23 | @TableId(value = "user_role_id", type = IdType.AUTO) 24 | private Integer userRoleId; 25 | 26 | @TableField("user_id") 27 | private Integer userId; 28 | 29 | @TableField("role_id") 30 | private Integer roleId; 31 | 32 | public Integer getUserRoleId() { 33 | return userRoleId; 34 | } 35 | 36 | public void setUserRoleId(Integer userRoleId) { 37 | this.userRoleId = userRoleId; 38 | } 39 | public Integer getUserId() { 40 | return userId; 41 | } 42 | 43 | public void setUserId(Integer userId) { 44 | this.userId = userId; 45 | } 46 | public Integer getRoleId() { 47 | return roleId; 48 | } 49 | 50 | public void setRoleId(Integer roleId) { 51 | this.roleId = roleId; 52 | } 53 | 54 | @Override 55 | public String toString() { 56 | return "SystemUserRole{" + 57 | "userRoleId=" + userRoleId + 58 | ", userId=" + userId + 59 | ", roleId=" + roleId + 60 | "}"; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/resources/templates/help.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <#import "./common/common.macro.ftl" as netCommon> 5 | <@netCommon.commonStyle /> 6 | ${I18n.admin_name} 7 | 8 | sidebar-collapse "> 9 |
10 | 11 | <@netCommon.commonHeader /> 12 | 13 | <@netCommon.commonLeft "help" /> 14 | 15 | 16 |
17 | 18 |
19 |

${I18n.job_help}

20 |
21 | 22 | 23 |
24 |
25 |

${I18n.admin_name_full}

26 |
27 |

28 | Github     29 | 30 |

31 | ${I18n.job_help_document} 32 |

33 | 34 |

35 |

36 |
37 |
38 | 39 |
40 | 41 | 42 | 43 | <@netCommon.commonFooter /> 44 |
45 | <@netCommon.commonScript /> 46 | 47 | 48 | -------------------------------------------------------------------------------- /xiaoyu-service-api/xiaoyu-user-api/src/main/java/com/xiaoyu/user/entity/SystemUser.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.user.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | import lombok.EqualsAndHashCode; 9 | 10 | /** 11 | *

12 | * 13 | *

14 | * 15 | * @author ZhangXianYu 16 | * @since 2020-09-15 17 | */ 18 | @Data 19 | @EqualsAndHashCode() 20 | @TableName("system_user") 21 | public class SystemUser { 22 | 23 | private static final long serialVersionUID = 1L; 24 | 25 | /** 26 | * 用户编号 27 | */ 28 | @TableId(value = "user_id", type = IdType.AUTO) 29 | private Integer userId; 30 | 31 | /** 32 | * 用户名 33 | */ 34 | @TableField("user_name") 35 | private String userName; 36 | 37 | /** 38 | * 加密密码 39 | */ 40 | @TableField("password") 41 | private String password; 42 | 43 | /** 44 | * 密码盐,32位随机数,修改密码时重置 45 | */ 46 | @TableField("salt") 47 | private String salt; 48 | 49 | /** 50 | * 真实姓名 51 | */ 52 | @TableField("real_name") 53 | private String realName; 54 | 55 | /** 56 | * 邮件 57 | */ 58 | @TableField("email") 59 | private String email; 60 | 61 | /** 62 | * 手机号码 63 | */ 64 | @TableField("phone") 65 | private String phone; 66 | 67 | /** 68 | * 0-正常 69 | */ 70 | @TableField("status") 71 | private String status; 72 | 73 | /** 74 | * 逻辑删除标记 75 | */ 76 | @TableField("flag") 77 | private Integer flag; 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /xiaoyu-manage/xiaoyu-admin/src/main/java/com/xiaoyu/admin/config/SecuritySecureConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.admin.config; 2 | 3 | import de.codecentric.boot.admin.server.config.AdminServerProperties; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 6 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 7 | import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; 8 | 9 | /** 10 | * 配置 监控 11 | * 12 | * @author zxy 13 | */ 14 | @Configuration 15 | public class SecuritySecureConfig extends WebSecurityConfigurerAdapter { 16 | 17 | private final String adminContextPath; 18 | 19 | public SecuritySecureConfig(AdminServerProperties adminServerProperties) { 20 | this.adminContextPath = adminServerProperties.getContextPath(); 21 | } 22 | 23 | @Override 24 | protected void configure(HttpSecurity http) throws Exception { 25 | SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); 26 | successHandler.setTargetUrlParameter("redirectTo"); 27 | 28 | http.authorizeRequests() 29 | .antMatchers(adminContextPath + "/assets/**").permitAll() 30 | .antMatchers(adminContextPath + "/login").permitAll() 31 | .anyRequest().authenticated() 32 | .and() 33 | .formLogin().loginPage(adminContextPath + "/login").successHandler(successHandler).and() 34 | .logout().logoutUrl(adminContextPath + "/logout").and() 35 | .httpBasic().and() 36 | .csrf().disable(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/route/strategy/ExecutorRouteRound.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.route.strategy; 2 | 3 | import com.xxl.job.admin.core.route.ExecutorRouter; 4 | import com.xxl.job.core.biz.model.ReturnT; 5 | import com.xxl.job.core.biz.model.TriggerParam; 6 | 7 | import java.util.List; 8 | import java.util.Random; 9 | import java.util.concurrent.ConcurrentHashMap; 10 | import java.util.concurrent.ConcurrentMap; 11 | import java.util.concurrent.atomic.AtomicInteger; 12 | 13 | /** 14 | * Created by xuxueli on 17/3/10. 15 | */ 16 | public class ExecutorRouteRound extends ExecutorRouter { 17 | 18 | private static ConcurrentMap routeCountEachJob = new ConcurrentHashMap<>(); 19 | private static long CACHE_VALID_TIME = 0; 20 | 21 | private static int count(int jobId) { 22 | // cache clear 23 | if (System.currentTimeMillis() > CACHE_VALID_TIME) { 24 | routeCountEachJob.clear(); 25 | CACHE_VALID_TIME = System.currentTimeMillis() + 1000*60*60*24; 26 | } 27 | 28 | AtomicInteger count = routeCountEachJob.get(jobId); 29 | if (count == null || count.get() > 1000000) { 30 | // 初始化时主动Random一次,缓解首次压力 31 | count = new AtomicInteger(new Random().nextInt(100)); 32 | } else { 33 | // count++ 34 | count.addAndGet(1); 35 | } 36 | routeCountEachJob.put(jobId, count); 37 | return count.get(); 38 | } 39 | 40 | @Override 41 | public ReturnT route(TriggerParam triggerParam, List addressList) { 42 | String address = addressList.get(count(triggerParam.getJobId())%addressList.size()); 43 | return new ReturnT(address); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /xiaoyu-auth/src/main/java/com/xiaoyu/auth/config/WebSecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.xiaoyu.auth.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.authentication.AuthenticationManager; 6 | import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; 7 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 8 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 9 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 10 | import org.springframework.security.crypto.password.PasswordEncoder; 11 | 12 | 13 | /** 14 | *

15 | * WebSecurityConfig 16 | *

17 | * 18 | * @author ZhangXianYu Email: 1600501744@qq.com 19 | * @since 2020-09-13 14:02 20 | */ 21 | @Configuration 22 | @EnableGlobalMethodSecurity(securedEnabled = true, prePostEnabled = true) 23 | public class WebSecurityConfig extends WebSecurityConfigurerAdapter { 24 | 25 | /** 26 | *认证管理器 27 | */ 28 | @Bean 29 | @Override 30 | public AuthenticationManager authenticationManagerBean() throws Exception { 31 | return super.authenticationManagerBean(); 32 | } 33 | 34 | @Bean 35 | public PasswordEncoder passwordEncoder() { 36 | return new BCryptPasswordEncoder(); 37 | } 38 | 39 | //配置安全拦截机制 40 | @Override 41 | protected void configure(HttpSecurity http) throws Exception { 42 | http.csrf().disable() 43 | .authorizeRequests() 44 | .antMatchers("/login*").permitAll() 45 | .anyRequest().permitAll() 46 | .and() 47 | .formLogin(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /xiaoyu-manage/xxl-job-admin/src/main/java/com/xxl/job/admin/core/model/XxlJobGroup.java: -------------------------------------------------------------------------------- 1 | package com.xxl.job.admin.core.model; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Arrays; 5 | import java.util.List; 6 | 7 | /** 8 | * Created by xuxueli on 16/9/30. 9 | */ 10 | public class XxlJobGroup { 11 | 12 | private int id; 13 | private String appname; 14 | private String title; 15 | private int addressType; // 执行器地址类型:0=自动注册、1=手动录入 16 | private String addressList; // 执行器地址列表,多地址逗号分隔(手动录入) 17 | 18 | // registry list 19 | private List registryList; // 执行器地址列表(系统注册) 20 | public List getRegistryList() { 21 | if (addressList!=null && addressList.trim().length()>0) { 22 | registryList = new ArrayList(Arrays.asList(addressList.split(","))); 23 | } 24 | return registryList; 25 | } 26 | 27 | public int getId() { 28 | return id; 29 | } 30 | 31 | public void setId(int id) { 32 | this.id = id; 33 | } 34 | 35 | public String getAppname() { 36 | return appname; 37 | } 38 | 39 | public void setAppname(String appname) { 40 | this.appname = appname; 41 | } 42 | 43 | public String getTitle() { 44 | return title; 45 | } 46 | 47 | public void setTitle(String title) { 48 | this.title = title; 49 | } 50 | 51 | public int getAddressType() { 52 | return addressType; 53 | } 54 | 55 | public void setAddressType(int addressType) { 56 | this.addressType = addressType; 57 | } 58 | 59 | public String getAddressList() { 60 | return addressList; 61 | } 62 | 63 | public void setAddressList(String addressList) { 64 | this.addressList = addressList; 65 | } 66 | 67 | } 68 | --------------------------------------------------------------------------------