├── .editorconfig ├── .github ├── publish-alibaba.yml ├── publish-github.yml └── workflows │ ├── deploy.package.yml │ └── notify.qywx.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docs ├── TODO.md ├── logo.png └── xxljob.png ├── pom.xml ├── scripts └── deploy.sh ├── spring-boot-arthas ├── arthas-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── arthas │ │ │ └── autoconfiguration │ │ │ ├── ArthasAutoConfiguration.java │ │ │ └── properties │ │ │ └── ArthasProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-cache ├── cache-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── cache │ │ │ └── autoconfiguration │ │ │ ├── BloomFilterAutoConfiguration.java │ │ │ ├── CacheAutoConfiguration.java │ │ │ ├── RedissonAutoConfiguration.java │ │ │ ├── annotation │ │ │ ├── DistributeLock.java │ │ │ ├── NoRepeatSubmit.java │ │ │ ├── RDS.java │ │ │ └── RateLimit.java │ │ │ ├── aspect │ │ │ ├── DistributeLockAspect.java │ │ │ ├── DynamicRedisDataSourceAspect.java │ │ │ ├── NoRepeatSubmitAspect.java │ │ │ └── RateLimitAspect.java │ │ │ ├── bloom │ │ │ ├── RedisBitMap.java │ │ │ ├── RedisBloomFilter.java │ │ │ └── RedisBloomFilterStrategy.java │ │ │ ├── dynamic │ │ │ ├── AbstractRoutingConnectionFactory.java │ │ │ ├── DynamicDatasourceHolder.java │ │ │ └── DynamicRoutingConnectionFactory.java │ │ │ ├── enums │ │ │ ├── LockType.java │ │ │ └── RedisMode.java │ │ │ ├── exception │ │ │ └── DistributedLockException.java │ │ │ ├── lock │ │ │ ├── DistributedLock.java │ │ │ └── RedissonDistributedLock.java │ │ │ ├── properties │ │ │ ├── BloomFilterProperties.java │ │ │ ├── CacheProperties.java │ │ │ ├── RedissonDatasourceConfig.java │ │ │ └── RedissonProperties.java │ │ │ ├── queue │ │ │ └── RedisDelayedQueue.java │ │ │ ├── repository │ │ │ ├── CacheRepository.java │ │ │ └── RedisRepositoryImpl.java │ │ │ ├── serializer │ │ │ ├── RedisKeySerializer.java │ │ │ └── RedisObjectSerializer.java │ │ │ └── utils │ │ │ ├── CacheUtils.java │ │ │ ├── ElUtils.java │ │ │ └── RedissonUtils.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-cps ├── README.md ├── cps-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── cps │ │ │ └── autoconfiguration │ │ │ ├── CpsAutoConfiguration.java │ │ │ ├── enums │ │ │ └── PlatformType.java │ │ │ ├── impl │ │ │ ├── CpsBervice.java │ │ │ └── dataoke │ │ │ │ ├── DaTaoKeBerviceImpl.java │ │ │ │ └── lib │ │ │ │ ├── ApiClient.java │ │ │ │ ├── HttpUtil.java │ │ │ │ ├── HttpUtils.java │ │ │ │ └── SignMD5Util.java │ │ │ ├── pojo │ │ │ └── vo │ │ │ │ └── PrivilegeLinkVo.java │ │ │ └── properties │ │ │ └── CpsProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-dependencies └── pom.xml ├── spring-boot-distributed-lock ├── distributed-lock-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── distributed │ │ │ └── lock │ │ │ └── autoconfiguration │ │ │ ├── DistributedLockAutoConfiguration.java │ │ │ ├── annotation │ │ │ ├── LockKey.java │ │ │ └── UseLock.java │ │ │ ├── core │ │ │ ├── DistributedLock.java │ │ │ ├── KeyType.java │ │ │ └── LockAspect.java │ │ │ ├── exception │ │ │ └── DistributedLockException.java │ │ │ ├── impl │ │ │ ├── RedissonDistributedLock.java │ │ │ └── SimpleRedisDistributedLock.java │ │ │ └── properties │ │ │ └── DistributedLockProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-dynamic-datasource ├── dynamic-datasource-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── dynamic │ │ │ └── datasource │ │ │ └── autoconfiguration │ │ │ ├── DynamicDatasourceAutoConfiguration.java │ │ │ ├── aspect │ │ │ └── DynamicDatasourceAspect.java │ │ │ ├── core │ │ │ ├── Constants.java │ │ │ ├── DynamicDatasource.java │ │ │ ├── DynamicDatasourceHolder.java │ │ │ └── RoutingDataSource.java │ │ │ ├── pool │ │ │ ├── DatasourceHelper.java │ │ │ ├── DatasourceHelperManager.java │ │ │ └── support │ │ │ │ ├── DefaultDataSourceHelper.java │ │ │ │ └── DruidDataSourceHelper.java │ │ │ └── properties │ │ │ └── DynamicDataSourceProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-elasticsearch ├── elasticsearch-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── elasticsearch │ │ │ └── autoconfiguration │ │ │ ├── ElasticsearchAutoConfiguration.java │ │ │ └── properties │ │ │ └── ElasticsearchProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-excel ├── excel-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── excel │ │ │ │ └── autoconfiguration │ │ │ │ ├── ExcelAutoConfiguration.java │ │ │ │ ├── annotation │ │ │ │ └── ExcelUnique.java │ │ │ │ ├── convert │ │ │ │ ├── AsMappingConverter.java │ │ │ │ └── DataDictConverter.java │ │ │ │ ├── core │ │ │ │ ├── ExcelBervice.java │ │ │ │ └── ExcelBerviceImpl.java │ │ │ │ ├── listener │ │ │ │ └── ValidReadListener.java │ │ │ │ ├── properties │ │ │ │ └── ExcelProperties.java │ │ │ │ └── utils │ │ │ │ └── ExcelUtils.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── excel │ │ └── autoconfiguration │ │ └── utils │ │ └── ExcelUtilsTest.java └── pom.xml ├── spring-boot-flyway ├── flyway-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── flyway │ │ │ └── autoconfiguration │ │ │ ├── FlywayAutoConfiguration.java │ │ │ └── properties │ │ │ └── FlywayProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-geoip ├── geoip-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── geoip │ │ │ └── autoconfiguration │ │ │ ├── GeoIpAutoConfiguration.java │ │ │ ├── GeoIpLocation.java │ │ │ ├── core │ │ │ ├── GeoIpBervice.java │ │ │ └── GeoIpBerviceImpl.java │ │ │ └── properties │ │ │ └── GeoIpProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-javacv ├── TODO.md ├── javacv-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── javacv │ │ │ └── autoconfiguration │ │ │ ├── JavaCvAutoConfiguration.java │ │ │ ├── core │ │ │ ├── Commands.java │ │ │ ├── Lives.java │ │ │ └── Main.java │ │ │ ├── properties │ │ │ └── JavaCvProperties.java │ │ │ ├── support │ │ │ ├── FeatureHelper.java │ │ │ └── ImageUtils.java │ │ │ └── utils │ │ │ ├── FfmpegHelper.java │ │ │ └── ImageUtils.java │ │ └── resources │ │ ├── META-INF │ │ └── spring.factories │ │ └── app │ │ ├── README.md │ │ └── macos │ │ └── ffmpeg └── pom.xml ├── spring-boot-kafka ├── DOC.md ├── TODO.md ├── kafka-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── kafka │ │ │ └── autoconfiguration │ │ │ ├── KafkaAutoConfiguration.java │ │ │ └── properties │ │ │ └── KafkaProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-knife ├── knife-gateway-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── knife │ │ │ └── gateway │ │ │ └── autoconfigure │ │ │ ├── KnifeGatewayAutoConfiguration.java │ │ │ ├── core │ │ │ ├── DefaultSwaggerResourcesProvider.java │ │ │ ├── SwaggerAutoConfiguration.java │ │ │ ├── SwaggerEndpoint.java │ │ │ └── SwaggerHeaderFilter.java │ │ │ └── properties │ │ │ └── KnifeGatewayProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── knife-service-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── knife │ │ │ └── service │ │ │ └── autoconfigure │ │ │ ├── KnifeServiceAutoConfiguration.java │ │ │ └── properties │ │ │ └── KnifeServiceProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-logging ├── logging-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── logging │ │ │ └── autoconfiguration │ │ │ ├── AliyunLookup.java │ │ │ ├── LoggingApplicationListener.java │ │ │ ├── LoggingAutoConfiguration.java │ │ │ ├── core │ │ │ ├── LoggerAspect.java │ │ │ ├── LoggerEvent.java │ │ │ ├── LoggerListener.java │ │ │ └── UseLogger.java │ │ │ ├── handle │ │ │ └── DefaultLoggerListener.java │ │ │ ├── properties │ │ │ └── LoggingProperties.java │ │ │ └── utils │ │ │ └── LoggingUtils.java │ │ └── resources │ │ ├── META-INF │ │ └── spring.factories │ │ ├── application.yml │ │ ├── log4j2-boot-local.xml │ │ └── log4j2-boot.xml └── pom.xml ├── spring-boot-mail ├── mail-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── mail │ │ │ └── autoconfigure │ │ │ ├── MailAutoConfiguration.java │ │ │ ├── core │ │ │ └── MailBervice.java │ │ │ ├── impl │ │ │ └── MailBerviceImpl.java │ │ │ └── properties │ │ │ └── MailProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-message ├── README.md ├── message-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── message │ │ │ └── autoconfigure │ │ │ ├── MessageAutoConfiguration.java │ │ │ ├── MessageFactory.java │ │ │ ├── annotation │ │ │ └── MessageDestination.java │ │ │ ├── core │ │ │ ├── TransactionalMessageBervice.java │ │ │ ├── TransactionalMessageContext.java │ │ │ ├── TransactionalMessageListener.java │ │ │ └── message │ │ │ │ ├── Message.java │ │ │ │ └── TransactionalMessage.java │ │ │ ├── data │ │ │ ├── PersistenceMessage.java │ │ │ ├── TransactionalAspect.java │ │ │ └── TransactionalEvent.java │ │ │ ├── jdbc │ │ │ ├── TablePersistenceMessage.java │ │ │ └── mysql │ │ │ │ └── TransactionalMessageBerviceImpl.java │ │ │ ├── properties │ │ │ └── MessageProperties.java │ │ │ ├── service │ │ │ ├── TransactionalMessageQueueBervice.java │ │ │ ├── local │ │ │ │ ├── LocalMessageBervice.java │ │ │ │ └── LocalMessageQueueBervice.java │ │ │ └── normal │ │ │ │ ├── AbsMessageQueueBervice.java │ │ │ │ ├── NoneMessageQueueBervice.java │ │ │ │ ├── NormalMessageBervice.java │ │ │ │ ├── kafka │ │ │ │ └── KafkaMessageQueueBervice.java │ │ │ │ ├── redis │ │ │ │ ├── RedisHelper.java │ │ │ │ ├── RedisMessageListener.java │ │ │ │ └── RedisMessageQueueBervice.java │ │ │ │ └── rocket │ │ │ │ └── RocketMessageQueueBervice.java │ │ │ └── utils │ │ │ └── MessageConvert.java │ │ └── resources │ │ ├── META-INF │ │ └── spring.factories │ │ └── create_table.sql └── pom.xml ├── spring-boot-monitor ├── monitor-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── monitor │ │ │ └── autoconfiguration │ │ │ ├── MonitorAutoConfiguration.java │ │ │ └── properties │ │ │ └── MonitorProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-mybatis-plus ├── mybatis-plus-extensions │ ├── mybatis-plus-extensions-changelog-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── changelog │ │ │ │ ├── ChangeLogMpe.java │ │ │ │ ├── ChangeLogMpeService.java │ │ │ │ ├── ChangeLogMpeServiceImpl.java │ │ │ │ ├── autoconfiguration │ │ │ │ └── ChangeLogMybatisPlusExtAutoConfiguration.java │ │ │ │ ├── compare │ │ │ │ └── EntityCompare.java │ │ │ │ ├── convert │ │ │ │ └── ChangeConvert.java │ │ │ │ ├── entity │ │ │ │ ├── Change.java │ │ │ │ └── ChangeField.java │ │ │ │ ├── enums │ │ │ │ └── ChangeType.java │ │ │ │ ├── mapper │ │ │ │ ├── ChangeFieldMpeMapper.java │ │ │ │ ├── ChangeMpeMapper.java │ │ │ │ └── xml │ │ │ │ │ └── ChangeMpeMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── dto │ │ │ │ │ ├── ChangeLogDto.java │ │ │ │ │ └── FieldChangeDto.java │ │ │ │ ├── package-info.java │ │ │ │ ├── ro │ │ │ │ │ └── ChangeLogScrollRo.java │ │ │ │ └── vo │ │ │ │ │ └── ChangeVo.java │ │ │ │ └── service │ │ │ │ ├── ChangeFieldMpeService.java │ │ │ │ ├── ChangeMpeService.java │ │ │ │ └── impl │ │ │ │ ├── ChangeFieldMpeServiceImpl.java │ │ │ │ └── ChangeMpeServiceImpl.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── create_table.sql │ ├── mybatis-plus-extensions-config-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── in │ │ │ │ │ └── hocg │ │ │ │ │ └── boot │ │ │ │ │ └── mybatis │ │ │ │ │ └── plus │ │ │ │ │ └── extensions │ │ │ │ │ └── config │ │ │ │ │ ├── ConfigMpe.java │ │ │ │ │ ├── ConfigMpeService.java │ │ │ │ │ ├── ConfigMpeServiceImpl.java │ │ │ │ │ ├── autoconfiguration │ │ │ │ │ └── ConfigMpeAutoConfiguration.java │ │ │ │ │ ├── convert │ │ │ │ │ └── ConfigMpeConvert.java │ │ │ │ │ ├── entity │ │ │ │ │ ├── ConfigItem.java │ │ │ │ │ ├── ConfigScope.java │ │ │ │ │ └── ConfigValue.java │ │ │ │ │ ├── mapper │ │ │ │ │ ├── ConfigItemMpeMapper.java │ │ │ │ │ ├── ConfigScopeMpeMapper.java │ │ │ │ │ ├── ConfigValueMpeMapper.java │ │ │ │ │ └── xml │ │ │ │ │ │ ├── ConfigItemMpeMapper.xml │ │ │ │ │ │ ├── ConfigScopeMpeMapper.xml │ │ │ │ │ │ └── ConfigValueMpeMapper.xml │ │ │ │ │ ├── pojo │ │ │ │ │ ├── ro │ │ │ │ │ │ └── ScopeStructRo.java │ │ │ │ │ └── vo │ │ │ │ │ │ ├── ConfigScopeItemVo.java │ │ │ │ │ │ └── ConfigScopeStructVo.java │ │ │ │ │ ├── service │ │ │ │ │ ├── ConfigItemMpeService.java │ │ │ │ │ ├── ConfigScopeMpeService.java │ │ │ │ │ ├── ConfigValueMpeService.java │ │ │ │ │ └── impl │ │ │ │ │ │ ├── ConfigItemMpeServiceImpl.java │ │ │ │ │ │ ├── ConfigScopeMpeServiceImpl.java │ │ │ │ │ │ └── ConfigValueMpeServiceImpl.java │ │ │ │ │ └── utils │ │ │ │ │ └── ConfigHelper.java │ │ │ └── resources │ │ │ │ ├── META-INF │ │ │ │ └── spring.factories │ │ │ │ └── create_table.sql │ │ │ └── test │ │ │ └── java │ │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── mybatisplus │ │ │ └── extensions │ │ │ └── config │ │ │ └── ConfigMpeTest.java │ ├── mybatis-plus-extensions-context │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── mybatis │ │ │ └── plus │ │ │ └── extensions │ │ │ ├── context │ │ │ ├── constants │ │ │ │ └── MyBatisPlusExtensionsConstants.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ ├── mybatis-plus-extensions-createtable-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── create │ │ │ │ └── table │ │ │ │ ├── CreateTableMpe.java │ │ │ │ └── autoconfiguration │ │ │ │ ├── CreateTableMybatisPlusExtAutoConfiguration.java │ │ │ │ └── utils │ │ │ │ └── TableUtils.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── mybatis-plus-extensions-dataaudit-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── dataaudit │ │ │ │ ├── autoconfiguration │ │ │ │ ├── JaversSqlAutoConfiguration.java │ │ │ │ ├── JaversSqlProperties.java │ │ │ │ ├── annotation │ │ │ │ │ └── MyBatisPlusJaversAuditable.java │ │ │ │ ├── aspect │ │ │ │ │ ├── AbstractSpringAuditableMapperAspect.java │ │ │ │ │ └── MybatisPlusJaversAuditableRepositoryAspect.java │ │ │ │ └── core │ │ │ │ │ ├── MyBatisPlusAuthorProvider.java │ │ │ │ │ ├── MyBatisPlusConnectionProvider.java │ │ │ │ │ ├── MyBatisPlusJaversTransactionalDecorator.java │ │ │ │ │ └── MyBatisPlusTransactionalJaversBuilder.java │ │ │ │ └── package-info.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── mybatis-plus-extensions-httplog-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── httplog │ │ │ │ ├── HttpLogMpe.java │ │ │ │ ├── autoconfiguration │ │ │ │ └── HttpLogMybatisPlusExtAutoConfiguration.java │ │ │ │ ├── convert │ │ │ │ └── HttpLogMpeConvert.java │ │ │ │ ├── entity │ │ │ │ └── HttpLog.java │ │ │ │ ├── enums │ │ │ │ ├── Direction.java │ │ │ │ └── Status.java │ │ │ │ ├── mapper │ │ │ │ ├── HttpLogMpeMapper.java │ │ │ │ └── xml │ │ │ │ │ └── HttpLogMpeMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── package-info.java │ │ │ │ └── ro │ │ │ │ │ ├── CreateLogRo.java │ │ │ │ │ └── DoneLogRo.java │ │ │ │ ├── service │ │ │ │ ├── HttpLogMpeService.java │ │ │ │ └── impl │ │ │ │ │ └── HttpLogMpeServiceImpl.java │ │ │ │ └── support │ │ │ │ ├── HttpLogUtils.java │ │ │ │ └── LoggerListenerImpl.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── create_table.sql │ ├── mybatis-plus-extensions-task-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── task │ │ │ │ ├── TaskMpe.java │ │ │ │ ├── TaskMpeService.java │ │ │ │ ├── TaskMpeServiceImpl.java │ │ │ │ ├── autoconfiguration │ │ │ │ ├── TaskMybatisPlusExtAutoConfiguration.java │ │ │ │ └── TaskMybatisPlusExtProperties.java │ │ │ │ ├── entity │ │ │ │ ├── TaskInfo.java │ │ │ │ ├── TaskItem.java │ │ │ │ └── TaskItemLog.java │ │ │ │ ├── mapper │ │ │ │ ├── TaskInfoMpeMapper.java │ │ │ │ ├── TaskItemLogMpeMapper.java │ │ │ │ ├── TaskItemMpeMapper.java │ │ │ │ └── xml │ │ │ │ │ └── TaskInfoMpeMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── dto │ │ │ │ │ └── TaskInfoItemDTO.java │ │ │ │ └── package-info.java │ │ │ │ ├── service │ │ │ │ ├── TaskInfoMpeService.java │ │ │ │ ├── TaskItemLogMpeService.java │ │ │ │ ├── TaskItemMpeService.java │ │ │ │ └── impl │ │ │ │ │ ├── TaskInfoMpeServiceImpl.java │ │ │ │ │ ├── TaskItemLogMpeServiceImpl.java │ │ │ │ │ └── TaskItemMpeServiceImpl.java │ │ │ │ └── support │ │ │ │ ├── FailStrategy.java │ │ │ │ ├── TaskHelper.java │ │ │ │ └── TaskResult.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── create_table.sql │ ├── mybatis-plus-extensions-tpl-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── tpl │ │ │ │ ├── TplMpe.java │ │ │ │ └── autoconfiguration │ │ │ │ ├── TplMybatisPlusExtAutoConfiguration.java │ │ │ │ └── TplMybatisPlusExtProperties.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring.factories │ ├── mybatis-plus-extensions-userconfig-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── userconfig │ │ │ │ ├── UserConfigMpe.java │ │ │ │ ├── autoconfiguration │ │ │ │ ├── UserConfigMybatisPlusExtAutoConfiguration.java │ │ │ │ └── UserConfigMybatisPlusExtProperties.java │ │ │ │ ├── controller │ │ │ │ └── UserConfigController.java │ │ │ │ ├── convert │ │ │ │ └── UserConfigConvert.java │ │ │ │ ├── entity │ │ │ │ └── UserConfig.java │ │ │ │ ├── mapper │ │ │ │ ├── UserConfigMapper.java │ │ │ │ └── xml │ │ │ │ │ └── UserConfigMapper.xml │ │ │ │ ├── pojo │ │ │ │ └── ro │ │ │ │ │ ├── ClearRo.java │ │ │ │ │ ├── DeleteRo.java │ │ │ │ │ ├── QueryRo.java │ │ │ │ │ └── SetRo.java │ │ │ │ └── service │ │ │ │ ├── UserConfigService.java │ │ │ │ └── impl │ │ │ │ └── UserConfigServiceImpl.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── create_table.sql │ ├── mybatis-plus-extensions-webmagic-autoconfigure │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── webmagic │ │ │ │ ├── WebmagicMpe.java │ │ │ │ ├── autoconfiguration │ │ │ │ ├── WebmagicMybatisPlusExtAutoConfiguration.java │ │ │ │ └── WebmagicMybatisPlusExtProperties.java │ │ │ │ ├── controller │ │ │ │ └── WebmagicController.java │ │ │ │ ├── entity │ │ │ │ └── Webmagic.java │ │ │ │ ├── enums │ │ │ │ └── Status.java │ │ │ │ ├── mapper │ │ │ │ ├── WebmagicMapper.java │ │ │ │ └── xml │ │ │ │ │ └── WebmagicMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── ro │ │ │ │ │ ├── CreateWebmagicRo.java │ │ │ │ │ └── WebmagicScrollRo.java │ │ │ │ └── vo │ │ │ │ │ └── WebmagicVo.java │ │ │ │ └── service │ │ │ │ ├── WebmagicService.java │ │ │ │ └── impl │ │ │ │ └── WebmagicServiceImpl.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ └── create_table.sql │ └── pom.xml ├── mybatis-plus-generator │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── rabbit │ │ │ └── generator │ │ │ └── core │ │ │ ├── CodeGenerator.java │ │ │ ├── DataSource.java │ │ │ └── Module.java │ │ └── resources │ │ ├── log4j.properties │ │ └── template │ │ └── mybatis │ │ ├── controller.java.vm │ │ ├── entity.java.vm │ │ ├── mapper.java.vm │ │ └── serviceImpl.java.vm ├── mybatis-plus-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ ├── autoconfiguration │ │ │ │ ├── MyBatisPlusAutoConfiguration.java │ │ │ │ ├── core │ │ │ │ │ ├── ColumnConstants.java │ │ │ │ │ ├── context │ │ │ │ │ │ ├── DefaultMybatisContextHolder.java │ │ │ │ │ │ └── MybatisContextHolder.java │ │ │ │ │ ├── enhance │ │ │ │ │ │ ├── convert │ │ │ │ │ │ │ └── UseConvert.java │ │ │ │ │ │ ├── fill │ │ │ │ │ │ │ └── BootMetaObjectHandler.java │ │ │ │ │ │ ├── inject │ │ │ │ │ │ │ ├── BootSqlInjector.java │ │ │ │ │ │ │ └── SqlMethodProxy.java │ │ │ │ │ │ ├── listeners │ │ │ │ │ │ │ ├── EntityListener.java │ │ │ │ │ │ │ └── EntityListeners.java │ │ │ │ │ │ └── tenant │ │ │ │ │ │ │ └── BootTenantHandler.java │ │ │ │ │ ├── interceptor │ │ │ │ │ │ └── LogicDeleteInterceptor.java │ │ │ │ │ ├── pojo │ │ │ │ │ │ ├── ro │ │ │ │ │ │ │ ├── BasicRo.java │ │ │ │ │ │ │ ├── BatchIdRo.java │ │ │ │ │ │ │ ├── CompleteRo.java │ │ │ │ │ │ │ ├── PageRo.java │ │ │ │ │ │ │ └── ScrollRo.java │ │ │ │ │ │ └── vo │ │ │ │ │ │ │ ├── IPageExtra.java │ │ │ │ │ │ │ ├── IScroll.java │ │ │ │ │ │ │ └── IScrollExtra.java │ │ │ │ │ ├── struct │ │ │ │ │ │ ├── basic │ │ │ │ │ │ │ ├── AbstractEntity.java │ │ │ │ │ │ │ ├── AbstractService.java │ │ │ │ │ │ │ ├── AbstractServiceImpl.java │ │ │ │ │ │ │ └── enhance │ │ │ │ │ │ │ │ ├── CommonEntity.java │ │ │ │ │ │ │ │ └── LogicDeletedEntity.java │ │ │ │ │ │ └── tree │ │ │ │ │ │ │ ├── TreeEntity.java │ │ │ │ │ │ │ ├── TreeService.java │ │ │ │ │ │ │ └── TreeServiceImpl.java │ │ │ │ │ └── utils │ │ │ │ │ │ ├── PageUtils.java │ │ │ │ │ │ └── TreeUtils.java │ │ │ │ └── properties │ │ │ │ │ └── MyBatisPlusProperties.java │ │ │ │ └── extensions │ │ │ │ └── MyBatisPlusExtensionsAutoConfiguration.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── spring.factories │ │ │ ├── application.yml │ │ │ └── tree_node.sql │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── mybatis │ │ └── plus │ │ └── test │ │ └── Main.java └── pom.xml ├── spring-boot-named ├── named-core │ ├── named-annotation │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── named │ │ │ └── annotation │ │ │ ├── InjectNamed.java │ │ │ ├── Named.java │ │ │ └── NamedService.java │ ├── named-interface │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── named │ │ │ └── ifc │ │ │ ├── NamedArgs.java │ │ │ └── NamedHandler.java │ └── pom.xml ├── named-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── named │ │ │ └── autoconfiguration │ │ │ ├── NamedAutoConfiguration.java │ │ │ ├── aspect │ │ │ ├── NamedAspect.java │ │ │ └── NamedContext.java │ │ │ ├── cache │ │ │ ├── MemoryNamedCacheServiceImpl.java │ │ │ └── RedisNamedCacheServiceImpl.java │ │ │ ├── core │ │ │ ├── AbsNamedServiceExpand.java │ │ │ ├── CachePool.java │ │ │ ├── NamedCacheService.java │ │ │ ├── NamedRow.java │ │ │ └── convert │ │ │ │ ├── IPageNamedRowsConvert.java │ │ │ │ ├── IScrollNamedRowsConvert.java │ │ │ │ ├── NamedRowsConvert.java │ │ │ │ └── OptionalNamedRowsConvert.java │ │ │ ├── properties │ │ │ └── NamedProperties.java │ │ │ └── utils │ │ │ └── NamedUtils.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-netty ├── TODO.md ├── netty-client-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── netty │ │ │ └── client │ │ │ └── autoconfiguration │ │ │ ├── NettyClientAutoConfiguration.java │ │ │ ├── bean │ │ │ ├── CommandInvokerRegistrar.java │ │ │ └── InvokerFactoryBean.java │ │ │ └── properties │ │ │ └── NettyClientProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── netty-client │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── netty │ │ └── client │ │ ├── HeartBeatTimerHandler.java │ │ ├── NettyClient.java │ │ └── ServerChannelClosedHandler.java ├── netty-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── netty │ │ └── core │ │ ├── annotation │ │ ├── BeInvoker.java │ │ ├── ChannelId.java │ │ ├── Command.java │ │ ├── Invoker.java │ │ └── PacketData.java │ │ ├── constant │ │ ├── GlobalConstant.java │ │ ├── MessageConstant.java │ │ ├── MessageDispatcherType.java │ │ └── SystemPacket.java │ │ ├── invoker │ │ ├── BeInvokerManager.java │ │ ├── BeInvokerMethod.java │ │ └── InvokerProxy.java │ │ ├── pojo │ │ └── ro │ │ │ └── HeartBeatPacket.java │ │ ├── protocol │ │ ├── IdleStateCheck.java │ │ ├── Splitter.java │ │ ├── WordConstant.java │ │ ├── codec │ │ │ ├── Codec.java │ │ │ ├── MessageCodec.java │ │ │ └── MessageDecoder.java │ │ └── packet │ │ │ ├── AbstractPacket.java │ │ │ └── Packet.java │ │ ├── serializer │ │ ├── Serializer.java │ │ ├── SerializerAlgorithm.java │ │ └── impl │ │ │ └── JSONSerializer.java │ │ ├── session │ │ ├── ForwardCenter.java │ │ └── SessionManager.java │ │ └── utils │ │ └── MethodUtils.java ├── netty-server-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── netty │ │ │ └── server │ │ │ └── autoconfiguration │ │ │ ├── NettyServerAutoConfiguration.java │ │ │ ├── bean │ │ │ └── CommandScanner.java │ │ │ ├── core │ │ │ ├── MessageDispatcherHandler.java │ │ │ └── MessageListener.java │ │ │ └── properties │ │ │ └── NettyServerProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories ├── netty-server │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── netty │ │ └── server │ │ └── netty │ │ ├── DefaultNettyServer.java │ │ ├── NettyServer.java │ │ ├── handler │ │ ├── DefaultDispatcherHandler.java │ │ └── DispatcherHandler.java │ │ └── initializer │ │ ├── SocketInitializer.java │ │ └── WebSocketInitializer.java └── pom.xml ├── spring-boot-notify ├── notify-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── notify │ │ │ └── autoconfiguration │ │ │ ├── NotifyAutoConfiguration.java │ │ │ └── properties │ │ │ └── NotifyProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-openfeign ├── openfeign-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── openfeign │ │ │ └── autoconfiguration │ │ │ ├── OpenFeignAutoConfiguration.java │ │ │ ├── decoder │ │ │ ├── ExceptionDecoder.java │ │ │ └── FeignExceptionInfo.java │ │ │ ├── interceptor │ │ │ └── UserAgentInterceptor.java │ │ │ └── properties │ │ │ └── OpenFeignProperties.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-oss ├── oss-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── oss │ │ │ └── autoconfigure │ │ │ ├── OssAutoConfiguration.java │ │ │ ├── controller │ │ │ └── LocalOssController.java │ │ │ ├── core │ │ │ └── OssFileBervice.java │ │ │ ├── exception │ │ │ └── UploadOssException.java │ │ │ ├── impl │ │ │ ├── AliOssFileBerviceImpl.java │ │ │ ├── LocalFileBerviceImpl.java │ │ │ └── QiNiuOssFileBerviceImpl.java │ │ │ ├── properties │ │ │ └── OssProperties.java │ │ │ └── utils │ │ │ └── FileUtils.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── pom.xml ├── spring-boot-rocketmq ├── pom.xml └── rocketmq-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── rocketmq │ │ └── autoconfiguration │ │ ├── RocketMQAutoConfiguration.java │ │ └── properties │ │ └── RocketMQProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-samples ├── arthas-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── arthas │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── cache-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── cache │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ └── cache │ │ │ │ ├── CacheServiceImpl.java │ │ │ │ └── impl │ │ │ │ └── CacheService.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── cache │ │ └── tests │ │ └── CacheTests.java ├── cps-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── cps │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── excel-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── excel │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ ├── IndexService.java │ │ │ ├── controller │ │ │ ├── PlusController.java │ │ │ ├── ReadController.java │ │ │ └── WriteController.java │ │ │ └── vo │ │ │ └── ExcelDataVo.java │ │ └── resources │ │ ├── application.yml │ │ ├── import │ │ └── file.xlsx │ │ ├── spy.properties │ │ └── template │ │ ├── export-fill.xlsx │ │ └── export-template.xlsx ├── geoip-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── geoip │ │ │ │ └── sample │ │ │ │ └── BootApplication.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── geo │ │ └── GeoTests.java ├── javacv-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── javacv │ │ │ │ └── sample │ │ │ │ └── BootApplication.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── javacv │ │ │ ├── FeaturesTests.java │ │ │ └── RtmpTests.java │ │ └── resources │ │ ├── addAudio │ │ ├── b0.mp3 │ │ └── v0.mp4 │ │ ├── erasure │ │ └── v0.mp4 │ │ ├── image2video │ │ ├── img1.png │ │ ├── img2.png │ │ └── img3.png │ │ ├── mergeAudio │ │ ├── b1.mp3 │ │ ├── b2.mp3 │ │ ├── b3.mp3 │ │ └── b4.mp3 │ │ ├── mergeVideo │ │ ├── v0.mp4 │ │ ├── v1.mp4 │ │ └── v2.mp4 │ │ └── videoToRtmp │ │ └── v0.mp4 ├── kafka-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── kafka │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ ├── constant │ │ │ └── KafkaConstant.java │ │ │ ├── consumer │ │ │ └── MessageConsumer.java │ │ │ └── producer │ │ │ └── MessageProducer.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── knife-gateway-sample │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── knife │ │ └── gateway │ │ └── sample │ │ └── BootApplication.java ├── logging-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── logging │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ └── application.yml ├── mail-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── mail │ │ │ └── spring │ │ │ └── boot │ │ │ └── samples │ │ │ ├── BootApplication.java │ │ │ └── IndexController.java │ │ └── resources │ │ ├── application-local.yml │ │ └── application.yml ├── message-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── message │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── controller │ │ │ │ └── TransactionalController.java │ │ │ │ ├── message │ │ │ │ └── TestMessageListener.java │ │ │ │ ├── pojo │ │ │ │ └── TestMessageDto.java │ │ │ │ └── service │ │ │ │ └── TransactionalService.java │ │ └── resources │ │ │ ├── application-local.yml │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── message │ │ └── RedisMessageTests.java ├── mybatis-plus-extensions-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── extensions │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ └── task │ │ │ │ └── ScheduledTask.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ ├── ChangeLogTests.java │ │ ├── ConfigTests.java │ │ └── HttpLogTests.java ├── mybatis-plus-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── mybatis │ │ │ │ └── plus │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── controller │ │ │ │ └── ExampleController.java │ │ │ │ ├── convert │ │ │ │ └── ExampleConvert.java │ │ │ │ ├── dto │ │ │ │ └── ExampleVo.java │ │ │ │ ├── entity │ │ │ │ └── Example.java │ │ │ │ ├── mapper │ │ │ │ ├── ExampleMapper.java │ │ │ │ └── xml │ │ │ │ │ └── ExampleMapper.xml │ │ │ │ └── service │ │ │ │ ├── ExampleService.java │ │ │ │ └── impl │ │ │ │ └── ExampleServiceImpl.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── mybatis │ │ │ └── plus │ │ │ └── sample │ │ │ ├── extensions │ │ │ ├── MybatisTestTests.java │ │ │ └── config │ │ │ │ ├── ConfigMapperTests.java │ │ │ │ └── ConfigValueMapperTests.java │ │ │ ├── service │ │ │ └── impl │ │ │ │ └── ExampleServiceImplTest.java │ │ │ └── web │ │ │ └── sample │ │ │ ├── BaseDbTest.java │ │ │ ├── TestApplication.java │ │ │ ├── data │ │ │ ├── basic │ │ │ │ ├── ModelEntity.java │ │ │ │ └── ModelEntityMapper.java │ │ │ └── none │ │ │ │ ├── NoneModelEntity.java │ │ │ │ └── NoneModelEntityMapper.java │ │ │ ├── fill │ │ │ ├── FillModelTests.java │ │ │ └── NoneModelTests.java │ │ │ ├── listeners │ │ │ └── TestEntityListener.java │ │ │ └── logicdel │ │ │ └── LogicDeleteTests.java │ │ └── resources │ │ ├── application-test.yaml │ │ ├── application.yaml │ │ ├── fill │ │ └── sql │ │ │ ├── data.sql │ │ │ └── table.sql │ │ ├── logicdel │ │ └── sql │ │ │ ├── data.sql │ │ │ └── table.sql │ │ ├── mybatis-config-empty.xml │ │ ├── schema │ │ └── config.sql │ │ └── spy.properties ├── named-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── named │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── named │ │ │ │ ├── CustomNamed.java │ │ │ │ ├── CustomNamedService.java │ │ │ │ ├── DefaultNamedService.java │ │ │ │ └── NamedConstants.java │ │ │ │ ├── pojo │ │ │ │ └── TestBeanDto.java │ │ │ │ └── service │ │ │ │ └── TestService.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── named │ │ ├── EnumTests.java │ │ ├── JTests.java │ │ ├── TestEnum.java │ │ └── Tests.java ├── netty-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── netty │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── beinvoker │ │ │ │ └── TestBeInvoker.java │ │ │ │ ├── constant │ │ │ │ └── NettyConstant.java │ │ │ │ ├── invoker │ │ │ │ └── TestInvoker.java │ │ │ │ └── pojo │ │ │ │ ├── PacketRo.java │ │ │ │ └── PacketVo.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── netty │ │ └── sample │ │ ├── NettyClientInBootTests.java │ │ └── NettyClientTests.java ├── notify-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── notify │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── oss-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── oss │ │ │ │ └── spring │ │ │ │ └── boot │ │ │ │ └── samples │ │ │ │ ├── BootApplication.java │ │ │ │ └── IndexController.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── oss │ │ │ ├── AliOssFileServiceImplTest.java │ │ │ ├── LocalOssFileServiceImplTest.java │ │ │ ├── QiNiuOssFileServiceImplTest.java │ │ │ └── core │ │ │ ├── AbstractSpringBootTest.java │ │ │ └── TestConfiguration.java │ │ └── resources │ │ ├── application-aliyun.yml │ │ ├── application-local.yml │ │ └── application-qiniu.yml ├── pom.xml ├── schedulerx-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── schedulerx │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ └── SimpleTask.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── sentinel-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── sentinel │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ └── ExceptionAdvice.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── sms-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sms │ │ │ └── spring │ │ │ └── boot │ │ │ └── samples │ │ │ ├── BootApplication.java │ │ │ ├── IndexController.java │ │ │ └── SmsTpl.java │ │ └── resources │ │ └── application.yml ├── sso-client-gateway-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso │ │ │ └── gateway │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── bootstrap.yml ├── sso-client-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso │ │ │ └── client │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ └── application.yml ├── sso-server-spring-boot-sample │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso │ │ │ └── server │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ ├── UserDetailsServiceImpl.java │ │ │ └── config │ │ │ └── security │ │ │ ├── IndexEndpoint.java │ │ │ ├── autoconfiguration │ │ │ ├── SsoAutoConfiguration.java │ │ │ └── SsoProperties.java │ │ │ ├── config │ │ │ ├── AuthorizationServerConfig.java │ │ │ ├── ResourceServerConfig.java │ │ │ └── WebSecurityConfigurer.java │ │ │ └── user │ │ │ ├── AjaxAccessDeniedHandler.java │ │ │ ├── AjaxAuthenticationEntryPoint.java │ │ │ ├── AuthenticationConfigs.java │ │ │ ├── AuthorizedFailureHandle.java │ │ │ ├── AuthorizedSuccessHandle.java │ │ │ └── IsAjaxRequestMatcher.java │ │ └── resources │ │ ├── application.yml │ │ ├── bootstrap.yml │ │ ├── client-mysql.sql │ │ ├── server-mysql.sql │ │ └── templates │ │ ├── index.html │ │ ├── login.html │ │ └── signup.html ├── sso2-client-gateway-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso2 │ │ │ └── gateway │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── bootstrap.yml ├── sso2-client-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso2 │ │ │ └── client │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ └── application.yml ├── sso2-server-spring-boot-sample │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── sso2 │ │ │ └── server │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ ├── UserDetailsServiceImpl.java │ │ │ └── config │ │ │ └── security │ │ │ ├── BootTokenEnhancer.java │ │ │ ├── IndexEndpoint.java │ │ │ ├── autoconfiguration │ │ │ ├── SsoAutoConfiguration.java │ │ │ └── SsoProperties.java │ │ │ ├── config │ │ │ ├── AuthorizationServerConfig.java │ │ │ ├── ResourceServerConfig.java │ │ │ └── WebSecurityConfigurer.java │ │ │ └── user │ │ │ ├── AjaxAccessDeniedHandler.java │ │ │ ├── AjaxAuthenticationEntryPoint.java │ │ │ ├── AuthenticationConfigs.java │ │ │ ├── AuthorizedFailureHandle.java │ │ │ ├── AuthorizedSuccessHandle.java │ │ │ └── IsAjaxRequestMatcher.java │ │ └── resources │ │ ├── application.yml │ │ ├── bootstrap.yml │ │ ├── client-mysql.sql │ │ ├── server-mysql.sql │ │ └── templates │ │ ├── index.html │ │ ├── login.html │ │ └── signup.html ├── test-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── test │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── controller │ │ │ │ └── IndexController.java │ │ │ │ └── service │ │ │ │ └── IndexService.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── test │ │ └── sample │ │ └── MockTests.java ├── tpl-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── tpl │ │ │ └── sample │ │ │ └── BootApplication.java │ │ └── resources │ │ ├── application.yml │ │ └── spy.properties ├── web-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── web │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── LazyController.java │ │ │ │ ├── LazyService.java │ │ │ │ ├── Writer1.java │ │ │ │ └── Writer2.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── web │ │ └── sample │ │ ├── ServletTests.java │ │ ├── TestConfiguration.java │ │ └── WebfluxTests.java ├── webmagic-spring-boot-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── webmagic │ │ │ │ └── sample │ │ │ │ └── BootApplication.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── TestBoot.java ├── ws-spring-boot-sample │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── in │ │ │ │ └── hocg │ │ │ │ └── boot │ │ │ │ └── ws │ │ │ │ └── sample │ │ │ │ ├── BootApplication.java │ │ │ │ ├── basic │ │ │ │ ├── IWebSocketExceptionAdvice.java │ │ │ │ └── UserServiceImpl.java │ │ │ │ ├── cmd │ │ │ │ ├── GameRoom.java │ │ │ │ ├── MessageCmdDto.java │ │ │ │ ├── Room.java │ │ │ │ ├── TestCmd.java │ │ │ │ ├── ro │ │ │ │ │ ├── GameCmdRo.java │ │ │ │ │ └── RoomSignalRo.java │ │ │ │ └── vo │ │ │ │ │ └── GameCmdVo.java │ │ │ │ ├── controller │ │ │ │ ├── CmdController.java │ │ │ │ ├── GameController.java │ │ │ │ └── PostController.java │ │ │ │ └── service │ │ │ │ ├── GameService.java │ │ │ │ └── impl │ │ │ │ └── GameServiceImpl.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── ws │ │ ├── MessageTests.java │ │ ├── WebSocketClientImpl.java │ │ ├── WebSocketTests.java │ │ └── news │ │ ├── SenderTests.java │ │ ├── core │ │ └── StompUtils.java │ │ └── handler │ │ └── DebugStompSessionHandler.java ├── xxljob-spring-boot-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── xxljob │ │ │ └── spring │ │ │ └── boot │ │ │ └── samples │ │ │ ├── BootApplication.java │ │ │ ├── IndexController.java │ │ │ └── jobs │ │ │ └── DemoServiceJobs.java │ │ └── resources │ │ ├── application-local.yml │ │ └── application.yml └── youtube-spring-boot-sample │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── youtube │ │ │ └── sample │ │ │ ├── BootApplication.java │ │ │ ├── constants │ │ │ └── Constants.java │ │ │ ├── controller │ │ │ ├── AuthorizeController.java │ │ │ ├── IndexController.java │ │ │ └── YouTubeController.java │ │ │ └── service │ │ │ └── YoutubeService.java │ └── resources │ │ ├── application.yml │ │ └── spy.properties │ └── test │ └── java │ └── in │ └── hocg │ └── boot │ └── youtube │ └── sample │ └── service │ └── YoutubeServiceTest.java ├── spring-boot-schedulerx ├── pom.xml └── schedulerx-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── schedulerx │ │ └── autoconfiguration │ │ ├── SchedulerXAutoConfiguration.java │ │ └── properties │ │ └── SchedulerXProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-sentinel ├── pom.xml └── sentinel-spring-boot-autoconfigure │ ├── README.md │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── sentinel │ │ └── autoconfiguration │ │ ├── SentinelAutoConfiguration.java │ │ └── properties │ │ └── SentinelProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-sms ├── pom.xml └── sms-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── sms │ │ └── autoconfigure │ │ ├── SmsAutoConfiguration.java │ │ ├── core │ │ └── SmsBervice.java │ │ ├── exception │ │ └── SmsException.java │ │ ├── impl │ │ └── aliyun │ │ │ ├── AliSmsBerviceImpl.java │ │ │ ├── SmsTemplate.java │ │ │ ├── request │ │ │ ├── AbsRequest.java │ │ │ ├── BatchSmsRequest.java │ │ │ └── SmsRequest.java │ │ │ └── response │ │ │ └── SmsResponse.java │ │ └── properties │ │ └── SmsProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-sso ├── pom.xml ├── sso-client-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── in │ │ │ └── hocg │ │ │ └── boot │ │ │ └── sso │ │ │ └── client │ │ │ └── autoconfigure │ │ │ ├── SsoClientAutoConfiguration.java │ │ │ ├── core │ │ │ ├── AuthenticationResult.java │ │ │ ├── BearerTokenAuthentication.java │ │ │ ├── PageConstants.java │ │ │ ├── servlet │ │ │ │ ├── ServletExpandAuthenticationManager.java │ │ │ │ └── ServletSsoClientConfiguration.java │ │ │ └── webflux │ │ │ │ ├── WebFluxExpandAuthenticationManager.java │ │ │ │ ├── WebFluxSsoClientConfiguration.java │ │ │ │ └── bearer │ │ │ │ ├── BearerTokenAuthenticationToken.java │ │ │ │ ├── BearerTokenError.java │ │ │ │ ├── BearerTokenErrorCodes.java │ │ │ │ └── ServerBearerTokenAuthenticationConverter.java │ │ │ ├── endpoint │ │ │ └── SsoClientEndpoint.java │ │ │ ├── properties │ │ │ └── SsoClientProperties.java │ │ │ └── utils │ │ │ ├── AuthoritiesUtils.java │ │ │ └── TokenUtils.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── sso2-client-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── sso2 │ │ └── client │ │ └── autoconfigure │ │ ├── SsoClientAutoConfiguration.java │ │ ├── core │ │ ├── ClientResourceServerConfigurer.java │ │ └── authentication │ │ │ └── RedirectUrlAuthenticationEntryPoint.java │ │ └── properties │ │ └── SsoClientProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-starters ├── arthas-spring-boot-starter │ └── pom.xml ├── cache-spring-boot-starter │ └── pom.xml ├── cps-spring-boot-starter │ └── pom.xml ├── distributed-lock-spring-boot-starter │ └── pom.xml ├── dynamic-datasource-spring-boot-starter │ └── pom.xml ├── excel-spring-boot-starter │ └── pom.xml ├── flyway-spring-boot-starter │ └── pom.xml ├── geoip-spring-boot-starter │ └── pom.xml ├── javacv-spring-boot-starter │ └── pom.xml ├── kafka-spring-boot-starter │ └── pom.xml ├── knife-gateway-spring-boot-starter │ └── pom.xml ├── knife-service-spring-boot-starter │ └── pom.xml ├── logging-spring-boot-starter │ └── pom.xml ├── mail-spring-boot-starter │ └── pom.xml ├── message-spring-boot-starter │ └── pom.xml ├── monitor-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-changelog-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-config-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-dataaudit-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-httplog-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-task-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-userconfig-spring-boot-starter │ └── pom.xml ├── mybatis-plus-extensions-webmagic-spring-boot-starter │ └── pom.xml ├── mybatis-plus-spring-boot-starter │ └── pom.xml ├── named-spring-boot-starter │ └── pom.xml ├── netty-client-spring-boot-starter │ └── pom.xml ├── netty-server-spring-boot-starter │ └── pom.xml ├── notify-spring-boot-starter │ └── pom.xml ├── openfeign-spring-boot-starter │ └── pom.xml ├── oss-spring-boot-starter │ └── pom.xml ├── pom.xml ├── rocketmq-spring-boot-starter │ └── pom.xml ├── schedulerx-spring-boot-starter │ └── pom.xml ├── sentinel-spring-boot-starter │ └── pom.xml ├── sms-spring-boot-starter │ └── pom.xml ├── sso-client-spring-boot-starter │ └── pom.xml ├── sso2-client-spring-boot-starter │ └── pom.xml ├── test-spring-boot-starter │ └── pom.xml ├── tpl-spring-boot-starter │ └── pom.xml ├── validation-spring-boot-starter │ └── pom.xml ├── web-spring-boot-starter │ └── pom.xml ├── webmagic-spring-boot-starter │ └── pom.xml ├── ws-spring-boot-starter │ └── pom.xml ├── wxcp-spring-boot-starter │ └── pom.xml ├── wxma-spring-boot-starter │ └── pom.xml ├── wxmp-spring-boot-starter │ └── pom.xml ├── xxljob-spring-boot-starter │ └── pom.xml └── youtube-spring-boot-starter │ └── pom.xml ├── spring-boot-test ├── pom.xml └── test-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── test │ │ └── autoconfiguration │ │ ├── TestAutoConfiguration.java │ │ ├── core │ │ └── AbstractSpringBootTest.java │ │ └── properties │ │ └── TestProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-tpl ├── pom.xml └── tpl-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── tpl │ │ └── autoconfiguration │ │ ├── TplAutoConfiguration.java │ │ └── properties │ │ └── TplProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-utils ├── README.md ├── pom.xml ├── utils-annotation │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── utils │ │ └── annotation │ │ └── UseDataDictKey.java └── utils-base │ ├── pom.xml │ └── src │ └── main │ └── java │ └── in │ └── hocg │ └── boot │ └── utils │ ├── LangUtils.java │ ├── PropertyNamer.java │ ├── Rules.java │ ├── StringPoolUtils.java │ ├── ThreadLocalClear.java │ ├── context │ ├── TenantContextHolder.java │ ├── UserContextHolder.java │ └── security │ │ ├── UserDetail.java │ │ └── UserPrincipal.java │ ├── courrent │ └── AsyncUtils.java │ ├── db │ ├── ColumnType.java │ ├── DbUtils.java │ └── schema │ │ └── SchemaUtils.java │ ├── enums │ ├── CodeEnum.java │ ├── DataDictEnum.java │ └── ICode.java │ ├── exception │ ├── AuthenticationExpiredException.java │ ├── ServiceException.java │ ├── ToolsException.java │ └── UnAuthenticationException.java │ ├── ext │ └── MultiList.java │ ├── function │ ├── BiConsumerThrow.java │ ├── ConsumerThrow.java │ ├── FiveConsumerThrow.java │ ├── SupplierThrow.java │ └── ThreeConsumerThrow.java │ ├── lambda │ ├── SFunction.java │ ├── SerializationUtils.java │ ├── SerializedLambda.java │ └── map │ │ ├── LambdaMap.java │ │ └── StringMap.java │ ├── servlet │ └── WebUtils.java │ ├── struct │ ├── DictData.java │ ├── KeyValue.java │ ├── LabelValue.java │ └── result │ │ ├── ExceptionResult.java │ │ ├── Result.java │ │ └── ResultCode.java │ └── utils │ ├── ClassUtils.java │ ├── DataDictUtils.java │ ├── DateUtils.java │ ├── ExceptionUtils.java │ ├── IpUtils.java │ ├── LambdaUtils.java │ ├── LogUtils.java │ ├── SensitiveUtils.java │ └── ValidUtils.java ├── spring-boot-validation ├── pom.xml ├── validation-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── validation │ │ ├── EnumRangeValidator.java │ │ ├── JsonFormatValidator.java │ │ ├── StringRangeValidator.java │ │ ├── annotation │ │ ├── EnumRange.java │ │ ├── Json.java │ │ └── StringRange.java │ │ ├── core │ │ └── ValidatorUtils.java │ │ └── group │ │ ├── Insert.java │ │ └── Update.java └── validation-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── validation │ │ └── autoconfigure │ │ ├── ValidationAutoConfiguration.java │ │ └── properties │ │ └── ValidationProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-web ├── pom.xml ├── web-core │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── in │ │ └── hocg │ │ └── boot │ │ └── web │ │ └── datastruct │ │ └── tree │ │ ├── AbstractTreeNode.java │ │ └── Tree.java └── web-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── web │ │ └── autoconfiguration │ │ ├── SpringContext.java │ │ ├── WebAutoConfiguration.java │ │ ├── WebEnvironmentPostProcessor.java │ │ ├── advice │ │ ├── DefaultExceptionAdvice.java │ │ └── ErrorPagesConfiguration.java │ │ ├── aspect │ │ ├── IgnoreTenant.java │ │ ├── TenantIgnoreAspect.java │ │ ├── TimeoutAspect.java │ │ └── TimeoutCheck.java │ │ ├── core │ │ └── WarmUpLazyBeanRunner.java │ │ ├── event │ │ └── PreExitCodeEvent.java │ │ ├── filter │ │ ├── ThreadLocalClearFilter.java │ │ └── UserContextFilter.java │ │ ├── jackson │ │ ├── SerializerConfiguration.java │ │ ├── bigdecimal │ │ │ ├── BigDecimalDeserializer.java │ │ │ ├── BigDecimalFormat.java │ │ │ └── BigDecimalSerializer.java │ │ ├── localdatetime │ │ │ ├── LocalDateTimeDeserializer.java │ │ │ └── LocalDateTimeSerializer.java │ │ ├── sensitive │ │ │ ├── Sensitive.java │ │ │ ├── SensitiveSerializer.java │ │ │ └── SensitiveType.java │ │ └── xlong │ │ │ ├── LongDeserializer.java │ │ │ └── LongSerializer.java │ │ ├── properties │ │ └── BootProperties.java │ │ ├── servlet │ │ ├── ServletConfiguration.java │ │ ├── ServletExceptionAdvice.java │ │ └── SpringServletContext.java │ │ ├── shutdown │ │ ├── ShutdownController.java │ │ └── ShutdownListener.java │ │ ├── utils │ │ ├── SerializableUtils.java │ │ ├── WebUtils.java │ │ └── web │ │ │ ├── RequestUtils.java │ │ │ └── ResponseUtils.java │ │ └── webflux │ │ ├── SpringWebFluxContext.java │ │ ├── WebFluxConfiguration.java │ │ └── WebFluxExceptionAdvice.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-webmagic ├── README.md ├── pom.xml └── webmagic-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── webmagic │ │ └── autoconfiguration │ │ ├── WebmagicAutoConfiguration.java │ │ ├── core │ │ ├── AbsAfterExtractor.java │ │ └── AbsPageProcessor.java │ │ ├── extensions │ │ └── WebmagicMybatisListener.java │ │ ├── listener │ │ └── event │ │ │ └── WebmagicEvent.java │ │ ├── processor │ │ ├── baidu │ │ │ └── BaiduHotPageProcessor.java │ │ ├── github │ │ │ └── GithubRepoPageProcessor.java │ │ ├── google │ │ │ ├── chrome │ │ │ │ ├── ChromeWebstoreDetailPageProcessor.java │ │ │ │ └── dto │ │ │ │ │ └── ChromeWebstoreDetailExtractor.java │ │ │ └── package-info.java │ │ └── weibo │ │ │ └── WeiboRealtimeHotPageProcessor.java │ │ └── properties │ │ └── WebmagicProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-ws ├── pom.xml └── ws-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── ws │ │ └── autoconfiguration │ │ ├── WebSocketAutoConfiguration.java │ │ ├── core │ │ ├── MessageExceptionAdvice.java │ │ ├── MessageHelper.java │ │ ├── WebSocketDecoratorFactory.java │ │ ├── constant │ │ │ └── StringConstants.java │ │ ├── event │ │ │ ├── SocketClosedEvent.java │ │ │ └── SocketConnectedEvent.java │ │ ├── handshake │ │ │ └── AuthenticationHandshakeHandler.java │ │ ├── interceptor │ │ │ └── CommonHandshakeInterceptor.java │ │ └── service │ │ │ ├── SocketUserService.java │ │ │ └── table │ │ │ ├── DefaultTableService.java │ │ │ ├── TableService.java │ │ │ └── UserCell.java │ │ └── properties │ │ └── WebSocketProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-wxcp ├── pom.xml └── wxcp-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── wxcp │ │ └── autoconfiguration │ │ ├── WxCpAutoConfiguration.java │ │ └── properties │ │ └── WxCpProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-wxma ├── pom.xml └── wxma-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── wxma │ │ └── autoconfiguration │ │ ├── WxMaAutoConfiguration.java │ │ └── properties │ │ └── WxMaProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-wxmp ├── pom.xml └── wxmp-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── wxmp │ │ └── autoconfiguration │ │ ├── WxMpAutoConfiguration.java │ │ └── properties │ │ └── WxMpProperties.java │ └── resources │ └── META-INF │ └── spring.factories ├── spring-boot-xxljob ├── pom.xml └── xxljob-spring-boot-autoconfigure │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── in │ │ └── hocg │ │ └── boot │ │ └── xxljob │ │ └── autoconfigure │ │ ├── XxlJobAutoConfiguration.java │ │ └── properties │ │ └── XxlJobProperties.java │ └── resources │ └── META-INF │ └── spring.factories └── spring-boot-youtube ├── pom.xml └── youtube-spring-boot-autoconfigure ├── pom.xml └── src └── main ├── java └── in │ └── hocg │ └── boot │ └── youtube │ └── autoconfiguration │ ├── YoutubeAutoConfiguration.java │ ├── core │ ├── YoutubeBervice.java │ ├── YoutubeBerviceImpl.java │ ├── YoutubeHelper.java │ └── datastore │ │ ├── DataCredential.java │ │ └── RedisDataStoreFactory.java │ ├── exception │ └── TokenUnusedException.java │ ├── properties │ └── YoutubeProperties.java │ └── utils │ ├── YoutubeUtils.java │ └── data │ ├── CredentialChannel.java │ └── YouTubeChannel.java └── resources ├── META-INF └── spring.factories └── create_table.sql /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [Makefile] 15 | indent_style = tab 16 | 17 | [*.yml] 18 | indent_size = 2 19 | 20 | [*.yaml] 21 | indent_size = 2 22 | 23 | [*.xml] 24 | indent_size = 2 25 | -------------------------------------------------------------------------------- /.github/publish-github.yml: -------------------------------------------------------------------------------- 1 | #name: Publish Github 2 | # 3 | #on: 4 | # workflow_dispatch: 5 | # push: 6 | # branches: 7 | # - master 8 | # 9 | #jobs: 10 | # build: 11 | # runs-on: ubuntu-latest 12 | # steps: 13 | # - uses: actions/checkout@v1 14 | # 15 | # - name: Set up JDK 16 | # uses: actions/setup-java@v2 17 | # with: 18 | # java-version: '11' 19 | # distribution: 'adopt' 20 | # 21 | # - name: Publish Package Registry 22 | # run: mvn --batch-mode deploy 23 | # env: 24 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .idea/ 3 | *.iws 4 | *.iml 5 | *.ipr 6 | .flattened-pom.xml 7 | .DS_Store 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | - v1.0.15 2 | 1. 优化 @Named 组件 3 | 2. OpenFeign 组件使用 okhttp 作为 http client 4 | -------------------------------------------------------------------------------- /docs/TODO.md: -------------------------------------------------------------------------------- 1 | ## 待办 2 | - 接口防重放 [https://github.com/hocgin/windmill-spring-boot-project] 3 | - 多数据源 [https://github.com/hocgin/wolves-spring-boot-project] 4 | - spring-boot-excel 5 | - spring-boot-elasticsearch 6 | - spring-boot-webmagic 7 | http://webmagic.io/ 8 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/docs/logo.png -------------------------------------------------------------------------------- /docs/xxljob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/docs/xxljob.png -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | mvn deploy -DaltDeploymentRepository="sonatype-snapshots::default::https://oss.sonatype.org/service/local/staging/deploy/maven2" -DskipTests 3 | mvn deploy -P release -DaltDeploymentRepository="sonatype-snapshots::default::https://oss.sonatype.org/content/repositories/releases" -DskipTests 4 | mvn deploy -DaltDeploymentRepository="sonatype-snapshots::default::https://oss.sonatype.org/content/repositories/snapshots" -DskipTests 5 | -------------------------------------------------------------------------------- /spring-boot-arthas/arthas-spring-boot-autoconfigure/src/main/java/in/hocg/boot/arthas/autoconfiguration/properties/ArthasProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.arthas.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(ArthasProperties.PREFIX) 16 | public class ArthasProperties extends com.alibaba.arthas.spring.ArthasProperties { 17 | public static final String PREFIX = "boot.arthas"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-arthas/arthas-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.arthas.autoconfiguration.ArthasAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/annotation/NoRepeatSubmit.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.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 | * 11 | * @author hocgin 12 | */ 13 | @Target(ElementType.METHOD) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface NoRepeatSubmit { 16 | 17 | /** 18 | * 自定义key 19 | */ 20 | String key() default ""; 21 | 22 | /** 23 | * 默认时间5秒 24 | */ 25 | long timeout() default 5; 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/annotation/RDS.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.annotation; 2 | 3 | import in.hocg.boot.cache.autoconfiguration.properties.RedissonProperties; 4 | 5 | import java.lang.annotation.*; 6 | 7 | /** 8 | * Created by hocgin on 2021/6/10 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Target({ElementType.TYPE, ElementType.METHOD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Documented 16 | public @interface RDS { 17 | String value() default RedissonProperties.MASTER_FLAG; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/annotation/RateLimit.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 自定义注解限流器 7 | * 8 | * @author hocgin 9 | */ 10 | @Inherited 11 | @Documented 12 | @Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE}) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface RateLimit { 15 | 16 | /** 17 | * 限流唯一标示 18 | */ 19 | String key() default ""; 20 | 21 | /** 22 | * 限流时间 单位 s 23 | */ 24 | long time() default 5; 25 | 26 | /** 27 | * 限流次数 28 | */ 29 | long count() default 1; 30 | } 31 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/dynamic/DynamicRoutingConnectionFactory.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.dynamic; 2 | 3 | import org.redisson.api.RedissonClient; 4 | 5 | import javax.annotation.Nullable; 6 | import java.util.Map; 7 | 8 | public class DynamicRoutingConnectionFactory extends AbstractRoutingConnectionFactory { 9 | public DynamicRoutingConnectionFactory(Map targetDataSources) { 10 | super(targetDataSources); 11 | } 12 | 13 | @Nullable 14 | @Override 15 | protected Object determineCurrentLookupKey() { 16 | return DynamicDatasourceHolder.peek(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/enums/LockType.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.enums; 2 | 3 | /** 4 | * 锁类型 5 | * 6 | * @author hocgin 7 | */ 8 | public enum LockType { 9 | /** 10 | * 可重入锁 11 | */ 12 | Reentrant, 13 | /** 14 | * 公平锁 15 | */ 16 | Fair, 17 | /** 18 | * 联锁 19 | */ 20 | Multiple, 21 | /** 22 | * 红锁 23 | */ 24 | RedLock, 25 | /** 26 | * 读锁 27 | */ 28 | Read, 29 | /** 30 | * 写锁 31 | */ 32 | Write, 33 | /** 34 | * 自动模式 35 | */ 36 | Auto 37 | } 38 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/enums/RedisMode.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.enums; 2 | 3 | /** 4 | * redis 模式 5 | * 6 | * @author hocgin 7 | */ 8 | public enum RedisMode { 9 | /** 10 | * 单例 11 | */ 12 | Single, 13 | /** 14 | * 哨兵 15 | */ 16 | Sentinel, 17 | /** 18 | * 集群 19 | */ 20 | Cluster; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/exception/DistributedLockException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.exception; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | 5 | /** 6 | * Created by hocgin on 2020/8/14 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class DistributedLockException extends RuntimeException { 12 | public DistributedLockException(String message) { 13 | super(message); 14 | } 15 | 16 | public DistributedLockException(String message, Object... params) { 17 | this(StrUtil.format(message, params)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cache/autoconfiguration/utils/CacheUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.autoconfiguration.utils; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import lombok.experimental.UtilityClass; 5 | 6 | /** 7 | * @author hocgin 8 | */ 9 | @UtilityClass 10 | public class CacheUtils { 11 | 12 | /** 13 | * 统一KEY 14 | * 15 | * @param prefix 16 | * @param values 17 | * @return 18 | */ 19 | public static String useKey(Enum prefix, String... values) { 20 | String joinKeys = StrUtil.join(":", values); 21 | return String.format("%s:%s", prefix.name(), joinKeys); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-cache/cache-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.cache.autoconfiguration.CacheAutoConfiguration,\ 3 | in.hocg.boot.cache.autoconfiguration.BloomFilterAutoConfiguration,\ 4 | in.hocg.boot.cache.autoconfiguration.RedissonAutoConfiguration 5 | -------------------------------------------------------------------------------- /spring-boot-cps/cps-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cps/autoconfiguration/enums/PlatformType.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cps.autoconfiguration.enums; 2 | 3 | import in.hocg.boot.utils.enums.ICode; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * @author hocgin 11 | */ 12 | @Getter 13 | @RequiredArgsConstructor 14 | public enum PlatformType implements ICode { 15 | TaoBao("taobao", "淘宝"), 16 | Jd("jd", "京东"), 17 | Pdd("pdd", "拼多多"), 18 | ; 19 | private final Serializable code; 20 | private final String name; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-cps/cps-spring-boot-autoconfigure/src/main/java/in/hocg/boot/cps/autoconfiguration/pojo/vo/PrivilegeLinkVo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cps.autoconfiguration.pojo.vo; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.io.Serializable; 7 | 8 | @Getter 9 | @Setter 10 | public class PrivilegeLinkVo implements Serializable { 11 | /** 12 | * 推广链接 13 | */ 14 | private String privilegeUrl; 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-cps/cps-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.cps.autoconfiguration.CpsAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-distributed-lock/distributed-lock-spring-boot-autoconfigure/src/main/java/in/hocg/boot/distributed/lock/autoconfiguration/annotation/LockKey.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.distributed.lock.autoconfiguration.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Created by hocgin on 2019-09-29. 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Target({ElementType.PARAMETER}) 15 | @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 16 | @Documented 17 | public @interface LockKey { 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-distributed-lock/distributed-lock-spring-boot-autoconfigure/src/main/java/in/hocg/boot/distributed/lock/autoconfiguration/core/DistributedLock.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.distributed.lock.autoconfiguration.core; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | /** 6 | * Created by hocgin on 2020/8/14 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface DistributedLock { 12 | 13 | /** 14 | * 释放锁 15 | * 16 | * @param key 锁的KEY 17 | */ 18 | void release(String key); 19 | 20 | /** 21 | * 获取锁 22 | * 23 | * @param key 锁的KEY 24 | * @param timeout 超时时间 25 | * @param timeUnit 超时时间单位 26 | * @return 是否成功 27 | */ 28 | boolean acquire(String key, long timeout, TimeUnit timeUnit); 29 | } 30 | -------------------------------------------------------------------------------- /spring-boot-distributed-lock/distributed-lock-spring-boot-autoconfigure/src/main/java/in/hocg/boot/distributed/lock/autoconfiguration/core/KeyType.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.distributed.lock.autoconfiguration.core; 2 | 3 | /** 4 | * Created by hocgin on 2019-09-29. 5 | * email: hocgin@gmail.com 6 | * KEY 的生成方式 7 | * 8 | * @author hocgin 9 | */ 10 | public enum KeyType { 11 | // 使用注解的 key 值 12 | Key, 13 | // 使用函数参数 14 | Parameter, 15 | // 使用函数名 16 | MethodName 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-distributed-lock/distributed-lock-spring-boot-autoconfigure/src/main/java/in/hocg/boot/distributed/lock/autoconfiguration/exception/DistributedLockException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.distributed.lock.autoconfiguration.exception; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/14 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class DistributedLockException extends RuntimeException { 10 | public DistributedLockException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-distributed-lock/distributed-lock-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.distributed.lock.autoconfiguration.DistributedLockAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-dynamic-datasource/dynamic-datasource-spring-boot-autoconfigure/src/main/java/in/hocg/boot/dynamic/datasource/autoconfiguration/core/Constants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.dynamic.datasource.autoconfiguration.core; 2 | 3 | import lombok.experimental.UtilityClass; 4 | 5 | /** 6 | * @author hocgin 7 | * @date 2019/6/25 8 | */ 9 | @UtilityClass 10 | public class Constants { 11 | public static final String MAIN = "main"; 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-dynamic-datasource/dynamic-datasource-spring-boot-autoconfigure/src/main/java/in/hocg/boot/dynamic/datasource/autoconfiguration/core/DynamicDatasource.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.dynamic.datasource.autoconfiguration.core; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * Created by hocgin on 2021/6/10 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @Target({ElementType.METHOD}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Documented 14 | public @interface DynamicDatasource { 15 | String name() default Constants.MAIN; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-dynamic-datasource/dynamic-datasource-spring-boot-autoconfigure/src/main/java/in/hocg/boot/dynamic/datasource/autoconfiguration/core/RoutingDataSource.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.dynamic.datasource.autoconfiguration.core; 2 | 3 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 4 | 5 | /** 6 | * 动态数据源 7 | * @author hocgin 8 | * @date 2019/6/25 9 | */ 10 | public class RoutingDataSource extends AbstractRoutingDataSource { 11 | 12 | /** 13 | * 根据规则,获取数据源 14 | * @return 15 | */ 16 | @Override 17 | protected Object determineCurrentLookupKey() { 18 | return DynamicDatasourceHolder.getDataSource(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-dynamic-datasource/dynamic-datasource-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.dynamic.datasource.autoconfiguration.DynamicDatasourceAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-elasticsearch/elasticsearch-spring-boot-autoconfigure/src/main/java/in/hocg/boot/elasticsearch/autoconfiguration/properties/ElasticsearchProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.elasticsearch.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(ElasticsearchProperties.PREFIX) 14 | public class ElasticsearchProperties { 15 | public static final String PREFIX = "boot.elasticsearch"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-elasticsearch/elasticsearch-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.excel.autoconfiguration.ExcelAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-excel/excel-spring-boot-autoconfigure/src/main/java/in/hocg/boot/excel/autoconfiguration/annotation/ExcelUnique.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.excel.autoconfiguration.annotation; 2 | 3 | import java.lang.annotation.Documented; 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 | @Target({ElementType.FIELD}) 10 | @Retention(RetentionPolicy.RUNTIME) 11 | @Documented 12 | public @interface ExcelUnique { 13 | /** 14 | * 错误信息 15 | */ 16 | String message() default "表格内出现重复数据"; 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-excel/excel-spring-boot-autoconfigure/src/main/java/in/hocg/boot/excel/autoconfiguration/core/ExcelBervice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.excel.autoconfiguration.core; 2 | 3 | /** 4 | * Created by hocgin on 2021/6/11 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface ExcelBervice { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-excel/excel-spring-boot-autoconfigure/src/main/java/in/hocg/boot/excel/autoconfiguration/core/ExcelBerviceImpl.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.excel.autoconfiguration.core; 2 | 3 | /** 4 | * Created by hocgin on 2021/6/11 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class ExcelBerviceImpl implements ExcelBervice { 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-excel/excel-spring-boot-autoconfigure/src/main/java/in/hocg/boot/excel/autoconfiguration/properties/ExcelProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.excel.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(ExcelProperties.PREFIX) 16 | public class ExcelProperties { 17 | public static final String PREFIX = "boot.excel"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-excel/excel-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.excel.autoconfiguration.ExcelAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-flyway/flyway-spring-boot-autoconfigure/src/main/java/in/hocg/boot/flyway/autoconfiguration/properties/FlywayProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.flyway.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(FlywayProperties.PREFIX) 16 | public class FlywayProperties { 17 | public static final String PREFIX = "boot.flyway"; 18 | 19 | /** 20 | * repair-on-migrate default: false 21 | */ 22 | private Boolean repairOnMigrate = false; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-flyway/flyway-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.flyway.autoconfiguration.FlywayAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-geoip/geoip-spring-boot-autoconfigure/src/main/java/in/hocg/boot/geoip/autoconfiguration/GeoIpLocation.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.geoip.autoconfiguration; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class GeoIpLocation { 7 | private String countryCode; 8 | private String countryName; 9 | private String region; 10 | private String regionName; 11 | private String city; 12 | private String postalCode; 13 | private String latitude; 14 | private String longitude; 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-geoip/geoip-spring-boot-autoconfigure/src/main/java/in/hocg/boot/geoip/autoconfiguration/core/GeoIpBervice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.geoip.autoconfiguration.core; 2 | 3 | import in.hocg.boot.geoip.autoconfiguration.GeoIpLocation; 4 | 5 | import java.util.Optional; 6 | 7 | /** 8 | * Created by hocgin on 2024/06/21 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public interface GeoIpBervice { 14 | Optional getCountryByIP(String ip); 15 | 16 | GeoIpLocation getLocationByIP(String ipAddress); 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-geoip/geoip-spring-boot-autoconfigure/src/main/java/in/hocg/boot/geoip/autoconfiguration/properties/GeoIpProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.geoip.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(GeoIpProperties.PREFIX) 14 | public class GeoIpProperties { 15 | public static final String PREFIX = "boot.geoip"; 16 | 17 | private Boolean enabled; 18 | 19 | private String countryPath; 20 | private String cityPath; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-geoip/geoip-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.geoip.autoconfiguration.GeoIpAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-javacv/TODO.md: -------------------------------------------------------------------------------- 1 | JavaCV 2 | 3 | 多视频 = 视频 4 | 多图像 = 视频 5 | 视频 = 推流 6 | 图片 = 推流 7 | 视频 + 水印 = 视频 8 | 视频 + 时间 = 图片(帧) 9 | -------------------------------------------------------------------------------- /spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/java/in/hocg/boot/javacv/autoconfiguration/core/Main.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.javacv.autoconfiguration.core; 2 | 3 | /** 4 | * Created by hocgin on 2022/1/9 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class Main { 10 | public static void main(String[] args) { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/java/in/hocg/boot/javacv/autoconfiguration/properties/JavaCvProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.javacv.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(JavaCvProperties.PREFIX) 16 | public class JavaCvProperties { 17 | public static final String PREFIX = "boot.java-cv"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.javacv.autoconfiguration.JavaCvAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/resources/app/README.md: -------------------------------------------------------------------------------- 1 | http://ffmpeg.org/download.html 2 | http://note.rpsh.net/posts/2015/04/21/mac-osx-javacv-mp4-gif-convert/ 3 | 4 | ```shell 5 | srcFile="/Users/hocgin/Downloads/xx.mp4" 6 | 7 | # 从 00:02:15 截取 20s 8 | ./ffmpeg -i $srcFile -ss 00:02:15 -codec copy -t 20 output.mp4 9 | 10 | # 从 00:02:15 截取 15min 11 | ./ffmpeg -i $srcFile -ss 00:02:15 -t 00:15:00 -codec copy output.mp4 12 | 13 | /Users/hocgin/Projects/spring-boot-starters-project/spring-boot-ffmpeg/javacv-spring-boot-autoconfigure/src/main/resources/app/macos/ffmpeg -i "./一念永恒(第一季.01).mp4" -i "./一念永恒(第一季.02).mp4" -c:v copy -c:a aac -strict experimental mvresult.mp4 14 | 15 | ``` 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/resources/app/macos/ffmpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-javacv/javacv-spring-boot-autoconfigure/src/main/resources/app/macos/ffmpeg -------------------------------------------------------------------------------- /spring-boot-kafka/DOC.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-kafka/DOC.md -------------------------------------------------------------------------------- /spring-boot-kafka/TODO.md: -------------------------------------------------------------------------------- 1 | - https://zhuanlan.zhihu.com/p/93445381 2 | - https://www.baeldung.com/spring-kafka 3 | - https://mp.weixin.qq.com/s/ziOdZg2PkkgIXjKFebnZTw 4 | - https://github.com/Snailclimb/springboot-kafka/blob/master/docs/3-10%E5%88%86%E9%92%9F%E5%AD%A6%E4%BC%9A%E5%A6%82%E4%BD%95%E5%9C%A8SpringBoot%E7%A8%8B%E5%BA%8F%E4%B8%AD%E4%BD%BF%E7%94%A8Kafka%E4%BD%9C%E4%B8%BA%E6%B6%88%E6%81%AF%E9%98%9F%E5%88%97.md 5 | 6 | 7 | 8 | - 同步消息(ACK) 9 | - 异步消息 10 | - 消息消费 11 | - 12 | -------------------------------------------------------------------------------- /spring-boot-kafka/kafka-spring-boot-autoconfigure/src/main/java/in/hocg/boot/kafka/autoconfiguration/properties/KafkaProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.kafka.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(KafkaProperties.PREFIX) 14 | public class KafkaProperties { 15 | public static final String PREFIX = "boot.kafka"; 16 | private Boolean autoStartup = Boolean.TRUE; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-kafka/kafka-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.kafka.autoconfiguration.KafkaAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-knife/knife-gateway-spring-boot-autoconfigure/src/main/java/in/hocg/boot/knife/gateway/autoconfigure/properties/KnifeGatewayProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.knife.gateway.autoconfigure.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(prefix = KnifeGatewayProperties.PREFIX) 16 | public class KnifeGatewayProperties { 17 | public static final String PREFIX = "boot.knife.gateway"; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-knife/knife-gateway-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.knife.gateway.autoconfigure.KnifeGatewayAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-knife/knife-service-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.knife.service.autoconfigure.KnifeServiceAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-logging/logging-spring-boot-autoconfigure/src/main/java/in/hocg/boot/logging/autoconfiguration/core/LoggerListener.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.logging.autoconfiguration.core; 2 | 3 | import org.springframework.context.event.EventListener; 4 | 5 | /** 6 | * Created by hocgin on 2020/2/28. 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface LoggerListener { 12 | /** 13 | * 处理日志 14 | * 15 | * @param logger 16 | */ 17 | @EventListener(classes = LoggerEvent.class) 18 | void handle(LoggerEvent logger); 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-logging/logging-spring-boot-autoconfigure/src/main/java/in/hocg/boot/logging/autoconfiguration/core/UseLogger.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.logging.autoconfiguration.core; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.Target; 6 | 7 | /** 8 | * Created by hocgin on 2020/2/17. 9 | * email: hocgin@gmail.com 10 | * 在要进行函数执行报告的函数上进行使用 11 | * 12 | * @author hocgin 13 | */ 14 | @Target({java.lang.annotation.ElementType.METHOD}) 15 | @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 16 | @Documented 17 | public @interface UseLogger { 18 | /** 19 | * 接口的功能描述 20 | * 21 | * @return 22 | */ 23 | String value() default ""; 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-logging/logging-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.logging.autoconfiguration.LoggingAutoConfiguration 3 | org.springframework.context.ApplicationListener=\ 4 | in.hocg.boot.logging.autoconfiguration.LoggingApplicationListener 5 | -------------------------------------------------------------------------------- /spring-boot-logging/logging-spring-boot-autoconfigure/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | boot: 2 | logging: 3 | topic: ${spring.application.name:unknow} 4 | source: ${spring.cloud.client.ip-address} 5 | logging: 6 | config: classpath:log4j2-boot.xml 7 | file: 8 | path: /data/logs/app/${spring.application.name:unknown} 9 | name: ${logging.file.path}/${spring.application.name:unknown}.log 10 | pattern: 11 | level: '%5p [%X{X-B3-TraceId},%X{X-B3-SpanId},%X{X-Span-Export}]' 12 | -------------------------------------------------------------------------------- /spring-boot-mail/mail-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mail.autoconfigure.MailAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-message/README.md: -------------------------------------------------------------------------------- 1 | ## 消息类型 2 | - 异步消息 3 | - 同步消息 4 | - 普通消息 5 | - 事务消息 6 | 7 | 8 | 9 | 10 | ```bash 11 | MessageFactory. 12 | 13 | 14 | 15 | 16 | 17 | 18 | MessageFactory.syncSend(消息, 消息轨迹, 是否持久, 超时时间) 19 | 20 | MessageFactory.local().syncSend(message, isTransactional, timeout); 21 | MessageFactory.mq().syncSend(message, isTransactional, timeout); 22 | 23 | 24 | MessageFactory.syncSend(message, isTransactional, timeout); 25 | MessageFactory.syncSend(message, isTransactional); 26 | MessageFactory.syncSend(message); 27 | MessageFactory.asyncSend(message); 28 | ``` 29 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/java/in/hocg/boot/message/autoconfigure/annotation/MessageDestination.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.autoconfigure.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.Target; 6 | 7 | /** 8 | * Created by hocgin on 2020/7/20. 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Target({java.lang.annotation.ElementType.METHOD}) 14 | @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) 15 | @Documented 16 | public @interface MessageDestination { 17 | 18 | String value() default ""; 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/java/in/hocg/boot/message/autoconfigure/core/TransactionalMessageBervice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.autoconfigure.core; 2 | 3 | 4 | import in.hocg.boot.message.autoconfigure.core.message.TransactionalMessage; 5 | 6 | /** 7 | * Created by hocgin on 2020/7/20. 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public interface TransactionalMessageBervice { 13 | 14 | /** 15 | * 保存消息 16 | * 17 | * @param message 消息 18 | * @return 是否保存成功 19 | */ 20 | boolean insertMessage(TransactionalMessage message); 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/java/in/hocg/boot/message/autoconfigure/core/message/Message.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.autoconfigure.core.message; 2 | 3 | /** 4 | * Created by hocgin on 2020/7/20. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface Message { 10 | 11 | void setGroupSn(String groupSn); 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/java/in/hocg/boot/message/autoconfigure/data/TransactionalEvent.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.autoconfigure.data; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/16 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public final class TransactionalEvent { 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/java/in/hocg/boot/message/autoconfigure/service/local/LocalMessageBervice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.autoconfigure.service.local; 2 | 3 | import in.hocg.boot.message.autoconfigure.service.TransactionalMessageQueueBervice; 4 | 5 | /** 6 | * Created by hocgin on 2021/4/9 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface LocalMessageBervice extends TransactionalMessageQueueBervice { 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-message/message-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.message.autoconfigure.MessageAutoConfiguration 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-boot-monitor/monitor-spring-boot-autoconfigure/src/main/java/in/hocg/boot/monitor/autoconfiguration/properties/MonitorProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.monitor.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(MonitorProperties.PREFIX) 16 | public class MonitorProperties { 17 | public static final String PREFIX = "boot.monitor"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-monitor/monitor-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.monitor.autoconfiguration.MonitorAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/ChangeLogMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.changelog; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class ChangeLogMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".changelog"; 13 | public static final String MAPPER_PACKAGE = ChangeLogMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/autoconfiguration/ChangeLogMybatisPlusExtAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.changelog.autoconfiguration; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.changelog.ChangeLogMpe; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.context.annotation.ComponentScan; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | * Created by hocgin on 2022/3/24 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Slf4j 15 | @Configuration 16 | @ComponentScan(ChangeLogMpe.PACKAGE) 17 | public class ChangeLogMybatisPlusExtAutoConfiguration { 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/enums/ChangeType.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.changelog.enums; 2 | 3 | import in.hocg.boot.utils.enums.ICode; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * Created by hocgin on 2022/3/28 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | @Getter 16 | @RequiredArgsConstructor 17 | public enum ChangeType implements ICode { 18 | Modify("modify", "更新"), 19 | Insert("insert", "新增"), 20 | Delete("delete", "删除"); 21 | private final Serializable code; 22 | private final String name; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/mapper/ChangeFieldMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.changelog.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.changelog.entity.ChangeField; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/24 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface ChangeFieldMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/pojo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/28 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions.changelog.pojo; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/changelog/service/ChangeFieldMpeService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.changelog.service; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.AbstractService; 4 | import in.hocg.boot.mybatis.plus.extensions.changelog.entity.ChangeField; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by hocgin on 2022/3/24 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | public interface ChangeFieldMpeService extends AbstractService { 15 | List listByChangeId(List changeIds); 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-changelog-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.changelog.autoconfiguration.ChangeLogMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/config/ConfigMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.config; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class ConfigMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".config"; 13 | public static final String MAPPER_PACKAGE = ConfigMpe.PACKAGE + ".mapper"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/config/autoconfiguration/ConfigMpeAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.config.autoconfiguration; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.config.ConfigMpe; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.context.annotation.ComponentScan; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | * Created by hocgin on 2022/3/24 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Slf4j 15 | @Configuration 16 | @ComponentScan(ConfigMpe.PACKAGE) 17 | public class ConfigMpeAutoConfiguration { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/config/mapper/ConfigScopeMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.config.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.config.entity.ConfigScope; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/26 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface ConfigScopeMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/config/mapper/xml/ConfigScopeMpeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/config/service/ConfigScopeMpeService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.config.service; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.AbstractService; 4 | import in.hocg.boot.mybatis.plus.extensions.config.entity.ConfigScope; 5 | 6 | import java.util.Optional; 7 | 8 | /** 9 | * Created by hocgin on 2022/3/24 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | public interface ConfigScopeMpeService extends AbstractService { 15 | 16 | Optional getByScope(String scope); 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.config.autoconfiguration.ConfigMpeAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-config-autoconfigure/src/test/java/in/hocg/boot/mybatisplus/extensions/config/ConfigMpeTest.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatisplus.extensions.config; 2 | 3 | 4 | /** 5 | * Created by hocgin on 2022/3/25 6 | * email: hocgin@gmail.com 7 | * 8 | * @author hocgin 9 | */ 10 | public class ConfigMpeTest { 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-context/src/main/java/in/hocg/boot/mybatis/plus/extensions/context/constants/MyBatisPlusExtensionsConstants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.context.constants; 2 | 3 | /** 4 | * Created by hocgin on 2022/3/25 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class MyBatisPlusExtensionsConstants { 10 | /** 11 | * 包前缀 12 | */ 13 | public static final String PACKAGE_PREFIX = "in.hocg.boot.mybatis.plus.extensions"; 14 | /** 15 | * 表前缀 16 | */ 17 | public static final String TABLE_PREFIX = "boot_"; 18 | /** 19 | * 配置前缀 20 | */ 21 | public static final String PROPERTIES_PREFIX = "boot.mybatis-plus.extensions"; 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-context/src/main/java/in/hocg/boot/mybatis/plus/extensions/context/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/25 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions.context; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-context/src/main/java/in/hocg/boot/mybatis/plus/extensions/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/25 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-createtable-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/create/table/CreateTableMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.create.table; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class CreateTableMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".create.table"; 13 | public static final String MAPPER_PACKAGE = CreateTableMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-createtable-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/create/table/autoconfiguration/utils/TableUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.create.table.autoconfiguration.utils; 2 | 3 | import lombok.experimental.UtilityClass; 4 | 5 | /** 6 | * Created by hocgin on 2022/5/12 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @UtilityClass 12 | public class TableUtils { 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-createtable-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.tpl.autoconfiguration.TplMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-dataaudit-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/dataaudit/autoconfiguration/annotation/MyBatisPlusJaversAuditable.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.dataaudit.autoconfiguration.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 | * Created by hocgin on 2022/3/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Target({ElementType.TYPE}) 16 | public @interface MyBatisPlusJaversAuditable { 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-dataaudit-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/dataaudit/autoconfiguration/core/MyBatisPlusAuthorProvider.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.dataaudit.autoconfiguration.core; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import in.hocg.boot.utils.context.UserContextHolder; 5 | import org.javers.spring.auditable.AuthorProvider; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public class MyBatisPlusAuthorProvider implements AuthorProvider { 14 | @Override 15 | public String provide() { 16 | return StrUtil.toString(UserContextHolder.getUserId()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-dataaudit-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/dataaudit/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/26 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions.dataaudit; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-dataaudit-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.dataaudit.autoconfiguration.JaversSqlAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/HttpLogMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.httplog; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class HttpLogMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".httplog"; 13 | public static final String MAPPER_PACKAGE = HttpLogMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/enums/Direction.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.httplog.enums; 2 | 3 | import in.hocg.boot.utils.enums.ICode; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * Created by hocgin on 2022/3/26 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | @Getter 16 | @RequiredArgsConstructor 17 | public enum Direction implements ICode { 18 | In("in", "入"), 19 | Out("out", "出"); 20 | private final Serializable code; 21 | private final String name; 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/enums/Status.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.httplog.enums; 2 | 3 | import in.hocg.boot.utils.enums.ICode; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * Created by hocgin on 2022/3/26 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | @Getter 16 | @RequiredArgsConstructor 17 | public enum Status implements ICode { 18 | Executing("executing", "执行中"), 19 | Success("success", "成功"), 20 | Fail("fail", "失败"); 21 | private final Serializable code; 22 | private final String name; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/mapper/HttpLogMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.httplog.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.httplog.entity.HttpLog; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/24 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface HttpLogMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/mapper/xml/HttpLogMpeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/httplog/pojo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/26 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions.httplog.pojo; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-httplog-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.httplog.autoconfiguration.HttpLogMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/TaskMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class TaskMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".task"; 13 | public static final String MAPPER_PACKAGE = TaskMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/mapper/TaskInfoMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.task.entity.TaskInfo; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/24 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface TaskInfoMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/mapper/TaskItemLogMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.task.entity.TaskItemLog; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/24 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface TaskItemLogMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/mapper/TaskItemMpeMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.task.entity.TaskItem; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/24 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface TaskItemMpeMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/mapper/xml/TaskInfoMpeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/pojo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/3/28 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.mybatis.plus.extensions.task.pojo; 8 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/service/TaskInfoMpeService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task.service; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.AbstractService; 4 | import in.hocg.boot.mybatis.plus.extensions.task.entity.TaskInfo; 5 | 6 | /** 7 | * Created by hocgin on 2022/3/24 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public interface TaskInfoMpeService extends AbstractService { 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/task/service/TaskItemLogMpeService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.task.service; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.AbstractService; 4 | import in.hocg.boot.mybatis.plus.extensions.task.entity.TaskItemLog; 5 | 6 | /** 7 | * Created by hocgin on 2022/3/24 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public interface TaskItemLogMpeService extends AbstractService { 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-task-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.task.autoconfiguration.TaskMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-tpl-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/TplMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.tpl; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class TplMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".tpl"; 13 | public static final String MAPPER_PACKAGE = TplMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-tpl-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.tpl.autoconfiguration.TplMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-userconfig-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/userconfig/UserConfigMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.userconfig; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class UserConfigMpe { 12 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".userconfig"; 13 | public static final String MAPPER_PACKAGE = UserConfigMpe.PACKAGE + ".mapper"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-userconfig-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/userconfig/mapper/UserConfigMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.userconfig.mapper; 2 | 3 | import in.hocg.boot.mybatis.plus.extensions.userconfig.entity.UserConfig; 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * [BOOT] 用户配置表 Mapper 接口 10 | *

11 | * 12 | * @author hocgin 13 | * @since 2023-01-20 14 | */ 15 | @Mapper 16 | public interface UserConfigMapper extends BaseMapper { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-userconfig-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/userconfig/mapper/xml/UserConfigMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-userconfig-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/userconfig/pojo/ro/ClearRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.userconfig.pojo.ro; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Getter; 6 | import lombok.Setter; 7 | 8 | /** 9 | * Created by hocgin on 2023/01/20 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | @ApiModel 17 | public class ClearRo { 18 | 19 | @ApiModelProperty(value = "操作人", hidden = true) 20 | private Long optUserId; 21 | @ApiModelProperty(value = "来源", hidden = true) 22 | private String source; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-userconfig-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.userconfig.autoconfiguration.UserConfigMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/WebmagicMpe.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.webmagic; 2 | 3 | 4 | import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; 5 | 6 | /** 7 | * Created by hocgin on 2022/3/24 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public class WebmagicMpe { 13 | public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".webmagic"; 14 | public static final String MAPPER_PACKAGE = WebmagicMpe.PACKAGE + ".mapper"; 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/enums/Status.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.webmagic.enums; 2 | 3 | import in.hocg.boot.utils.enums.ICode; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | /** 8 | * Created by hocgin on 2022/6/16 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @RequiredArgsConstructor 15 | public enum Status implements ICode { 16 | Progress("progress", "进行中"), 17 | Fail("fail", "失败"), 18 | Done("done", "完成"); 19 | private final String code; 20 | private final String name; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/mapper/WebmagicMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.webmagic.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.extensions.webmagic.entity.Webmagic; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * [BOOT] 爬虫采集表 Mapper 接口 10 | *

11 | * 12 | * @author hocgin 13 | * @since 2022-06-16 14 | */ 15 | @Mapper 16 | public interface WebmagicMapper extends BaseMapper { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/mapper/xml/WebmagicMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/pojo/ro/WebmagicScrollRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions.webmagic.pojo.ro; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.pojo.ro.ScrollRo; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import lombok.experimental.Accessors; 7 | 8 | /** 9 | * Created by hocgin on 2022/6/18 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Setter 15 | @Getter 16 | @Accessors(chain = true) 17 | public class WebmagicScrollRo extends ScrollRo { 18 | private String type; 19 | private String status; 20 | private Boolean asc = true; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-extensions/mybatis-plus-extensions-webmagic-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.extensions.webmagic.autoconfiguration.WebmagicMybatisPlusExtAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-generator/src/main/java/in/hocg/rabbit/generator/core/DataSource.java: -------------------------------------------------------------------------------- 1 | package in.hocg.rabbit.generator.core; 2 | 3 | import com.baomidou.mybatisplus.annotation.DbType; 4 | 5 | import java.sql.Driver; 6 | 7 | /** 8 | * Created by hocgin on 2022/6/16 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public interface DataSource { 14 | 15 | DbType getDbType(); 16 | 17 | String getUrl(); 18 | 19 | Class getDriverName(); 20 | 21 | String getUsername(); 22 | 23 | String getPassword(); 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-generator/src/main/java/in/hocg/rabbit/generator/core/Module.java: -------------------------------------------------------------------------------- 1 | package in.hocg.rabbit.generator.core; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by hocgin on 2022/6/16 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface Module { 12 | 13 | List getIgnoreTablePrefix(); 14 | 15 | String getPackageName(); 16 | 17 | String getRelativePath(); 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-generator/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-generator/src/main/resources/template/mybatis/mapper.java.vm: -------------------------------------------------------------------------------- 1 | package ${package.Mapper}; 2 | 3 | import ${package.Entity}.${entity}; 4 | import ${superMapperClassPackage}; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * $!{table.comment} Mapper 接口 10 | *

11 | * 12 | * @author ${author} 13 | * @since ${date} 14 | */ 15 | #if(${kotlin}) 16 | interface ${table.mapperName} : ${superMapperClass}<${entity}> 17 | #else 18 | @Mapper 19 | public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { 20 | 21 | } 22 | #end 23 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/context/DefaultMybatisContextHolder.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.context; 2 | 3 | /** 4 | * Created by hocgin on 2022/1/2 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class DefaultMybatisContextHolder implements MybatisContextHolder { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/enhance/convert/UseConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.enhance.convert; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * Created by hocgin on 2022/1/4 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @Target({ElementType.TYPE}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Documented 14 | public @interface UseConvert { 15 | Class value() default Object.class; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/enhance/listeners/EntityListener.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.enhance.listeners; 2 | 3 | /** 4 | * Created by hocgin on 2022/1/3 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface EntityListener { 10 | /** 11 | * 新增之前触发 12 | * 13 | * @param entity 实体 14 | */ 15 | default void onPreInsert(T entity) { 16 | } 17 | 18 | /** 19 | * 更新之前触发 20 | * 21 | * @param entity 实体 22 | */ 23 | default void onPreUpdate(T entity) { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/enhance/listeners/EntityListeners.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.enhance.listeners; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * Created by hocgin on 2022/1/1 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @Target({ElementType.TYPE}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Documented 14 | public @interface EntityListeners { 15 | Class[] value() default {}; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/pojo/ro/BasicRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.pojo.ro; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by hocgin on 2020/5/28. 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class BasicRo implements Serializable { 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/pojo/ro/BatchIdRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.pojo.ro; 2 | 3 | import lombok.EqualsAndHashCode; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.util.Collections; 9 | import java.util.List; 10 | 11 | /** 12 | * Created by hocgin on 2021/12/1 13 | * email: hocgin@gmail.com 14 | * 15 | * @author hocgin 16 | */ 17 | @Getter 18 | @Setter 19 | @Accessors(chain = true) 20 | @EqualsAndHashCode(callSuper = true) 21 | public class BatchIdRo extends BasicRo { 22 | private List id = Collections.emptyList(); 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/autoconfiguration/core/struct/basic/AbstractEntity.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic; 2 | 3 | import com.baomidou.mybatisplus.extension.activerecord.Model; 4 | 5 | /** 6 | * Created by hocgin on 2020/1/5. 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public abstract class AbstractEntity> extends Model { 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/MyBatisPlusExtensionsAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.extensions; 2 | 3 | import org.springframework.boot.autoconfigure.AutoConfigurationPackage; 4 | 5 | /** 6 | * Created by hocgin on 2022/3/25 7 | * email: hocgin@gmail.com 8 | * 插件装载器 9 | * 10 | * @author hocgin 11 | */ 12 | @AutoConfigurationPackage 13 | public class MyBatisPlusExtensionsAutoConfiguration { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.mybatis.plus.autoconfiguration.MyBatisPlusAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | mybatis-plus: 2 | global-config: 3 | banner: false 4 | mapper-locations: classpath*:/**/xml/*.xml 5 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/main/resources/tree_node.sql: -------------------------------------------------------------------------------- 1 | create table t_tree_node 2 | ( 3 | `id` BIGINT AUTO_INCREMENT, 4 | -- 5 | `parent_id` BIGINT 6 | COMMENT '父级ID, 顶级为 NULL', 7 | `tree_path` varchar(255) NOT NULL UNIQUE 8 | COMMENT '树路径,组成方式: /父路径/当前ID', 9 | `enabled` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 10 | COMMENT '启用状态' 11 | ); 12 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/mybatis-plus-spring-boot-autoconfigure/src/test/java/in/hocg/boot/mybatis/plus/test/Main.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.test; 2 | 3 | import cn.hutool.core.util.ReflectUtil; 4 | import cn.hutool.extra.spring.SpringUtil; 5 | import com.baomidou.mybatisplus.core.metadata.IPage; 6 | 7 | import java.lang.reflect.Method; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by hocgin on 2022/1/4 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | 17 | public class Main { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/named-annotation/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | named-core 7 | in.hocg.boot 8 | ${revision} 9 | 10 | 4.0.0 11 | jar 12 | 13 | Named :: Annotation 14 | named-annotation 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/named-annotation/src/main/java/in/hocg/boot/named/annotation/InjectNamed.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * Created by hocgin on 2020/2/14. 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | @Target({ElementType.TYPE, ElementType.FIELD}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Documented 19 | public @interface InjectNamed { 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/named-annotation/src/main/java/in/hocg/boot/named/annotation/NamedService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.annotation; 2 | 3 | /** 4 | * Created by hocgin on 2020/6/14. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface NamedService { 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/named-interface/src/main/java/in/hocg/boot/named/ifc/NamedArgs.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.ifc; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.experimental.Accessors; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by hocgin on 2020/8/13 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | @Getter 17 | @Setter 18 | @Accessors(chain = true) 19 | public class NamedArgs { 20 | private List values = Collections.emptyList(); 21 | private String[] args = new String[]{}; 22 | 23 | public List getValues() { 24 | return (List) values; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/named-interface/src/main/java/in/hocg/boot/named/ifc/NamedHandler.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.ifc; 2 | 3 | 4 | import java.lang.annotation.Documented; 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Inherited; 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.RetentionPolicy; 9 | import java.lang.annotation.Target; 10 | 11 | /** 12 | * Created by hocgin on 2020/6/24. 13 | * email: hocgin@gmail.com 14 | * 15 | * @author hocgin 16 | */ 17 | @Inherited 18 | @Target(ElementType.METHOD) 19 | @Retention(RetentionPolicy.RUNTIME) 20 | @Documented 21 | public @interface NamedHandler { 22 | String value(); 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-named/named-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-boot-named 7 | in.hocg.boot 8 | ${revision} 9 | 10 | 4.0.0 11 | pom 12 | 13 | Named :: Core 14 | named-core 15 | 16 | named-annotation 17 | named-interface 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spring-boot-named/named-spring-boot-autoconfigure/src/main/java/in/hocg/boot/named/autoconfiguration/core/convert/IPageNamedRowsConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.autoconfiguration.core.convert; 2 | 3 | import com.baomidou.mybatisplus.core.metadata.IPage; 4 | 5 | /** 6 | * Created by hocgin on 2021/6/1 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class IPageNamedRowsConvert implements NamedRowsConvert{ 12 | 13 | @Override 14 | public boolean isMatch(Class aClazz) { 15 | return IPage.class.isAssignableFrom(aClazz); 16 | } 17 | 18 | @Override 19 | public Object convert(Object source) { 20 | return ((IPage) source).getRecords(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-named/named-spring-boot-autoconfigure/src/main/java/in/hocg/boot/named/autoconfiguration/core/convert/IScrollNamedRowsConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.autoconfiguration.core.convert; 2 | 3 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.pojo.vo.IScroll; 4 | 5 | /** 6 | * Created by hocgin on 2022/4/17 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class IScrollNamedRowsConvert implements NamedRowsConvert { 12 | @Override 13 | public boolean isMatch(Class aClass) { 14 | return IScroll.class.isAssignableFrom(aClass); 15 | } 16 | 17 | @Override 18 | public Object convert(Object o) { 19 | return ((IScroll) o).getRecords(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-named/named-spring-boot-autoconfigure/src/main/java/in/hocg/boot/named/autoconfiguration/core/convert/NamedRowsConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.autoconfiguration.core.convert; 2 | 3 | /** 4 | * Created by hocgin on 2021/6/1 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface NamedRowsConvert { 10 | boolean isMatch(Class source); 11 | 12 | Object convert(Object source); 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-named/named-spring-boot-autoconfigure/src/main/java/in/hocg/boot/named/autoconfiguration/core/convert/OptionalNamedRowsConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named.autoconfiguration.core.convert; 2 | 3 | import java.util.Optional; 4 | 5 | /** 6 | * Created by hocgin on 2021/6/1 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class OptionalNamedRowsConvert implements NamedRowsConvert{ 12 | 13 | @Override 14 | public boolean isMatch(Class aClazz) { 15 | return Optional.class.isAssignableFrom(aClazz); 16 | } 17 | 18 | @Override 19 | public Object convert(Object source) { 20 | return ((Optional) source).orElse(null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-named/named-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.named.autoconfiguration.NamedAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-netty/TODO.md: -------------------------------------------------------------------------------- 1 | channel 连接后,分配唯一标识(channelId) 2 | channel 登录后,分配唯一用户标识(channelId, userId) 3 | 4 | 消息发送时,生成唯一消息编号,检查目标channelId是否在本机,是则从本地channel池获取并发送,否则广播消息。消息消费后原路发送回执。 5 | 消费广播消息,检查目标channelId是否在本机,是则发送,否则丢弃。(发送后返回回执) 6 | 7 | ### 备注 8 | 9 | 这边可以根据回执维护 channel 路由,发送时优先根据channel路由指定消息通道。channel路由需要拥有自动维护能力。 10 | 11 | message -> packet -> data 12 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-client-spring-boot-autoconfigure/src/main/java/in/hocg/boot/netty/client/autoconfiguration/properties/NettyClientProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.client.autoconfiguration.properties; 2 | 3 | import in.hocg.netty.core.constant.GlobalConstant; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | @ConfigurationProperties(NettyClientProperties.PREFIX) 17 | public class NettyClientProperties { 18 | public static final String PREFIX = "boot.netty.client"; 19 | private Integer port = GlobalConstant.DEFAULT_PORT; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.netty.client.autoconfiguration.NettyClientAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/annotation/BeInvoker.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.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 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface BeInvoker { 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/annotation/ChannelId.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.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 | @Target(ElementType.PARAMETER) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface ChannelId { 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/annotation/Command.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.annotation; 2 | 3 | import in.hocg.netty.core.constant.SystemPacket; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | /** 11 | * @author hocgin 12 | */ 13 | @Target(ElementType.METHOD) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | public @interface Command { 16 | 17 | byte value(); 18 | 19 | byte version() default SystemPacket.Version; 20 | 21 | byte module() default SystemPacket.DefaultModule; 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/annotation/Invoker.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.annotation; 2 | 3 | import in.hocg.netty.core.session.SessionManager; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Target(ElementType.TYPE) 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface Invoker { 13 | SessionManager.ChannelType value() default SessionManager.ChannelType.Auto; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/annotation/PacketData.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.annotation; 2 | 3 | import in.hocg.netty.core.serializer.SerializerAlgorithm; 4 | 5 | import java.lang.annotation.ElementType; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Target(ElementType.PARAMETER) 11 | @Retention(RetentionPolicy.RUNTIME) 12 | public @interface PacketData { 13 | SerializerAlgorithm algorithm() default SerializerAlgorithm.JSON; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/constant/GlobalConstant.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.constant; 2 | 3 | /** 4 | * Created by hocgin on 2019/3/14. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface GlobalConstant { 10 | Integer DEFAULT_PORT = 18765; 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/constant/MessageConstant.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.constant; 2 | 3 | /** 4 | * Created by hocgin on 2019/3/14. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface MessageConstant { 10 | String TYPE = "type"; 11 | String CHANNEL_ID = "channel_id"; 12 | String SERVER_ID = "netty_server_id"; 13 | String MESSAGE_TOPIC = "message_topic"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/constant/MessageDispatcherType.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.constant; 2 | 3 | /** 4 | * @author hocgin 5 | */ 6 | 7 | public enum MessageDispatcherType { 8 | Dispatcher 9 | } 10 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/constant/SystemPacket.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.constant; 2 | 3 | /** 4 | * 默认模块 5 | * 6 | * @author hocgin 7 | */ 8 | public interface SystemPacket { 9 | byte Version = 1; 10 | byte SystemModule = 0; 11 | byte DefaultModule = 1; 12 | 13 | byte HEARTBEAT_PACKET = 0; 14 | 15 | byte[] EMPTY_DATA = {}; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/pojo/ro/HeartBeatPacket.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.pojo.ro; 2 | 3 | 4 | import in.hocg.netty.core.constant.SystemPacket; 5 | import in.hocg.netty.core.protocol.packet.Packet; 6 | import in.hocg.netty.core.serializer.SerializerAlgorithm; 7 | 8 | public class HeartBeatPacket extends Packet { 9 | 10 | public HeartBeatPacket() { 11 | super(SystemPacket.Version, SerializerAlgorithm.JSON.algorithm(), SystemPacket.SystemModule, 12 | SystemPacket.HEARTBEAT_PACKET, SystemPacket.EMPTY_DATA); 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/protocol/codec/MessageDecoder.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.protocol.codec; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | import io.netty.channel.ChannelHandlerContext; 5 | import io.netty.handler.codec.ByteToMessageDecoder; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 解码器 11 | * 12 | * @author hocgin 13 | */ 14 | public class MessageDecoder extends ByteToMessageDecoder { 15 | 16 | @Override 17 | protected void decode(ChannelHandlerContext context, ByteBuf buf, List list) { 18 | list.add(Codec.decode(buf)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/protocol/packet/AbstractPacket.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.protocol.packet; 2 | 3 | import in.hocg.netty.core.constant.SystemPacket; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * Created by hocgin on 2019/3/2. 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public interface AbstractPacket extends Serializable { 14 | 15 | default byte getVersion() { 16 | return SystemPacket.Version; 17 | } 18 | 19 | /** 20 | * 获取指令 21 | * 22 | * @return 23 | */ 24 | byte getCommand(); 25 | 26 | /** 27 | * 获取模块 28 | * 29 | * @return 30 | */ 31 | byte getModule(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/serializer/Serializer.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.serializer; 2 | 3 | /** 4 | * Created by hocgin on 2019/3/2. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface Serializer { 10 | 11 | /** 12 | * 序列化算法 13 | * 14 | * @return 15 | */ 16 | byte getSerializerAlgorithm(); 17 | 18 | /** 19 | * 序列化 20 | * 21 | * @param object 22 | * @return 23 | */ 24 | byte[] serialize(Object object); 25 | 26 | /** 27 | * 反序列化 28 | * 29 | * @param clazz 30 | * @param bytes 31 | * @param 32 | * @return 33 | */ 34 | T deserialize(Class clazz, byte[] bytes); 35 | } 36 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-core/src/main/java/in/hocg/netty/core/utils/MethodUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.core.utils; 2 | 3 | public class MethodUtils { 4 | 5 | 6 | } 7 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-server-spring-boot-autoconfigure/src/main/java/in/hocg/boot/netty/server/autoconfiguration/properties/NettyServerProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.server.autoconfiguration.properties; 2 | 3 | import in.hocg.netty.core.constant.GlobalConstant; 4 | import lombok.Getter; 5 | import lombok.Setter; 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | @ConfigurationProperties(NettyServerProperties.PREFIX) 17 | public class NettyServerProperties { 18 | public static final String PREFIX = "boot.netty.server"; 19 | private Integer port = GlobalConstant.DEFAULT_PORT; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-server-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.netty.server.autoconfiguration.NettyServerAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-netty/netty-server/src/main/java/in/hocg/netty/server/netty/NettyServer.java: -------------------------------------------------------------------------------- 1 | package in.hocg.netty.server.netty; 2 | 3 | /** 4 | * Created by hocgin on 2019/3/2. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface NettyServer { 10 | /** 11 | * 启动 12 | */ 13 | void start(); 14 | 15 | /** 16 | * 摧毁 17 | */ 18 | void destroy(); 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-notify/notify-spring-boot-autoconfigure/src/main/java/in/hocg/boot/notify/autoconfiguration/properties/NotifyProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.notify.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(NotifyProperties.PREFIX) 14 | public class NotifyProperties { 15 | public static final String PREFIX = "boot.notify"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-notify/notify-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.notify.autoconfiguration.NotifyAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-openfeign/openfeign-spring-boot-autoconfigure/src/main/java/in/hocg/boot/openfeign/autoconfiguration/decoder/FeignExceptionInfo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.openfeign.autoconfiguration.decoder; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by hocgin on 2020/10/7 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | public class FeignExceptionInfo implements Serializable { 17 | private String timestamp; 18 | private Integer status; 19 | private String message; 20 | private String exception; 21 | 22 | // ==================== 23 | private String error; 24 | private String path; 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-openfeign/openfeign-spring-boot-autoconfigure/src/main/java/in/hocg/boot/openfeign/autoconfiguration/properties/OpenFeignProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.openfeign.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(OpenFeignProperties.PREFIX) 16 | public class OpenFeignProperties { 17 | public static final String PREFIX = "boot.openfeign"; 18 | 19 | /** 20 | * X-User-Agent 标记。默认: feign 21 | */ 22 | private String userAgent = "openfeign"; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-openfeign/openfeign-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.openfeign.autoconfiguration.OpenFeignAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-oss/oss-spring-boot-autoconfigure/src/main/java/in/hocg/boot/oss/autoconfigure/exception/UploadOssException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.oss.autoconfigure.exception; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/14 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class UploadOssException extends RuntimeException { 10 | public UploadOssException(String message) { 11 | super(message); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-oss/oss-spring-boot-autoconfigure/src/main/java/in/hocg/boot/oss/autoconfigure/utils/FileUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.oss.autoconfigure.utils; 2 | 3 | import lombok.NonNull; 4 | import lombok.experimental.UtilityClass; 5 | 6 | import java.io.IOException; 7 | import java.nio.file.Files; 8 | import java.nio.file.Path; 9 | 10 | /** 11 | * Created by hocgin on 2020/8/14 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | @UtilityClass 17 | public class FileUtils { 18 | public Path createTempFile(@NonNull String filename) throws IOException { 19 | return Files.createTempDirectory("temp_file") 20 | .resolve(filename); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-oss/oss-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.oss.autoconfigure.OssAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-rocketmq/rocketmq-spring-boot-autoconfigure/src/main/java/in/hocg/boot/rocketmq/autoconfiguration/properties/RocketMQProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.rocketmq.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(RocketMQProperties.PREFIX) 14 | public class RocketMQProperties { 15 | public static final String PREFIX = "boot.rocketmq"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-rocketmq/rocketmq-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.rocketmq.autoconfiguration.RocketMQAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-samples/arthas-spring-boot-sample/src/main/java/in/hocg/boot/arthas/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.arthas.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @RestController 15 | @EnableAspectJAutoProxy(exposeProxy = true) 16 | @SpringBootApplication 17 | public class BootApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(BootApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-samples/arthas-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | application: 5 | name: arthasDemo 6 | 7 | boot: 8 | arthas: 9 | tunnel-server: ws://127.0.0.1:7777/ws 10 | # tunnel-server: wss://arthas.hocgin.top/ws 11 | # tunnel-server: ws://39.100.87.79:32426/ws 12 | telnet-port: -1 13 | http-port: -1 14 | disabledCommands: stop 15 | session-timeout: 10000 16 | logging: 17 | level: 18 | root: DEBUG 19 | -------------------------------------------------------------------------------- /spring-boot-samples/arthas-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/cache-spring-boot-sample/src/main/java/in/hocg/boot/cache/sample/cache/CacheServiceImpl.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.sample.cache; 2 | 3 | import cn.hutool.core.util.StrUtil; 4 | import in.hocg.boot.cache.sample.cache.impl.CacheService; 5 | import org.springframework.cache.annotation.Cacheable; 6 | import org.springframework.stereotype.Service; 7 | 8 | @Service 9 | public class CacheServiceImpl implements CacheService { 10 | 11 | @Override 12 | @Cacheable(cacheNames = "USE_CACHE", key = "#id", unless = "#result == null") 13 | public String useCache(String id) { 14 | return StrUtil.format("useCache_{}", id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/cache-spring-boot-sample/src/main/java/in/hocg/boot/cache/sample/cache/impl/CacheService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.cache.sample.cache.impl; 2 | 3 | public interface CacheService { 4 | String useCache(String id); 5 | } 6 | -------------------------------------------------------------------------------- /spring-boot-samples/cache-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | spring: 5 | cache: 6 | type: redis 7 | redis: 8 | key-prefix: v2022 9 | application: 10 | name: example 11 | redis: 12 | password: 123456 13 | port: 6379 14 | host: 172.25.63.38 15 | boot: 16 | # bloom: 17 | # name: 'test' 18 | cache: 19 | names: 20 | - name: USE_CACHE 21 | ttl: 1D 22 | - name: USE_CACHE2 23 | ttl: 1H 24 | #boot: 25 | # redisson: 26 | # mode: Single 27 | # single: 28 | # address: "172.25.63.38:6379" 29 | -------------------------------------------------------------------------------- /spring-boot-samples/cache-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/cps-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: local 6 | -------------------------------------------------------------------------------- /spring-boot-samples/cps-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/excel-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | datasource: 5 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 6 | url: jdbc:p6spy:h2:mem:test;MODE=mysql;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 7 | username: sa 8 | password: '' 9 | -------------------------------------------------------------------------------- /spring-boot-samples/excel-spring-boot-sample/src/main/resources/import/file.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/excel-spring-boot-sample/src/main/resources/import/file.xlsx -------------------------------------------------------------------------------- /spring-boot-samples/excel-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory 2 | logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger 3 | appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger 4 | #appender=com.p6spy.engine.spy.appender.Slf4JLogger 5 | deregisterdrivers=true 6 | useprefix=true 7 | excludecategories=info,debug,result,commit,resultset 8 | dateformat=yyyy-MM-dd HH:mm:ss 9 | driverlist=org.h2.Driver 10 | outagedetection=true 11 | outagedetectioninterval=2 12 | -------------------------------------------------------------------------------- /spring-boot-samples/excel-spring-boot-sample/src/main/resources/template/export-fill.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/excel-spring-boot-sample/src/main/resources/template/export-fill.xlsx -------------------------------------------------------------------------------- /spring-boot-samples/excel-spring-boot-sample/src/main/resources/template/export-template.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/excel-spring-boot-sample/src/main/resources/template/export-template.xlsx -------------------------------------------------------------------------------- /spring-boot-samples/geoip-spring-boot-sample/src/main/java/in/hocg/boot/geoip/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.geoip.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @RestController 15 | @EnableAspectJAutoProxy(exposeProxy = true) 16 | @SpringBootApplication 17 | public class BootApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(BootApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-samples/geoip-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | boot: 5 | geo: 6 | countryPath: /Users/hocgin/HiProjects/spring-boot-starters-project/spring-boot-samples/geoip-spring-boot-sample/src/main/resources/GeoIP2-Country.mmdb 7 | cityPath: /Users/hocgin/HiProjects/spring-boot-starters-project/spring-boot-samples/geoip-spring-boot-sample/src/main/resources/GeoLite2-City.mmdb 8 | -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/addAudio/b0.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/addAudio/b0.mp3 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/addAudio/v0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/addAudio/v0.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/erasure/v0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/erasure/v0.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img1.png -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img2.png -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/image2video/img3.png -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b1.mp3 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b2.mp3 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b3.mp3 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeAudio/b4.mp3 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v0.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v1.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/mergeVideo/v2.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/javacv-spring-boot-sample/src/test/resources/videoToRtmp/v0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hocgin/spring-boot-starters-project/4bb4304e8f2ed626ed0b4c7f2dcd88f48a2f0b99/spring-boot-samples/javacv-spring-boot-sample/src/test/resources/videoToRtmp/v0.mp4 -------------------------------------------------------------------------------- /spring-boot-samples/kafka-spring-boot-sample/src/main/java/in/hocg/boot/kafka/sample/constant/KafkaConstant.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.kafka.sample.constant; 2 | 3 | public class KafkaConstant { 4 | public static final String TOPIC = "T1"; 5 | public static final String GROUP = "defaultGroup"; 6 | } 7 | -------------------------------------------------------------------------------- /spring-boot-samples/kafka-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | kafka: 5 | bootstrap-servers: 127.0.0.1:9092 6 | producer: 7 | retries: 3 8 | batch-size: 16384 9 | buffer-memory: 33554432 10 | acks: 1 11 | consumer: 12 | group-id: defaultGroup 13 | enable-auto-commit: false 14 | # 当各分区下有已提交的offset时,从提交的offset开始消费;无提交的offset时,从头开始消费 15 | auto-offset-reset: earliest 16 | listener: 17 | missing-topics-fatal: false 18 | ack-mode: manual_immediate 19 | -------------------------------------------------------------------------------- /spring-boot-samples/kafka-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/knife-gateway-sample/src/main/java/in/hocg/knife/gateway/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.knife.gateway.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15. 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @SpringBootApplication 13 | public class BootApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(BootApplication.class, args); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-samples/logging-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | logging: 2 | level: 3 | root: WARN 4 | com.alibaba.nacos: WARN 5 | in.hocg.rabbit: DEBUG 6 | in.hocg: DEBUG 7 | config: classpath:log4j2-boot-local.xml 8 | file: 9 | path: /Users/hocgin/Downloads/logs/app/${spring.application.name:unknown} 10 | name: ${logging.file.path}/${spring.application.name:unknown}.log 11 | -------------------------------------------------------------------------------- /spring-boot-samples/mail-spring-boot-sample/src/main/java/in/hocg/mail/spring/boot/samples/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.mail.spring.boot.samples; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author hocgin 8 | * @date 2019/6/13 9 | */ 10 | @SpringBootApplication 11 | public class BootApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(BootApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/mail-spring-boot-sample/src/main/resources/application-local.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | spring: 3 | profiles: 4 | active: local 5 | boot: 6 | mail: 7 | host: smtp.163.com 8 | from: "Eagle 官方邮件<13600747016@163.com>" 9 | user: 13600747016@163.com 10 | pass: BUVECAXMSKPIVBJP 11 | debug: true 12 | -------------------------------------------------------------------------------- /spring-boot-samples/mail-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | spring: 3 | profiles: 4 | active: local 5 | boot: 6 | mail: 7 | host: unknown 8 | from: unknown 9 | user: unknown 10 | pass: unknown 11 | -------------------------------------------------------------------------------- /spring-boot-samples/message-spring-boot-sample/src/main/java/in/hocg/boot/message/sample/pojo/TestMessageDto.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.message.sample.pojo; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by hocgin on 2021/4/21 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | public class TestMessageDto implements Serializable { 17 | private String body; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-samples/message-spring-boot-sample/src/main/resources/application-local.yml: -------------------------------------------------------------------------------- 1 | logging: 2 | level: 3 | root: info 4 | 5 | spring: 6 | # datasource: 7 | # driver-class-name: com.p6spy.engine.spy.P6SpyDriver 8 | # url: jdbc:p6spy:mysql://39.100.87.79:30962/db_chaos_dev?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 9 | # username: root 10 | # password: hocgin 11 | redis: 12 | host: 39.100.87.79 13 | port: 32079 14 | -------------------------------------------------------------------------------- /spring-boot-samples/message-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: local 6 | datasource: 7 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 8 | url: jdbc:p6spy:mysql://127.0.0.1:3306/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 9 | username: root 10 | password: hocgin 11 | druid: 12 | validation-query: SELECT 1 13 | test-while-idle: true 14 | mybatis-plus: 15 | global-config: 16 | banner: false 17 | mapper-locations: classpath*:/**/xml/*.xml 18 | boot: 19 | message: 20 | type: Redis 21 | -------------------------------------------------------------------------------- /spring-boot-samples/message-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-extensions-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | datasource: 5 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 6 | url: jdbc:p6spy:mysql://${MYSQL_HOSTNAME:"127.0.0.1:3306"}/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 7 | username: ${MYSQL_USERNAME:root} 8 | password: ${MYSQL_PASSWORD:hocgin} 9 | druid: 10 | validation-query: SELECT 1 11 | test-while-idle: true 12 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-extensions-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @SpringBootApplication 13 | public class BootApplication { 14 | 15 | public static void main(String[] args) { 16 | SpringApplication.run(BootApplication.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/convert/ExampleConvert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.convert; 2 | 3 | import in.hocg.boot.mybatis.plus.sample.dto.ExampleVo; 4 | import in.hocg.boot.mybatis.plus.sample.entity.Example; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * Created by hocgin on 2022/1/4 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Component 14 | public class ExampleConvert { 15 | 16 | public ExampleVo asExampleVo(Example entity) { 17 | return new ExampleVo().setOk("ok"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/dto/ExampleVo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.dto; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | /** 7 | * Created by hocgin on 2022/1/4 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @Accessors(chain = true) 14 | public class ExampleVo { 15 | private String ok; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/mapper/ExampleMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import in.hocg.boot.mybatis.plus.sample.entity.Example; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * Mapper 接口 10 | *

11 | * 12 | * @author hocgin 13 | * @since 2020-08-04 14 | */ 15 | @Mapper 16 | public interface ExampleMapper extends BaseMapper { 17 | 18 | String index(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/mapper/xml/ExampleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/java/in/hocg/boot/mybatis/plus/sample/service/ExampleService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.service; 2 | 3 | 4 | import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.AbstractService; 5 | import in.hocg.boot.mybatis.plus.sample.dto.ExampleVo; 6 | import in.hocg.boot.mybatis.plus.sample.entity.Example; 7 | 8 | import java.util.Optional; 9 | 10 | /** 11 | *

12 | * 服务类 13 | *

14 | * 15 | * @author hocgin 16 | * @since 2020-08-04 17 | */ 18 | public interface ExampleService extends AbstractService { 19 | 20 | String index(); 21 | 22 | ExampleVo testAs(); 23 | 24 | Optional firstOne(); 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: local 6 | datasource: 7 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 8 | url: jdbc:p6spy:mysql://${MYSQL_HOSTNAME}/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 9 | username: ${MYSQL_USERNAME} 10 | password: ${MYSQL_PASSWORD} 11 | druid: 12 | validation-query: SELECT 1 13 | test-while-idle: true 14 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/java/in/hocg/boot/mybatis/plus/sample/extensions/MybatisTestTests.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.extensions; 2 | 3 | import in.hocg.boot.mybatis.plus.sample.mapper.ExampleMapper; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | 7 | /** 8 | * Created by hocgin on 2022/3/25 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | class MybatisTestTests { 14 | @Autowired(required = false) 15 | private ExampleMapper service; 16 | 17 | @Test 18 | public void testInsert() { 19 | String index = service.index(); 20 | System.out.println(index); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/java/in/hocg/boot/mybatis/plus/sample/web/sample/TestApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.web.sample; 2 | 3 | import org.springframework.boot.autoconfigure.SpringBootApplication; 4 | 5 | /** 6 | * Created by hocgin on 2021/12/17 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @SpringBootApplication(scanBasePackages = {"in.hocg.boot.mybatis.plus"}) 12 | public class TestApplication { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/java/in/hocg/boot/mybatis/plus/sample/web/sample/data/none/NoneModelEntityMapper.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.mybatis.plus.sample.web.sample.data.none; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Select; 6 | 7 | /** 8 | * Created by hocgin on 2021/12/17 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Mapper 14 | public interface NoneModelEntityMapper extends BaseMapper { 15 | @Select("select * from none_model_entity where id = #{id}") 16 | NoneModelEntity byId(Long id); 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/application-test.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 4 | url: jdbc:p6spy:h2:mem:test;MODE=mysql;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 5 | username: sa 6 | password: '' 7 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 4 | url: jdbc:p6spy:h2:mem:test;MODE=mysql;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 5 | username: sa 6 | password: '' 7 | schema: 8 | - classpath:schema/*.sql 9 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/fill/sql/data.sql: -------------------------------------------------------------------------------- 1 | insert into none_model_entity(id, title) values(1, 't1'), (2, 't2'); 2 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/logicdel/sql/data.sql: -------------------------------------------------------------------------------- 1 | insert into model_entity(id) values(1), (2); 2 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/mybatis-config-empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spring-boot-samples/mybatis-plus-spring-boot-sample/src/test/resources/spy.properties: -------------------------------------------------------------------------------- 1 | modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory 2 | logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger 3 | appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger 4 | #appender=com.p6spy.engine.spy.appender.Slf4JLogger 5 | deregisterdrivers=true 6 | useprefix=true 7 | excludecategories=info,debug,result,commit,resultset 8 | dateformat=yyyy-MM-dd HH:mm:ss 9 | driverlist=org.h2.Driver 10 | outagedetection=true 11 | outagedetectioninterval=2 12 | -------------------------------------------------------------------------------- /spring-boot-samples/named-spring-boot-sample/src/main/java/in/hocg/named/sample/named/NamedConstants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.named.sample.named; 2 | 3 | import lombok.experimental.UtilityClass; 4 | 5 | /** 6 | * Created by hocgin on 2020/8/14 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @UtilityClass 12 | public class NamedConstants { 13 | public final String Test = "Test"; 14 | public final String Test2 = "Test2"; 15 | public final String ThrowTest3 = "Test3"; 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/named-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | redis: 5 | host: 39.100.87.79 6 | port: 32079 7 | datasource: 8 | driver-class-name: com.mysql.cj.jdbc.Driver 9 | url: jdbc:mysql://127.0.0.1:3306/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 10 | username: root 11 | password: hocgin 12 | -------------------------------------------------------------------------------- /spring-boot-samples/named-spring-boot-sample/src/test/java/in/hocg/boot/named/EnumTests.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named; 2 | 3 | import com.google.common.base.Joiner; 4 | import in.hocg.boot.utils.utils.DataDictUtils; 5 | import org.assertj.core.util.Lists; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by hocgin on 2021/12/26 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | public class EnumTests { 16 | public static void main(String[] args) { 17 | List sql = DataDictUtils.scanSql(Lists.newArrayList("in.hocg.boot")); 18 | String sqlStr = Joiner.on(System.lineSeparator()).join(sql); 19 | 20 | System.out.println(sqlStr); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-samples/named-spring-boot-sample/src/test/java/in/hocg/boot/named/TestEnum.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.named; 2 | 3 | import in.hocg.boot.utils.annotation.UseDataDictKey; 4 | import in.hocg.boot.utils.enums.DataDictEnum; 5 | import lombok.Getter; 6 | import lombok.RequiredArgsConstructor; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * Created by hocgin on 2021/12/26 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | @Getter 17 | @UseDataDictKey(value = "data_dict_key", description = "测试的数据字典") 18 | @RequiredArgsConstructor 19 | public enum TestEnum implements DataDictEnum { 20 | TEST_1("t1", "测试1"), 21 | TEST_2("t2", "测试1"), 22 | ; 23 | private final Serializable code; 24 | private final String name; 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/java/in/hocg/boot/netty/sample/constant/NettyConstant.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.sample.constant; 2 | 3 | import in.hocg.netty.core.constant.SystemPacket; 4 | 5 | /** 6 | * Created by hocgin on 2019/3/17. 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @SuppressWarnings("all") 12 | public interface NettyConstant { 13 | byte MOD_TEST = SystemPacket.DefaultModule; 14 | 15 | /** 16 | * 指令 17 | */ 18 | byte CMD_TEST1 = 1; 19 | byte CMD_PING = 2; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/java/in/hocg/boot/netty/sample/invoker/TestInvoker.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.sample.invoker; 2 | 3 | import in.hocg.boot.netty.sample.constant.NettyConstant; 4 | import in.hocg.boot.netty.sample.pojo.PacketRo; 5 | import in.hocg.boot.netty.sample.pojo.PacketVo; 6 | import in.hocg.netty.core.annotation.ChannelId; 7 | import in.hocg.netty.core.annotation.Command; 8 | import in.hocg.netty.core.annotation.Invoker; 9 | import in.hocg.netty.core.annotation.PacketData; 10 | 11 | import java.io.Serializable; 12 | 13 | @Invoker 14 | public interface TestInvoker { 15 | 16 | @Command(NettyConstant.CMD_PING) 17 | PacketVo ping(@ChannelId Serializable id, @PacketData PacketRo ro); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/java/in/hocg/boot/netty/sample/pojo/PacketRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.sample.pojo; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.ToString; 6 | import lombok.experimental.Accessors; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | * @author hocgin 12 | */ 13 | @Setter 14 | @Getter 15 | @ToString 16 | @Accessors(chain = true) 17 | public class PacketRo implements Serializable { 18 | private String title; 19 | private String remark; 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/java/in/hocg/boot/netty/sample/pojo/PacketVo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.netty.sample.pojo; 2 | 3 | public class PacketVo { 4 | } 5 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | debug: true 4 | logging: 5 | level: 6 | root: debug 7 | in.hocg.boot: debug 8 | -------------------------------------------------------------------------------- /spring-boot-samples/netty-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/notify-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | -------------------------------------------------------------------------------- /spring-boot-samples/notify-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/main/java/in/hocg/oss/spring/boot/samples/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.oss.spring.boot.samples; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author hocgin 8 | * @date 2019/6/13 9 | */ 10 | @SpringBootApplication 11 | public class BootApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(BootApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | 3 | boot: 4 | oss: 5 | enabled: true 6 | domain: http://127.0.0.1:8080 7 | type: local 8 | # secretKey: 9 | # accessKey: 10 | # space: 11 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/test/java/in/hocg/oss/core/TestConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.oss.core; 2 | 3 | import in.hocg.oss.spring.boot.samples.BootApplication; 4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 5 | import org.springframework.context.annotation.ComponentScan; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | 9 | @Configuration 10 | @ComponentScan(basePackageClasses = BootApplication.class) 11 | @EnableAutoConfiguration 12 | public class TestConfiguration { 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/test/resources/application-aliyun.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | 3 | boot: 4 | oss: 5 | enabled: true 6 | domain: http://endpoint.com 7 | secretKey: 8 | accessKey: 9 | space: 10 | type: aliyun 11 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/test/resources/application-local.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | 3 | boot: 4 | oss: 5 | enabled: true 6 | domain: http://127.0.0.1:8080 7 | type: local 8 | -------------------------------------------------------------------------------- /spring-boot-samples/oss-spring-boot-sample/src/test/resources/application-qiniu.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | 3 | boot: 4 | oss: 5 | enabled: true 6 | domain: http://endpoint.com 7 | secretKey: 8 | accessKey: 9 | space: 10 | type: qiniu 11 | -------------------------------------------------------------------------------- /spring-boot-samples/schedulerx-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: prod 6 | #https://help.aliyun.com/document_detail/161998.html?spm=a2c4g.11186623.6.557.d699290cnxO2nD 7 | schedulerx2: 8 | # https://help.aliyun.com/document_detail/162000.html?spm=a2c4g.11186623.2.9.3869212fxto1TK 9 | endpoint: acm.aliyun.com 10 | endpointPort: 8080 11 | # namespace为命名空间ID,可以在控制台命名空间页面获取。 12 | namespace: 6186ac89-041b-45b4-8ba2-68bca89c16df 13 | # groupId为应用ID,appKey为应用key,可以在控制台应用管理页面获取。多个id用,号拼接 14 | groupId: rabbit-hold 15 | # 1.2.1及以上版本设置appKey 16 | appKey: hr3g+Up7k91lHL4eAX4DhQ== 17 | -------------------------------------------------------------------------------- /spring-boot-samples/schedulerx-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/sentinel-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | boot: 4 | sentinel: 5 | flow-rules: 6 | - resource: TEST_SENTINEL 7 | grade: 1 8 | count: 1 9 | -------------------------------------------------------------------------------- /spring-boot-samples/sentinel-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/sms-spring-boot-sample/src/main/java/in/hocg/sms/spring/boot/samples/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.sms.spring.boot.samples; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author hocgin 8 | * @date 2019/6/13 9 | */ 10 | @SpringBootApplication 11 | public class BootApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(BootApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/sms-spring-boot-sample/src/main/java/in/hocg/sms/spring/boot/samples/SmsTpl.java: -------------------------------------------------------------------------------- 1 | package in.hocg.sms.spring.boot.samples; 2 | 3 | import in.hocg.boot.sms.autoconfigure.impl.aliyun.SmsTemplate; 4 | import lombok.Getter; 5 | import lombok.RequiredArgsConstructor; 6 | 7 | /** 8 | * Created by hocgin on 2020/10/12 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @RequiredArgsConstructor 15 | public enum SmsTpl implements SmsTemplate { 16 | Test("知否社区", "SMS_204297021"); 17 | private final String signName; 18 | private final String templateCode; 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-samples/sms-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | spring: 3 | profiles: 4 | active: local 5 | boot: 6 | sms: 7 | enabled: true 8 | regionId: cn-hangzhou 9 | secretKey: 10 | accessKey: 11 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-client-gateway-sample/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 20001 3 | spring: 4 | cloud: 5 | gateway: 6 | routes: 7 | - id: test 8 | uri: https://hocg.in 9 | predicates: 10 | - Path=/test 11 | debug: true 12 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/README.md: -------------------------------------------------------------------------------- 1 | - /oauth/authorize:申请授权码 code, 涉及的类AuthorizationEndpoint 2 | - /oauth/token:获取令牌 token, 涉及的类TokenEndpoint 3 | - /oauth/check_token:用于资源服务器请求端点来检查令牌是否有效, 涉及的类CheckTokenEndpoint 4 | - /oauth/confirm_access:用户确认授权提交, 涉及的类WhitelabelApprovalEndpoint 5 | - /oauth/error:授权服务错误信息, 涉及的类WhitelabelErrorEndpoint 6 | - /oauth/token_key:提供公有密匙的端点,使用 JWT 令牌时会使用 , 涉及的类TokenKeyEndpoint 7 | 8 | ⚠️: 默认情况下/oauth/check_token和/oauth/token_key端点默认是denyAll() 9 | 10 | 11 | 12 | http://example2.hocgin.local:20002/user 13 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/java/in/hocg/sso/server/sample/config/security/autoconfiguration/SsoAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.sso.server.sample.config.security.autoconfiguration; 2 | 3 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/18 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Configuration 13 | @EnableConfigurationProperties(SsoProperties.class) 14 | public class SsoAutoConfiguration { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 20000 3 | sso: 4 | oauth: 5 | clients: 6 | - client-id: client_example 7 | client-secret: hocgin 8 | redirect-uris: 9 | - http://example.hocgin.local:20001/login/oauth2/code/custom 10 | - http://example2.hocgin.local:20002/login/oauth2/code/custom 11 | spring: 12 | security: 13 | oauth2: 14 | client: 15 | registration: 16 | github: 17 | client-id: 7c8f6909e7226d490bdb 18 | client-secret: a8d3db4c25c9627e4bc5996f25c45f76a4b2214e 19 | client-name: Github Login 20 | redirect-uri: '{baseUrl}/{action}/oauth2/code/{registrationId}' 21 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/resources/client-mysql.sql: -------------------------------------------------------------------------------- 1 | create table oauth_client_token 2 | ( 3 | token_id VARCHAR(256) 4 | COMMENT 'MD5加密的access_token的值', 5 | token LONGBLOB 6 | COMMENT 'OAuth2AccessToken.java对象序列化后的二进制数据', 7 | authentication_id VARCHAR(256) PRIMARY KEY 8 | COMMENT 'MD5加密过的username,client_id,scope', 9 | user_name VARCHAR(256) 10 | COMMENT '登录的用户名', 11 | client_id VARCHAR(256) 12 | COMMENT '客户端ID' 13 | ); 14 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 首页 9 | 10 | 11 | example.hocgin.local 12 | example2.hocgin.local 13 | sso.hocgin.local 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-samples/sso-server-spring-boot-sample/src/main/resources/templates/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 注册页面 9 | 10 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-client-gateway-sample/src/main/resources/bootstrap.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 20001 3 | spring: 4 | cloud: 5 | # https://cloud.spring.io/spring-cloud-static/spring-cloud-security/2.1.0.RC3/single/spring-cloud-security.html 6 | gateway: 7 | routes: 8 | - id: test 9 | uri: http://example2.hocgin.local:20002/user 10 | predicates: 11 | - Path=/test/** 12 | filters: 13 | - StripPrefix=1 14 | debug: true 15 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-client-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 20002 3 | logging: 4 | level: 5 | root: debug 6 | boot: 7 | sso: 8 | client: 9 | ignore-urls: 10 | - '/ignore' 11 | debug: true 12 | 13 | 14 | 15 | security: 16 | oauth2: 17 | hostname: http://sso.hocgin.local:20000 18 | client: 19 | client-id: client_example 20 | client-secret: hocgin 21 | user-authorization-uri: ${security.oauth2.hostname}/oauth/authorize 22 | access-token-uri: ${security.oauth2.hostname}/oauth/token 23 | resource: 24 | jwt: 25 | key-uri: ${security.oauth2.hostname}/oauth/token_key 26 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/README.md: -------------------------------------------------------------------------------- 1 | - /oauth/authorize:申请授权码 code, 涉及的类AuthorizationEndpoint 2 | - /oauth/token:获取令牌 token, 涉及的类TokenEndpoint 3 | - /oauth/check_token:用于资源服务器请求端点来检查令牌是否有效, 涉及的类CheckTokenEndpoint 4 | - /oauth/confirm_access:用户确认授权提交, 涉及的类WhitelabelApprovalEndpoint 5 | - /oauth/error:授权服务错误信息, 涉及的类WhitelabelErrorEndpoint 6 | - /oauth/token_key:提供公有密匙的端点,使用 JWT 令牌时会使用 , 涉及的类TokenKeyEndpoint 7 | 8 | ⚠️: 默认情况下/oauth/check_token和/oauth/token_key端点默认是denyAll() 9 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/src/main/java/in/hocg/sso2/server/sample/config/security/autoconfiguration/SsoAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.sso2.server.sample.config.security.autoconfiguration; 2 | 3 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/18 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Configuration 13 | @EnableConfigurationProperties(SsoProperties.class) 14 | public class SsoAutoConfiguration { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/src/main/resources/client-mysql.sql: -------------------------------------------------------------------------------- 1 | create table oauth_client_token 2 | ( 3 | token_id VARCHAR(256) 4 | COMMENT 'MD5加密的access_token的值', 5 | token LONGBLOB 6 | COMMENT 'OAuth2AccessToken.java对象序列化后的二进制数据', 7 | authentication_id VARCHAR(256) PRIMARY KEY 8 | COMMENT 'MD5加密过的username,client_id,scope', 9 | user_name VARCHAR(256) 10 | COMMENT '登录的用户名', 11 | client_id VARCHAR(256) 12 | COMMENT '客户端ID' 13 | ); 14 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 首页 9 | 10 | 11 | example.hocgin.local 12 | example2.hocgin.local 13 | sso.hocgin.local 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-samples/sso2-server-spring-boot-sample/src/main/resources/templates/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 注册页面 9 | 10 | -------------------------------------------------------------------------------- /spring-boot-samples/test-spring-boot-sample/src/main/java/in/hocg/boot/test/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.test.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @RestController 15 | @EnableAspectJAutoProxy(exposeProxy = true) 16 | @SpringBootApplication 17 | public class BootApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(BootApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-samples/test-spring-boot-sample/src/main/java/in/hocg/boot/test/sample/service/IndexService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.test.sample.service; 2 | 3 | import lombok.RequiredArgsConstructor; 4 | import org.springframework.context.annotation.Lazy; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/16 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Service 14 | @RequiredArgsConstructor(onConstructor = @__(@Lazy)) 15 | public class IndexService { 16 | 17 | public String worked() { 18 | return "null"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-samples/test-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: local 6 | datasource: 7 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 8 | url: jdbc:p6spy:mysql://127.0.0.1:3306/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 9 | username: root 10 | password: hocgin 11 | druid: 12 | validation-query: SELECT 1 13 | test-while-idle: true 14 | mybatis-plus: 15 | global-config: 16 | banner: false 17 | mapper-locations: classpath*:/**/xml/*.xml 18 | -------------------------------------------------------------------------------- /spring-boot-samples/test-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/tpl-spring-boot-sample/src/main/java/in/hocg/boot/tpl/sample/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.tpl.sample; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created by hocgin on 2020/8/15 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @RestController 15 | @EnableAspectJAutoProxy(exposeProxy = true) 16 | @SpringBootApplication 17 | public class BootApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(BootApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-samples/tpl-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | -------------------------------------------------------------------------------- /spring-boot-samples/tpl-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/web-spring-boot-sample/src/main/java/in/hocg/boot/web/sample/LazyService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.sample; 2 | 3 | import lombok.RequiredArgsConstructor; 4 | import org.springframework.context.annotation.Lazy; 5 | 6 | /** 7 | * Created by hocgin on 2021/7/25 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @org.springframework.stereotype.Service 13 | @RequiredArgsConstructor(onConstructor = @__(@Lazy)) 14 | public class LazyService { 15 | private final Writer1 writer; 16 | 17 | public String worked() { 18 | return writer.write("Hi"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-samples/web-spring-boot-sample/src/main/java/in/hocg/boot/web/sample/Writer1.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.sample; 2 | 3 | import org.springframework.context.annotation.Lazy; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * Created by hocgin on 2021/7/25 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Lazy 13 | @Component 14 | public class Writer1 { 15 | private final Writer2 writer2; 16 | 17 | @Lazy 18 | public Writer1(Writer2 writer2) { 19 | this.writer2 = writer2; 20 | System.out.println("工作1" + " 被加载!!!"); 21 | } 22 | 23 | public String write(String message) { 24 | return "工作1" + message; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /spring-boot-samples/web-spring-boot-sample/src/main/java/in/hocg/boot/web/sample/Writer2.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.sample; 2 | 3 | import org.springframework.context.annotation.Lazy; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * Created by hocgin on 2021/7/25 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Lazy 13 | @Component 14 | public class Writer2 { 15 | 16 | public Writer2() { 17 | System.out.println("工作2" + " 被加载!!!"); 18 | } 19 | 20 | public void write(String message) { 21 | System.out.println("writerId" + ": " + message); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-samples/web-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | logging: 3 | level: 4 | in.hocg: DEBUG 5 | spring: 6 | mvc: 7 | servlet: 8 | load-on-startup: 1 9 | -------------------------------------------------------------------------------- /spring-boot-samples/web-spring-boot-sample/src/test/java/in/hocg/boot/web/sample/TestConfiguration.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.sample; 2 | 3 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 4 | import org.springframework.context.annotation.ComponentScan; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | 8 | @Configuration 9 | @ComponentScan(basePackageClasses = BootApplication.class) 10 | @EnableAutoConfiguration 11 | public class TestConfiguration { 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-samples/webmagic-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | profiles: 5 | active: local 6 | datasource: 7 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 8 | url: jdbc:p6spy:mysql://${MYSQL_HOSTNAME}/db_test?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&allowPublicKeyRetrieval=true 9 | username: ${MYSQL_USERNAME} 10 | password: ${MYSQL_PASSWORD} 11 | druid: 12 | validation-query: SELECT 1 13 | test-while-idle: true 14 | -------------------------------------------------------------------------------- /spring-boot-samples/webmagic-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/basic/IWebSocketExceptionAdvice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.basic; 2 | 3 | import in.hocg.boot.ws.autoconfiguration.core.MessageExceptionAdvice; 4 | 5 | /** 6 | * Created by hocgin on 2022/1/8 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class IWebSocketExceptionAdvice extends MessageExceptionAdvice { 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/basic/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.basic; 2 | 3 | import in.hocg.boot.utils.context.security.UserPrincipal; 4 | import in.hocg.boot.ws.autoconfiguration.core.service.SocketUserService; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.security.Principal; 8 | 9 | /** 10 | * Created by hocgin on 2022/1/5 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | @Component 16 | public class UserServiceImpl implements SocketUserService { 17 | @Override 18 | public Principal loadUserByTicket(String ticket) { 19 | return new UserPrincipal(ticket); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/cmd/MessageCmdDto.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.cmd; 2 | 3 | import io.swagger.annotations.ApiModelProperty; 4 | import lombok.Data; 5 | import lombok.experimental.Accessors; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * Created by hocgin on 2022/6/8 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | @Data 16 | @Accessors(chain = true) 17 | public class MessageCmdDto implements Serializable { 18 | @ApiModelProperty(required = true, value = "类型: room/room.signal") 19 | private String name; 20 | private Object value; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/cmd/Room.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.cmd; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | /** 7 | * Created by hocgin on 2022/6/8 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @Accessors(chain = true) 14 | public class Room { 15 | private Type type; 16 | private String game; 17 | 18 | public enum Type { 19 | Open, 20 | Connected, 21 | Reconnect, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/cmd/TestCmd.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.cmd; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | /** 7 | * Created by hocgin on 2022/1/5 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @Accessors(chain = true) 14 | public class TestCmd { 15 | private String test; 16 | private String ok; 17 | private byte[] bytes; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/cmd/ro/RoomSignalRo.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.cmd.ro; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | /** 7 | * Created by hocgin on 2022/6/8 8 | * email: hocgin@gmail.com 9 | * webRTC 信号 10 | * 11 | * @author hocgin 12 | */ 13 | @Data 14 | @Accessors(chain = true) 15 | public class RoomSignalRo { 16 | private String id; 17 | private Object signal; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/java/in/hocg/boot/ws/sample/service/GameService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.sample.service; 2 | 3 | import in.hocg.boot.ws.sample.cmd.ro.GameCmdRo; 4 | import in.hocg.boot.ws.sample.cmd.ro.RoomSignalRo; 5 | 6 | /** 7 | * Created by hocgin on 2022/6/8 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public interface GameService { 13 | void handleRoomRequest(GameCmdRo ro); 14 | 15 | void handleRoomSignal(RoomSignalRo ro, String username); 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/ws-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | debug: true 4 | logging: 5 | level: 6 | in.hocg.boot: debug 7 | boot: 8 | websocket: 9 | withSockJS: true 10 | -------------------------------------------------------------------------------- /spring-boot-samples/xxljob-spring-boot-sample/src/main/java/in/hocg/xxljob/spring/boot/samples/BootApplication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.xxljob.spring.boot.samples; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * @author hocgin 8 | * @date 2019/6/13 9 | */ 10 | @SpringBootApplication 11 | public class BootApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(BootApplication.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-samples/xxljob-spring-boot-sample/src/main/java/in/hocg/xxljob/spring/boot/samples/IndexController.java: -------------------------------------------------------------------------------- 1 | package in.hocg.xxljob.spring.boot.samples; 2 | 3 | import lombok.RequiredArgsConstructor; 4 | import org.springframework.context.annotation.Lazy; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created by hocgin on 2019/6/13. 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @RestController 15 | @RequestMapping 16 | @RequiredArgsConstructor(onConstructor_ = {@Lazy}) 17 | public class IndexController { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-samples/xxljob-spring-boot-sample/src/main/resources/application-local.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | spring: 3 | profiles: 4 | active: local 5 | boot: 6 | xxljob: 7 | admin-addresses: http://job-saas.dev.klxuexi.net/ 8 | 9 | -------------------------------------------------------------------------------- /spring-boot-samples/xxljob-spring-boot-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: true 2 | spring: 3 | profiles: 4 | active: local 5 | boot: 6 | xxljob: 7 | appname: ${spring.application.name:unknown} 8 | ip: ${spring.cloud.client.ip-address} 9 | port: 13501 10 | log-path: ${logging.file.path}/xxl-job/ 11 | -------------------------------------------------------------------------------- /spring-boot-samples/youtube-spring-boot-sample/src/main/java/in/hocg/boot/youtube/sample/constants/Constants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.youtube.sample.constants; 2 | 3 | import com.google.common.collect.Lists; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Created by hocgin on 2021/10/5 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public class Constants { 14 | public static final String DEFAULT_CLIENT_ID = "854840501995-v67uhbkpipjdicve031ka4rdjqqojmf1.apps.googleusercontent.com"; 15 | public static final List DEFAULT_SCOPES = Lists.newArrayList("https://www.googleapis.com/auth/youtube"); 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-samples/youtube-spring-boot-sample/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | driverlist=com.mysql.cj.jdbc.Driver 2 | logMessageFormat=com.p6spy.engine.spy.appender.MultiLineFormat 3 | appender=com.p6spy.engine.spy.appender.StdoutLogger 4 | -------------------------------------------------------------------------------- /spring-boot-schedulerx/schedulerx-spring-boot-autoconfigure/src/main/java/in/hocg/boot/schedulerx/autoconfiguration/properties/SchedulerXProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.schedulerx.autoconfiguration.properties; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Getter 14 | @Setter 15 | @ConfigurationProperties(SchedulerXProperties.PREFIX) 16 | public class SchedulerXProperties { 17 | public static final String PREFIX = "boot.schedulerx2"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-schedulerx/schedulerx-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.schedulerx.autoconfiguration.SchedulerXAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-sentinel/sentinel-spring-boot-autoconfigure/README.md: -------------------------------------------------------------------------------- 1 | 基于IP来源限流 2 | - https://github.com/alibaba/Sentinel/wiki/FAQ#q-%E6%80%8E%E4%B9%88%E9%92%88%E5%AF%B9%E7%89%B9%E5%AE%9A%E8%B0%83%E7%94%A8%E7%AB%AF%E9%99%90%E6%B5%81%E6%AF%94%E5%A6%82%E6%88%91%E6%83%B3%E9%92%88%E5%AF%B9%E6%9F%90%E4%B8%AA-ip-%E6%88%96%E8%80%85%E6%9D%A5%E6%BA%90%E5%BA%94%E7%94%A8%E8%BF%9B%E8%A1%8C%E9%99%90%E6%B5%81%E8%A7%84%E5%88%99%E9%87%8C%E9%9D%A2-limitapp%E6%B5%81%E6%8E%A7%E5%BA%94%E7%94%A8%E7%9A%84%E4%BD%9C%E7%94%A8 3 | - https://blog.csdn.net/lzq199528/article/details/108826613 4 | -------------------------------------------------------------------------------- /spring-boot-sentinel/sentinel-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.sentinel.autoconfiguration.SentinelAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sms/autoconfigure/core/SmsBervice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sms.autoconfigure.core; 2 | 3 | import in.hocg.boot.sms.autoconfigure.impl.aliyun.request.BatchSmsRequest; 4 | import lombok.NonNull; 5 | 6 | import javax.validation.constraints.NotNull; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * Created by hocgin on 2020/8/14 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | public interface SmsBervice { 17 | 18 | String sendBatchSms(@NotNull List items, @NonNull String templateCode); 19 | 20 | String sendSms(@NonNull String phone, @NonNull String signName, @NonNull String templateCode, Map vars); 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sms/autoconfigure/exception/SmsException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sms.autoconfigure.exception; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/14 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class SmsException extends RuntimeException { 10 | public SmsException(Throwable cause) { 11 | super(cause); 12 | } 13 | public SmsException(String message) { 14 | super(message); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sms/autoconfigure/impl/aliyun/SmsTemplate.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sms.autoconfigure.impl.aliyun; 2 | 3 | /** 4 | * Created by hocgin on 2020/10/12 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface SmsTemplate { 10 | 11 | String getSignName(); 12 | 13 | String getTemplateCode(); 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sms/autoconfigure/impl/aliyun/request/AbsRequest.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sms.autoconfigure.impl.aliyun.request; 2 | 3 | import com.aliyuncs.CommonRequest; 4 | 5 | /** 6 | * Created by hocgin on 2020/10/14 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface AbsRequest { 12 | CommonRequest build(); 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sms/autoconfigure/impl/aliyun/response/SmsResponse.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sms.autoconfigure.impl.aliyun.response; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * Created by hocgin on 2020/10/14 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @Data 12 | public class SmsResponse { 13 | private String Message; 14 | private String RequestId; 15 | private String BizId; 16 | private String Code; 17 | 18 | public boolean isSuccess() { 19 | return "OK".equalsIgnoreCase(Code); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-sms/sms-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.sms.autoconfigure.SmsAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-sso/sso-client-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sso/client/autoconfigure/core/BearerTokenAuthentication.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sso.client.autoconfigure.core; 2 | 3 | import org.springframework.security.core.Authentication; 4 | 5 | /** 6 | * Created by hocgin on 2021/1/22 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface BearerTokenAuthentication { 12 | 13 | Authentication authentication(String token); 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-sso/sso-client-spring-boot-autoconfigure/src/main/java/in/hocg/boot/sso/client/autoconfigure/core/PageConstants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.sso.client.autoconfigure.core; 2 | 3 | /** 4 | * Created by hocgin on 2021/12/30 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class PageConstants { 10 | public static final String LOGIN_URL = "https://sso.hocgin.top/login"; 11 | public static final String LOGOUT_URL = "/logout"; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-sso/sso-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.sso.client.autoconfigure.SsoClientAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-sso/sso2-client-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.sso2.client.autoconfigure.SsoClientAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-test/test-spring-boot-autoconfigure/src/main/java/in/hocg/boot/test/autoconfiguration/properties/TestProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.test.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(TestProperties.PREFIX) 14 | public class TestProperties { 15 | public static final String PREFIX = "boot.test"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-test/test-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.test.autoconfiguration.TestAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-tpl/tpl-spring-boot-autoconfigure/src/main/java/in/hocg/boot/tpl/autoconfiguration/properties/TplProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.tpl.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(TplProperties.PREFIX) 14 | public class TplProperties { 15 | public static final String PREFIX = "boot.tpl"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-tpl/tpl-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.tpl.autoconfiguration.TplAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-utils/README.md: -------------------------------------------------------------------------------- 1 | ```shell 2 | utils-annotation -> utils-base 3 | 4 | utils-base -> utils-db 5 | 6 | 7 | 8 | ``` 9 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-annotation/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-boot-utils 7 | in.hocg.boot 8 | ${revision} 9 | 10 | 4.0.0 11 | jar 12 | 13 | Utils :: Annotation 14 | utils-annotation 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-annotation/src/main/java/in/hocg/boot/utils/annotation/UseDataDictKey.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.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 | * Created by hocgin on 2021/12/12 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Target({ElementType.TYPE}) 15 | @Retention(RetentionPolicy.RUNTIME) 16 | public @interface UseDataDictKey { 17 | 18 | String value() default ""; 19 | 20 | String description() default ""; 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/ThreadLocalClear.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils; 2 | 3 | public interface ThreadLocalClear { 4 | 5 | default void clear() { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/context/security/UserPrincipal.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.context.security; 2 | 3 | import lombok.NoArgsConstructor; 4 | import lombok.RequiredArgsConstructor; 5 | 6 | import java.io.Serializable; 7 | import java.security.Principal; 8 | 9 | /** 10 | * Created by hocgin on 2022/1/8 11 | * email: hocgin@gmail.com 12 | * 13 | * @author hocgin 14 | */ 15 | 16 | @NoArgsConstructor 17 | public class UserPrincipal implements Principal, Serializable { 18 | private static final long serialVersionUID = 1L; 19 | protected String name; 20 | 21 | public UserPrincipal(String name) { 22 | this.name = name; 23 | } 24 | 25 | @Override 26 | public String getName() { 27 | return name; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/courrent/AsyncUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.courrent; 2 | 3 | import lombok.experimental.UtilityClass; 4 | 5 | /** 6 | * Created by hocgin on 2021/6/24 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | @UtilityClass 12 | public class AsyncUtils { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/enums/CodeEnum.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.enums; 2 | 3 | /** 4 | * Created by hocgin on 2020/2/16. 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface CodeEnum extends ICode { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/exception/AuthenticationExpiredException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.exception; 2 | 3 | /** 4 | * Created by hocgin on 2022/6/20 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class AuthenticationExpiredException extends RuntimeException { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/exception/ToolsException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.exception; 2 | 3 | /** 4 | * Created by hocgin on 2021/1/5 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class ToolsException extends RuntimeException { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | public ToolsException(String message) { 14 | super(message); 15 | } 16 | 17 | public ToolsException(Throwable throwable) { 18 | super(throwable); 19 | } 20 | 21 | public ToolsException(String message, Throwable throwable) { 22 | super(message, throwable); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/exception/UnAuthenticationException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.exception; 2 | 3 | /** 4 | * Created by hocgin on 2020/12/25 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class UnAuthenticationException extends RuntimeException { 10 | public UnAuthenticationException(String message) { 11 | super(message); 12 | } 13 | 14 | public UnAuthenticationException() { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/function/BiConsumerThrow.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.function; 2 | 3 | /** 4 | * Created by hocgin on 2021/6/19 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | @FunctionalInterface 10 | public interface BiConsumerThrow { 11 | 12 | void accept(T t, U u) throws Exception; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/function/ConsumerThrow.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.function; 2 | 3 | /** 4 | * Created by hocgin on 2022/4/12 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | @FunctionalInterface 10 | public interface ConsumerThrow { 11 | 12 | /** 13 | * Performs this operation on the given argument. 14 | * 15 | * @param t the input argument 16 | */ 17 | void accept(T t) throws Exception; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/function/FiveConsumerThrow.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.function; 2 | 3 | /** 4 | * Created by hocgin on 2021/8/7 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | @FunctionalInterface 10 | public interface FiveConsumerThrow { 11 | void accept(T t, U u, Z z, X x, L l) throws Exception; 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/function/SupplierThrow.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.function; 2 | 3 | /** 4 | * Created by hocgin on 2021/8/7 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | @FunctionalInterface 10 | public interface SupplierThrow { 11 | T get() throws Exception; 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/function/ThreeConsumerThrow.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.function; 2 | 3 | /** 4 | * Created by hocgin on 2021/8/7 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | @FunctionalInterface 10 | public interface ThreeConsumerThrow { 11 | void accept(T t, U u, Z z) throws Exception; 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/lambda/SFunction.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.lambda; 2 | 3 | import java.io.Serializable; 4 | import java.util.function.Function; 5 | 6 | /** 7 | * Created by hocgin on 2020/4/10. 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @FunctionalInterface 13 | public interface SFunction extends Function, Serializable { 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/lambda/map/StringMap.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.lambda.map; 2 | 3 | import java.util.HashMap; 4 | 5 | /** 6 | * Created by hocgin on 2020/6/7. 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class StringMap extends HashMap 12 | implements LambdaMap { 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/struct/KeyValue.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.struct; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by hocgin on 2020/2/25. 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Data 15 | @Accessors(chain = true) 16 | public class KeyValue implements Serializable { 17 | private Serializable key; 18 | private Object value; 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/struct/LabelValue.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.struct; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by hocgin on 2020/2/25. 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Data 15 | @Accessors(chain = true) 16 | public class LabelValue implements Serializable { 17 | private Serializable value; 18 | private Object label; 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/struct/result/ResultCode.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.struct.result; 2 | 3 | import lombok.Getter; 4 | import lombok.RequiredArgsConstructor; 5 | 6 | /** 7 | * Created by hocgin on 2018/12/12. 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Getter 13 | @RequiredArgsConstructor 14 | public enum ResultCode { 15 | SUCCESS(200, "ok"), 16 | PARAMS_ERROR(501, "参数校验失败"), 17 | SERVICE_ERROR(502, "系统繁忙,请稍后"), 18 | AUTHENTICATION_ERROR(503, "拒绝访问"), 19 | ACCESS_DENIED_ERROR(504, "无权访问"), 20 | ERROR(500, "error"); 21 | private final Integer code; 22 | private final String message; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/utils/DateUtils.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.utils.utils; 2 | 3 | import lombok.experimental.UtilityClass; 4 | 5 | import java.time.LocalDateTime; 6 | import java.time.ZoneOffset; 7 | import java.util.Date; 8 | import java.util.Objects; 9 | 10 | /** 11 | * Created by hocgin on 2022/1/2 12 | * email: hocgin@gmail.com 13 | * 14 | * @author hocgin 15 | */ 16 | @UtilityClass 17 | public class DateUtils { 18 | 19 | public Date toDate(LocalDateTime localDateTime) { 20 | if (Objects.isNull(localDateTime)) { 21 | return null; 22 | } 23 | return Date.from(localDateTime.atZone(ZoneOffset.systemDefault()).toInstant()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-validation/validation-core/src/main/java/in/hocg/boot/validation/group/Insert.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.validation.group; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/19 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface Insert { 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-validation/validation-core/src/main/java/in/hocg/boot/validation/group/Update.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.validation.group; 2 | 3 | /** 4 | * Created by hocgin on 2020/8/19 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public interface Update { 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-validation/validation-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.validation.autoconfigure.ValidationAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/WebEnvironmentPostProcessor.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.autoconfiguration; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.env.EnvironmentPostProcessor; 5 | import org.springframework.core.env.ConfigurableEnvironment; 6 | 7 | /** 8 | * Created by hocgin on 2021/5/20 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | public class WebEnvironmentPostProcessor implements EnvironmentPostProcessor { 14 | @Override 15 | public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { 16 | application.setAllowBeanDefinitionOverriding(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/aspect/IgnoreTenant.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.autoconfiguration.aspect; 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 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ElementType.METHOD, ElementType.TYPE}) 10 | public @interface IgnoreTenant { 11 | 12 | /** 13 | * true为不做租户隔离 false为做租户隔离 14 | * 15 | * @return 16 | */ 17 | boolean ignore() default true; 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/event/PreExitCodeEvent.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.autoconfiguration.event; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | 5 | /** 6 | * Created by hocgin on 2024/08/15 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class PreExitCodeEvent extends ApplicationEvent { 12 | public PreExitCodeEvent(Object source) { 13 | super(source); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/webflux/SpringWebFluxContext.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.autoconfiguration.webflux; 2 | 3 | 4 | import in.hocg.boot.web.autoconfiguration.SpringContext; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/18 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public class SpringWebFluxContext extends SpringContext { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/java/in/hocg/boot/web/autoconfiguration/webflux/WebFluxExceptionAdvice.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.web.autoconfiguration.webflux; 2 | 3 | import in.hocg.boot.web.autoconfiguration.advice.DefaultExceptionAdvice; 4 | import lombok.extern.slf4j.Slf4j; 5 | import org.springframework.web.bind.annotation.RestControllerAdvice; 6 | 7 | /** 8 | * Created by hocgin on 2020/8/15 9 | * email: hocgin@gmail.com 10 | * 11 | * @author hocgin 12 | */ 13 | @Slf4j 14 | @RestControllerAdvice 15 | public class WebFluxExceptionAdvice extends DefaultExceptionAdvice { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-web/web-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.web.autoconfiguration.WebAutoConfiguration 3 | org.springframework.boot.env.EnvironmentPostProcessor=\ 4 | in.hocg.boot.web.autoconfiguration.WebEnvironmentPostProcessor 5 | org.springframework.context.ApplicationListener=\ 6 | in.hocg.boot.web.autoconfiguration.shutdown.ShutdownListener 7 | -------------------------------------------------------------------------------- /spring-boot-webmagic/README.md: -------------------------------------------------------------------------------- 1 | ## Webmagic 2 | > https://webmagic.io/docs/zh/ 3 | 4 | ### Page 5 | .addTargetRequest() // 继续请求 6 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/java/in/hocg/boot/webmagic/autoconfiguration/core/AbsPageProcessor.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.webmagic.autoconfiguration.core; 2 | 3 | import us.codecraft.webmagic.Site; 4 | import us.codecraft.webmagic.processor.PageProcessor; 5 | 6 | /** 7 | * Created by hocgin on 2021/5/22 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public abstract class AbsPageProcessor implements PageProcessor { 13 | private final Site site = Site.me().setRetryTimes(3).setSleepTime(800).setTimeOut(10000); 14 | 15 | @Override 16 | public Site getSite() { 17 | return site; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/java/in/hocg/boot/webmagic/autoconfiguration/listener/event/WebmagicEvent.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.webmagic.autoconfiguration.listener.event; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.experimental.Accessors; 6 | import org.springframework.context.ApplicationEvent; 7 | 8 | /** 9 | * Created by hocgin on 2022/6/16 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Getter 15 | @Setter 16 | @Accessors(chain = true) 17 | public class WebmagicEvent extends ApplicationEvent { 18 | private final String url; 19 | 20 | public WebmagicEvent(String url, Object source) { 21 | super(source); 22 | this.url = url; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/java/in/hocg/boot/webmagic/autoconfiguration/processor/google/chrome/ChromeWebstoreDetailPageProcessor.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.webmagic.autoconfiguration.processor.google.chrome; 2 | 3 | import in.hocg.boot.webmagic.autoconfiguration.core.AbsPageProcessor; 4 | import us.codecraft.webmagic.Page; 5 | 6 | /** 7 | * Created by hocgin on 2022/6/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | public class ChromeWebstoreDetailPageProcessor extends AbsPageProcessor { 13 | 14 | @Override 15 | public void process(Page page) { 16 | 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/java/in/hocg/boot/webmagic/autoconfiguration/processor/google/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by hocgin on 2022/6/15 3 | * email: hocgin@gmail.com 4 | * 5 | * @author hocgin 6 | */ 7 | package in.hocg.boot.webmagic.autoconfiguration.processor.google; 8 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/java/in/hocg/boot/webmagic/autoconfiguration/properties/WebmagicProperties.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.webmagic.autoconfiguration.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | * Created by hocgin on 2020/8/15 8 | * email: hocgin@gmail.com 9 | * 10 | * @author hocgin 11 | */ 12 | @Data 13 | @ConfigurationProperties(WebmagicProperties.PREFIX) 14 | public class WebmagicProperties { 15 | public static final String PREFIX = "boot.webmagic"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-webmagic/webmagic-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.webmagic.autoconfiguration.WebmagicAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-ws/ws-spring-boot-autoconfigure/src/main/java/in/hocg/boot/ws/autoconfiguration/core/constant/StringConstants.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.autoconfiguration.core.constant; 2 | 3 | import in.hocg.boot.ws.autoconfiguration.core.MessageHelper; 4 | 5 | /** 6 | * Created by hocgin on 2022/1/8 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public class StringConstants { 12 | public static final String PATH_SEPARATOR = "/"; 13 | public static final String ERROR_DEST = MessageHelper.PREFIX_USER + "/errors"; 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-ws/ws-spring-boot-autoconfigure/src/main/java/in/hocg/boot/ws/autoconfiguration/core/service/SocketUserService.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.ws.autoconfiguration.core.service; 2 | 3 | import java.security.Principal; 4 | 5 | /** 6 | * Created by hocgin on 2022/1/4 7 | * email: hocgin@gmail.com 8 | * 9 | * @author hocgin 10 | */ 11 | public interface SocketUserService { 12 | 13 | /** 14 | * 登录 15 | * 16 | * @param ticket 17 | * @return 18 | */ 19 | Principal loadUserByTicket(String ticket); 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-ws/ws-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.ws.autoconfiguration.WebSocketAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-wxcp/wxcp-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.wxcp.autoconfiguration.WxCpAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-wxma/wxma-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.wxma.autoconfiguration.WxMaAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-wxmp/wxmp-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.wxmp.autoconfiguration.WxMpAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-xxljob/xxljob-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.xxljob.autoconfigure.XxlJobAutoConfiguration 3 | -------------------------------------------------------------------------------- /spring-boot-youtube/youtube-spring-boot-autoconfigure/src/main/java/in/hocg/boot/youtube/autoconfiguration/core/datastore/DataCredential.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.youtube.autoconfiguration.core.datastore; 2 | 3 | import lombok.Data; 4 | import lombok.experimental.Accessors; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * Created by hocgin on 2021/6/16 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Data 15 | @Accessors(chain = true) 16 | public class DataCredential implements Serializable { 17 | /** 18 | * 访问token 19 | */ 20 | private String accessToken; 21 | /** 22 | * 过期时间 ms 23 | */ 24 | private Long expirationTimeMilliseconds; 25 | /** 26 | * 刷新token 27 | */ 28 | private String refreshToken; 29 | } 30 | -------------------------------------------------------------------------------- /spring-boot-youtube/youtube-spring-boot-autoconfigure/src/main/java/in/hocg/boot/youtube/autoconfiguration/exception/TokenUnusedException.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.youtube.autoconfiguration.exception; 2 | 3 | /** 4 | * Created by hocgin on 2022/3/29 5 | * email: hocgin@gmail.com 6 | * 7 | * @author hocgin 8 | */ 9 | public class TokenUnusedException extends RuntimeException { 10 | public TokenUnusedException() { 11 | this("Token 不可用"); 12 | } 13 | 14 | public TokenUnusedException(String message) { 15 | super(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-youtube/youtube-spring-boot-autoconfigure/src/main/java/in/hocg/boot/youtube/autoconfiguration/utils/data/CredentialChannel.java: -------------------------------------------------------------------------------- 1 | package in.hocg.boot.youtube.autoconfiguration.utils.data; 2 | 3 | import com.google.api.client.auth.oauth2.Credential; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.Data; 6 | import lombok.experimental.Accessors; 7 | 8 | /** 9 | * Created by hocgin on 2022/3/30 10 | * email: hocgin@gmail.com 11 | * 12 | * @author hocgin 13 | */ 14 | @Data 15 | @Accessors(chain = true) 16 | public class CredentialChannel { 17 | @ApiModelProperty("用户标记") 18 | private String userId; 19 | @ApiModelProperty("频道信息") 20 | private YouTubeChannel channel; 21 | @ApiModelProperty("凭据") 22 | private Credential credential; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-youtube/youtube-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 2 | in.hocg.boot.youtube.autoconfiguration.YoutubeAutoConfiguration 3 | --------------------------------------------------------------------------------