├── jeesuite-common
├── README.md
├── .gitignore
├── src
│ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── jeesuite
│ │ │ └── common
│ │ │ ├── packagescan
│ │ │ ├── SimpleWildcardPatternFactory.java
│ │ │ ├── PatternFactory.java
│ │ │ ├── CompiledPattern.java
│ │ │ └── SimpleWildcardPattern.java
│ │ │ ├── serializer
│ │ │ ├── Serializer.java
│ │ │ ├── SerializeUtils.java
│ │ │ ├── KryoSerializer.java
│ │ │ ├── JavaSerializer.java
│ │ │ └── FSTSerializer.java
│ │ │ ├── model
│ │ │ └── SelectOption.java
│ │ │ ├── JeesuiteBaseException.java
│ │ │ ├── util
│ │ │ ├── NodeNameHolder.java
│ │ │ ├── SimpleCryptUtils.java
│ │ │ ├── WhoUseMeReporter.java
│ │ │ ├── AssertUtil.java
│ │ │ ├── HashUtils.java
│ │ │ └── StringCharsetUtils.java
│ │ │ ├── json
│ │ │ ├── serializer
│ │ │ │ ├── DateTimeConvertSerializer.java
│ │ │ │ └── DateConvertSerializer.java
│ │ │ └── deserializer
│ │ │ │ ├── DateTimeConvertDeserializer.java
│ │ │ │ └── DateConvertDeserializer.java
│ │ │ ├── http
│ │ │ └── HttpResponseEntity.java
│ │ │ └── crypt
│ │ │ ├── AES.java
│ │ │ └── SHA1.java
│ └── test
│ │ └── java
│ │ └── test
│ │ ├── BeanUtilTest.java
│ │ ├── serlalize
│ │ └── SerliazePerfTest.java
│ │ └── BaseUser.java
└── jeesuite-common.iml
├── jeesuite-common2
├── README.md
├── .gitignore
└── src
│ ├── test
│ ├── java
│ │ └── test
│ │ │ ├── lock
│ │ │ ├── ShareResource.java
│ │ │ ├── ZkDistributeLockTest.java
│ │ │ └── RedisDistributeLockTest.java
│ │ │ ├── sequence
│ │ │ └── IdGenerateTest.java
│ │ │ └── excel
│ │ │ ├── ExcelTest.java
│ │ │ └── SimpleSalaryInfo.java
│ └── resources
│ │ ├── config.properties
│ │ └── log4j2.xml
│ └── main
│ └── java
│ └── com
│ └── jeesuite
│ └── common2
│ ├── sequence
│ └── IdGenerator.java
│ ├── excel
│ ├── ResultProcessor.java
│ ├── ExcelOperBaseException.java
│ ├── annotation
│ │ └── TitleCell.java
│ └── helper
│ │ └── ExcelValidator.java
│ └── lock
│ ├── LockCaller.java
│ ├── LockException.java
│ └── DistributeLockTemplate.java
├── jeesuite-rest
├── .gitignore
├── .settings
│ ├── org.eclipse.wst.validation.prefs
│ ├── org.eclipse.m2e.core.prefs
│ ├── org.eclipse.wst.common.project.facet.core.xml
│ ├── org.eclipse.core.resources.prefs
│ ├── org.eclipse.wst.common.component
│ └── org.eclipse.jdt.core.prefs
└── src
│ └── main
│ └── java
│ └── com
│ └── jeesuite
│ └── rest
│ ├── response
│ ├── HttpCodeType.java
│ └── ResponseCode.java
│ ├── RequestHeader.java
│ ├── filter
│ ├── annotation
│ │ ├── AuthIgnore.java
│ │ ├── LogIgnore.java
│ │ └── ResponseFormat.java
│ ├── FilterHandler.java
│ ├── RequestHeaderHolder.java
│ ├── FilterConfig.java
│ ├── DefaultFilterDynamicFeature.java
│ └── handler
│ │ ├── CorsHandler.java
│ │ └── ResponseWrapperHandler.java
│ ├── excetion
│ └── ExcetionWrapper.java
│ ├── CustomConfig.java
│ ├── resolver
│ └── ObjectMapperResolver.java
│ └── BaseApplicaionConfig.java
├── jeesuite-cache
├── .gitignore
├── src
│ ├── test
│ │ ├── resources
│ │ │ ├── redis.properties
│ │ │ ├── log4j2.xml
│ │ │ └── ehcache.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── jeesuite
│ │ │ └── test
│ │ │ └── cache
│ │ │ └── SentinelFailOverTest.java
│ └── main
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── cache
│ │ ├── redis
│ │ └── JedisProvider.java
│ │ ├── local
│ │ └── Level1CacheProvider.java
│ │ ├── CacheExpires.java
│ │ └── command
│ │ └── RedisBinaryCollection.java
├── jeesuite-cache.iml
└── pom.xml
├── jeesuite-kafka
├── .gitignore
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── kafka
│ │ ├── consumer
│ │ ├── TopicConsumer.java
│ │ └── hanlder
│ │ │ ├── RetryErrorMessageHandler.java
│ │ │ └── OffsetLogHanlder.java
│ │ ├── monitor
│ │ └── model
│ │ │ ├── ConsumerNodeInfo.java
│ │ │ └── BrokerInfo.java
│ │ ├── serializer
│ │ ├── ZKStringSerializer.java
│ │ ├── JdkMessageDeserializer.java
│ │ ├── KyroMessageDeserializer.java
│ │ ├── MessageDecoder.java
│ │ ├── JdkMessageSerializer.java
│ │ ├── KyroMessageSerializer.java
│ │ └── JsonMessageDeserializer.java
│ │ ├── producer
│ │ ├── handler
│ │ │ └── ProducerEventHandler.java
│ │ ├── TopicProducer.java
│ │ └── ConsumerAckWatcher.java
│ │ ├── annotation
│ │ └── ConsumerHandler.java
│ │ ├── handler
│ │ └── MessageHandler.java
│ │ └── KafkaConst.java
│ └── test
│ ├── resources
│ ├── kafka.properties
│ ├── log4j2.xml
│ └── test-kafka-producer.xml
│ └── java
│ ├── com
│ └── jeesuite
│ │ └── test
│ │ ├── MysqlOffsetLogHanlder.java
│ │ ├── Demo2MessageHandler.java
│ │ ├── ConsumerServer2.java
│ │ ├── DemoMessageHandler.java
│ │ ├── RunClass.java
│ │ ├── ZkClientTest.java
│ │ ├── ConsumerServer.java
│ │ └── SimpleComsumer.java
│ └── test
│ └── StandardThreadExecutorTest.java
├── jeesuite-log
├── .gitignore
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── log
│ │ ├── Log.java
│ │ ├── log4j2
│ │ └── LogConfigLookup.java
│ │ └── LogFactory.java
└── pom.xml
├── jeesuite-mybatis
├── .gitignore
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── jeesuite
│ │ │ │ └── mybatis
│ │ │ │ ├── datasource
│ │ │ │ ├── DataSourceType.java
│ │ │ │ └── builder
│ │ │ │ │ └── HikariCPDataSourceBuilder.java
│ │ │ │ ├── package-info.java
│ │ │ │ ├── exception
│ │ │ │ └── MybatisHanlerInitException.java
│ │ │ │ ├── crud
│ │ │ │ ├── CrudMethodDefine.java
│ │ │ │ ├── helper
│ │ │ │ │ ├── TableMapper.java
│ │ │ │ │ └── ColumnMapper.java
│ │ │ │ ├── name
│ │ │ │ │ ├── DefaultCrudMethodDefine.java
│ │ │ │ │ └── Mapper3CrudMethodDefine.java
│ │ │ │ └── builder
│ │ │ │ │ └── SqlTemplate.java
│ │ │ │ ├── core
│ │ │ │ ├── BaseEntity.java
│ │ │ │ ├── InterceptorHandler.java
│ │ │ │ └── BaseMapper.java
│ │ │ │ ├── plugin
│ │ │ │ ├── shard
│ │ │ │ │ ├── annotation
│ │ │ │ │ │ └── DbShardKey.java
│ │ │ │ │ ├── ShardStrategy.java
│ │ │ │ │ └── TableRouteHandler.java
│ │ │ │ ├── pagination
│ │ │ │ │ ├── annotation
│ │ │ │ │ │ └── Pageable.java
│ │ │ │ │ ├── PageParams.java
│ │ │ │ │ ├── Page.java
│ │ │ │ │ └── PageExecutor.java
│ │ │ │ ├── cache
│ │ │ │ │ ├── CacheProvider.java
│ │ │ │ │ ├── provider
│ │ │ │ │ │ └── AbstractCacheProvider.java
│ │ │ │ │ └── annotation
│ │ │ │ │ │ └── Cache.java
│ │ │ │ └── rwseparate
│ │ │ │ │ └── UseMaster.java
│ │ │ │ ├── kit
│ │ │ │ └── SqlParseUtils.java
│ │ │ │ └── spring
│ │ │ │ └── MybatisPluginBaseSpringInterceptor.java
│ │ └── resources
│ │ │ └── mybatis-configuration.xml
│ └── test
│ │ ├── resources
│ │ ├── redis.properties
│ │ ├── log4j2.xml
│ │ └── mysql.properties
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── mybatis
│ │ └── test
│ │ └── mapper
│ │ └── SnsAccounyBindingEntityMapper.java
└── jeesuite-mybatis.iml
├── jeesuite-spring
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── jeesuite
│ └── spring
│ ├── ApplicationStartedListener.java
│ ├── InstanceFactoryConfiguration.java
│ └── web
│ └── ContextLoaderListener.java
├── jeesuite-filesystem
├── .gitignore
├── src
│ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── jeesuite
│ │ │ └── filesystem
│ │ │ ├── provider
│ │ │ ├── qiniu
│ │ │ │ └── UploadResult.java
│ │ │ ├── FSOperErrorException.java
│ │ │ └── AbstractProvider.java
│ │ │ ├── utils
│ │ │ ├── HttpDownloader.java
│ │ │ ├── FilePathHelper.java
│ │ │ └── MimeTypeFileExtensionConvert.java
│ │ │ └── FSProvider.java
│ └── test
│ │ ├── java
│ │ └── test
│ │ │ └── FileSystemClientTest.java
│ │ └── resources
│ │ ├── log4j2.xml
│ │ └── fs.properties
└── jeesuite-filesystem.iml
├── jeesuite-scheduler
├── .gitignore
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── scheduler
│ │ ├── JobLogPersistHandler.java
│ │ ├── ConfigPersistHandler.java
│ │ ├── annotation
│ │ └── ScheduleConf.java
│ │ ├── model
│ │ └── JobGroupInfo.java
│ │ ├── JobRegistry.java
│ │ └── monitor
│ │ └── MonitorCommond.java
│ └── test
│ ├── resources
│ └── log4j2.xml
│ └── java
│ └── com
│ └── jeesuite
│ └── test
│ └── sch
│ ├── DbConfigPersistHandler.java
│ ├── DemoTask2.java
│ ├── JobInterceptor.java
│ ├── DemoParallelTask.java
│ ├── DemoTask.java
│ ├── TaskServerNode1.java
│ └── TaskServerNode2.java
├── jeesuite-springboot-starter
├── .gitignore
└── src
│ └── main
│ ├── resources
│ └── META-INF
│ │ ├── spring.provides
│ │ └── spring.factories
│ └── java
│ └── com
│ └── jeesuite
│ └── springboot
│ └── starter
│ ├── cache
│ └── EnableJeesuiteCache.java
│ ├── scheduler
│ ├── EnableJeesuiteSchedule.java
│ └── SchedulerProperties.java
│ ├── kafka
│ ├── EnableJeesuiteKafkaConsumer.java
│ ├── EnableJeesuiteKafkaProducer.java
│ └── DelegateKafkaProducerConfiguration.java
│ └── mybatis
│ ├── EnableJeesuiteMybatis.java
│ └── JeesuiteDataSourceConfiguration.java
├── jeesuite-security
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── security
│ │ ├── Cache.java
│ │ ├── exception
│ │ ├── UserNotFoundException.java
│ │ └── UserPasswordWrongException.java
│ │ ├── model
│ │ ├── AccessToken.java
│ │ └── BaseUserInfo.java
│ │ ├── SecurityTicketManager.java
│ │ ├── util
│ │ └── SecurityCryptUtils.java
│ │ └── cache
│ │ └── LocalCache.java
└── pom.xml
├── jeesuite-springweb
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── springweb
│ │ ├── annotation
│ │ └── ResponsePolicy.java
│ │ ├── exception
│ │ ├── UnauthorizedException.java
│ │ └── ForbiddenAccessException.java
│ │ ├── model
│ │ ├── WrapperResponseEntity.java
│ │ └── WrapperResponse.java
│ │ ├── client
│ │ ├── RestTemplateAutoHeaderInterceptor.java
│ │ └── SimpleRestTemplateBuilder.java
│ │ ├── WebConstants.java
│ │ ├── base
│ │ └── CustomServletInputStreamWrapper.java
│ │ └── RequestContextHelper.java
└── pom.xml
├── jeesuite-search
└── src
│ └── main
│ └── java
│ └── test
│ └── User.java
├── jeesuite-event
├── pom.xml
├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── jeesuite
│ │ └── event
│ │ ├── EventPublisher.java
│ │ └── EventSubscriber.java
└── jeesuite-event.iml
└── CHANGE-LOG.md
/jeesuite-common/README.md:
--------------------------------------------------------------------------------
1 | 待续
--------------------------------------------------------------------------------
/jeesuite-common2/README.md:
--------------------------------------------------------------------------------
1 | 待续
--------------------------------------------------------------------------------
/jeesuite-rest/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 |
--------------------------------------------------------------------------------
/jeesuite-cache/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-common/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-common2/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-kafka/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-log/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-spring/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-filesystem/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-scheduler/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.wst.validation.prefs:
--------------------------------------------------------------------------------
1 | disabled=06target
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/jeesuite-springboot-starter/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | .DS_Store
3 | /.settings/
4 | .project
5 | .classpath
6 |
--------------------------------------------------------------------------------
/jeesuite-springboot-starter/src/main/resources/META-INF/spring.provides:
--------------------------------------------------------------------------------
1 | provides: mybatis-spring-boot-autoconfigure,mybatis,mybatis-spring
2 |
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/datasource/DataSourceType.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.mybatis.datasource;
2 |
3 | public enum DataSourceType {
4 |
5 | Druid,HikariCP
6 | }
7 |
--------------------------------------------------------------------------------
/jeesuite-kafka/src/main/java/com/jeesuite/kafka/consumer/TopicConsumer.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.kafka.consumer;
2 |
3 | public interface TopicConsumer {
4 |
5 | void start() ;
6 |
7 | void close();
8 | }
9 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/test/java/test/lock/ShareResource.java:
--------------------------------------------------------------------------------
1 | package test.lock;
2 |
3 | public class ShareResource {
4 |
5 | static int count = 0;
6 | public static int add(){
7 | count++;
8 | return count;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | /**
5 | * @description
6 | * @author vakin
7 | * @date 2016年7月4日
8 | */
9 | package com.jeesuite.mybatis;
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/java=utf-8
3 | encoding//src/main/resources=UTF-8
4 | encoding//src/test/java=utf-8
5 | encoding//src/test/resources=UTF-8
6 | encoding/=UTF-8
7 |
--------------------------------------------------------------------------------
/jeesuite-springboot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | #org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | #com.jeesuite.springboot.starter.mybatis.JeesuiteMybatisConfiguration,\
4 | #com.jeesuite.springboot.starter.cache.DelegateCacheConfiguration
5 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/test/resources/config.properties:
--------------------------------------------------------------------------------
1 | jeesuite.lock.redis.mode=standalone
2 | jeesuite.lock.redis.servers=127.0.0.1:6379
3 | jeesuite.lock.redis.maxPoolSize=10
4 | jeesuite.lock.redis.maxPoolIdle=2
5 | jeesuite.lock.redis.minPoolIdle=1
6 | jeesuite.lock.redis.maxPoolWaitMillis=30000
7 | jeesuite.lock.redis.password=123456
--------------------------------------------------------------------------------
/jeesuite-kafka/src/main/java/com/jeesuite/kafka/monitor/model/ConsumerNodeInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.kafka.monitor.model;
5 |
6 | /**
7 | * @description
8 | * @author vakin
9 | * @date 2016年10月28日
10 | */
11 | public class ConsumerNodeInfo {
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/response/HttpCodeType.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.rest.response;
2 |
3 | public interface HttpCodeType {
4 |
5 | /**
6 | * 获取异常代码
7 | *
8 | * @return
9 | */
10 | public int getCode();
11 |
12 | /**
13 | * 获取异常信息
14 | *
15 | * @return
16 | */
17 | public String getMsg();
18 | }
19 |
--------------------------------------------------------------------------------
/jeesuite-cache/src/test/resources/redis.properties:
--------------------------------------------------------------------------------
1 | #mode(standalone,sentinel,cluster,shard)
2 | redis.mode=standalone
3 | redis.servers=127.0.0.1:7369
4 | redis.conn.timeout=3000
5 | #redis.password=123456
6 | redis.database=
7 | redis.clientName=
8 | redis.masterName=master6379
9 |
10 | #pool
11 | redis.pool.maxTotal=20
12 | redis.pool.maxIdle=5
13 | redis.pool.minIdle=1
14 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/test/resources/redis.properties:
--------------------------------------------------------------------------------
1 | #mode(standalone,sentinel,cluster,shard)
2 | redis.mode=standalone
3 | redis.servers=127.0.0.1:6379
4 | redis.conn.timeout=3000
5 | redis.password=123456
6 | redis.database=
7 | redis.clientName=
8 | redis.masterName=master6379
9 |
10 | #pool
11 | redis.pool.maxTotal=20
12 | redis.pool.maxIdle=5
13 | redis.pool.minIdle=1
14 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/main/java/com/jeesuite/common2/sequence/IdGenerator.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.common2.sequence;
5 |
6 | /**
7 | * @description
8 | * @author vakin
9 | * @date 2016年11月18日
10 | */
11 | public interface IdGenerator {
12 |
13 | public long nextId();
14 |
15 | public void close();
16 | }
17 |
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/exception/MybatisHanlerInitException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.mybatis.exception;
2 |
3 | public class MybatisHanlerInitException extends RuntimeException {
4 |
5 | private static final long serialVersionUID = 7823413453457349529L;
6 |
7 | public MybatisHanlerInitException(String message) {
8 | super(message);
9 | }
10 |
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/jeesuite-security/src/main/java/com/jeesuite/security/Cache.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.security;
2 |
3 | public interface Cache {
4 |
5 | void setString(String key,String value);
6 | String getString(String key);
7 | void setObject(String key,Object value);
8 | T getObject(String key);
9 | void remove(String key);
10 | void removeAll();
11 | boolean exists(String key);
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/jeesuite-common/src/main/java/com/jeesuite/common/packagescan/SimpleWildcardPatternFactory.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common.packagescan;
2 |
3 | /**
4 | * Compiles simple wildcard patterns
5 | */
6 | public class SimpleWildcardPatternFactory implements PatternFactory {
7 | public CompiledPattern compile(String pattern) {
8 | return new SimpleWildcardPattern(pattern);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/jeesuite-kafka/src/test/resources/kafka.properties:
--------------------------------------------------------------------------------
1 | kafka.servers=127.0.0.1:9092
2 | kafka.zkServers=127.0.0.1:2181
3 | kafka.monitor.enable=false
4 | #producer
5 | producer.sync.send=true
6 | producer.acks=1
7 | producer.retries=1
8 | producer.compression.type=gzip
9 | #consumer
10 | consumer.auto.offset.reset=smallest
11 | consumer.poll.timeout.ms=1500
12 | consumer.retries.max=3
13 | consumer.retries.period.seconds=15
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/RequestHeader.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.rest;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2016年2月25日
12 | */
13 | public class RequestHeader implements Serializable {
14 |
15 | private static final long serialVersionUID = 1L;
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/main/java/com/jeesuite/common2/excel/ResultProcessor.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.common2.excel;
5 |
6 | import java.util.List;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2017年1月18日
12 | */
13 | public interface ResultProcessor {
14 |
15 | int batchSize();
16 | void process(List datas);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/jeesuite-common/src/main/java/com/jeesuite/common/packagescan/PatternFactory.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common.packagescan;
2 |
3 | /**
4 | * Compiles wildcard patterns
5 | */
6 | public interface PatternFactory {
7 |
8 | /**
9 | * Compiles a wildcard pattern
10 | * @param pattern The original pattern
11 | * @return The compiled pattern
12 | */
13 | CompiledPattern compile(String pattern);
14 | }
15 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/filter/annotation/AuthIgnore.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.rest.filter.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.METHOD)
9 | @Retention(RetentionPolicy.RUNTIME)
10 | public @interface AuthIgnore {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/filter/annotation/LogIgnore.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.rest.filter.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.METHOD)
9 | @Retention(RetentionPolicy.RUNTIME)
10 | public @interface LogIgnore {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/excetion/ExcetionWrapper.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.rest.excetion;
5 |
6 | import com.jeesuite.rest.response.WrapperResponseEntity;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2016年12月23日
12 | */
13 | public interface ExcetionWrapper {
14 |
15 | WrapperResponseEntity toResponse(Exception e);
16 | }
17 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/main/java/com/jeesuite/common2/lock/LockCaller.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.common2.lock;
5 |
6 | /**
7 | * @description
8 | * @author vakin
9 | * @date 2016年7月22日
10 | */
11 | public interface LockCaller {
12 |
13 | /**
14 | * 持有锁的操作
15 | * @return
16 | */
17 | T onHolder();
18 |
19 | /**
20 | * 等待锁的操作
21 | * @return
22 | */
23 | T onWait();
24 | }
25 |
--------------------------------------------------------------------------------
/jeesuite-spring/src/main/java/com/jeesuite/spring/ApplicationStartedListener.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.spring;
2 |
3 | import org.springframework.context.ApplicationContext;
4 |
5 | /**
6 | * 应用启动完成监听器接口
7 | * @description
8 | * @author vakin
9 | * @date 2017年11月20日
10 | */
11 | public interface ApplicationStartedListener {
12 |
13 | void onApplicationStarted(ApplicationContext applicationContext);
14 | }
15 |
--------------------------------------------------------------------------------
/jeesuite-springweb/src/main/java/com/jeesuite/springweb/annotation/ResponsePolicy.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.springweb.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.METHOD})
9 | @Retention(RetentionPolicy.RUNTIME)
10 | public @interface ResponsePolicy {
11 | String[] value();
12 | }
13 |
--------------------------------------------------------------------------------
/jeesuite-filesystem/src/main/java/com/jeesuite/filesystem/provider/qiniu/UploadResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.filesystem.provider.qiniu;
5 |
6 | /**
7 | *
8 | * @description
9 | * @author vakin
10 | * @date 2017年1月5日
11 | */
12 | public class UploadResult {
13 | public long fsize;
14 | public String key;
15 | public String hash;
16 | public int width;
17 | public int height;
18 | }
19 |
--------------------------------------------------------------------------------
/jeesuite-security/src/main/java/com/jeesuite/security/exception/UserNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.security.exception;
2 |
3 | import com.jeesuite.common.JeesuiteBaseException;
4 |
5 | public class UserNotFoundException extends JeesuiteBaseException {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private static final String MSG = "用户不存在";
10 |
11 | public UserNotFoundException() {
12 | super(4001,MSG);
13 | }
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/main/java/com/jeesuite/common2/lock/LockException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common2.lock;
2 |
3 | import com.jeesuite.common.JeesuiteBaseException;
4 |
5 | public class LockException extends JeesuiteBaseException {
6 | private static final long serialVersionUID = 1L;
7 |
8 | public LockException(String e) {
9 | super(9999,e);
10 | }
11 |
12 | public LockException(Throwable cause) {
13 | super(9999, cause.getMessage(), cause);
14 | }
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-rest/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4 | org.eclipse.jdt.core.compiler.compliance=1.8
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
8 | org.eclipse.jdt.core.compiler.source=1.8
9 |
--------------------------------------------------------------------------------
/jeesuite-security/src/main/java/com/jeesuite/security/exception/UserPasswordWrongException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.security.exception;
2 |
3 | import com.jeesuite.common.JeesuiteBaseException;
4 |
5 | public class UserPasswordWrongException extends JeesuiteBaseException {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private static final String MSG = "密码错误";
10 |
11 | public UserPasswordWrongException() {
12 | super(4001,MSG);
13 | }
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-springweb/src/main/java/com/jeesuite/springweb/exception/UnauthorizedException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.springweb.exception;
2 |
3 | import com.jeesuite.common.JeesuiteBaseException;
4 |
5 | public class UnauthorizedException extends JeesuiteBaseException {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private static final String MSG = "401 Unauthorized";
10 |
11 | public UnauthorizedException() {
12 | super(401,MSG);
13 | }
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-springweb/src/main/java/com/jeesuite/springweb/exception/ForbiddenAccessException.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.springweb.exception;
2 |
3 | import com.jeesuite.common.JeesuiteBaseException;
4 |
5 | public class ForbiddenAccessException extends JeesuiteBaseException {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private static final String MSG = "403 forbidden";
10 |
11 | public ForbiddenAccessException() {
12 | super(403,MSG);
13 | }
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-kafka/src/main/java/com/jeesuite/kafka/consumer/hanlder/RetryErrorMessageHandler.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.kafka.consumer.hanlder;
2 |
3 | import com.jeesuite.kafka.message.DefaultMessage;
4 |
5 | /**
6 | * 消费错误消息处理接口(自动重试后失败则触发)
7 | * @description
8 | * @author vakin
9 | * @date 2017年11月27日
10 | */
11 | public interface RetryErrorMessageHandler {
12 |
13 | public void process(String group,String topic,DefaultMessage message);
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/crud/CrudMethodDefine.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.mybatis.crud;
5 |
6 | /**
7 | * 定义按主键增删改查的方法名
8 | * @description
9 | * @author vakin
10 | * @date 2016年9月16日
11 | */
12 | public interface CrudMethodDefine {
13 |
14 | String selectName();
15 |
16 | String insertName();
17 |
18 | String updateName();
19 |
20 | String deleteName();
21 |
22 | String selectAllName();
23 | }
24 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/crud/helper/TableMapper.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.mybatis.crud.helper;
2 |
3 | /**
4 | * @description
5 | * @author vakin
6 | * @date 2015年12月2日
7 | * @Copyright (c) 2015, jwww
8 | */
9 | public class TableMapper {
10 |
11 | // 表名
12 | private String name;
13 |
14 | public String getName() {
15 | return name;
16 | }
17 |
18 | public void setName(String name) {
19 | this.name = name;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/jeesuite-common/src/main/java/com/jeesuite/common/serializer/Serializer.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common.serializer;
2 |
3 | import java.io.IOException;
4 |
5 | /**
6 | * 对象序列化接口
7 | * @description
8 | * @author vakin
9 | * @date 2016年12月28日
10 | */
11 | public interface Serializer {
12 |
13 | public String name();
14 |
15 | public byte[] serialize(Object obj) throws IOException ;
16 |
17 | public Object deserialize(byte[] bytes) throws IOException ;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/jeesuite-common/src/main/java/com/jeesuite/common/packagescan/CompiledPattern.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common.packagescan;
2 |
3 | /**
4 | * A wildcard pattern that has been compiled
5 | */
6 | public interface CompiledPattern {
7 |
8 | /**
9 | * @return The original pattern
10 | */
11 | String getOriginal();
12 |
13 | /**
14 | * Tries to match a value
15 | * @param value The value to match
16 | * @return True if fully matched
17 | */
18 | boolean matches(String value);
19 | }
20 |
--------------------------------------------------------------------------------
/jeesuite-common/src/test/java/test/BeanUtilTest.java:
--------------------------------------------------------------------------------
1 | package test;
2 |
3 | import com.jeesuite.common.json.JsonUtils;
4 | import com.jeesuite.common.util.BeanUtils;
5 |
6 | public class BeanUtilTest {
7 |
8 | public static void main(String[] args) {
9 | User user = new User();
10 | user.setName("小伙子");
11 | user.setMobile("13800138000");
12 | user.setFather(new User(1000, "你爹"));
13 |
14 | BaseUser user2 = BeanUtils.copy(user, BaseUser.class);
15 | System.out.println(JsonUtils.toPrettyJson(user2));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/core/BaseEntity.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.mybatis.core;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2015年12月7日
12 | * @Copyright (c) 2015, jwww
13 | */
14 | public abstract class BaseEntity implements Serializable{
15 |
16 |
17 | private static final long serialVersionUID = -607752621362896528L;
18 |
19 | public abstract Serializable getId();
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/jeesuite-filesystem/src/test/java/test/FileSystemClientTest.java:
--------------------------------------------------------------------------------
1 | package test;
2 |
3 | import java.io.File;
4 | import java.util.Map;
5 |
6 | import com.jeesuite.filesystem.FileSystemClient;
7 | import com.jeesuite.filesystem.UploadTokenParam;
8 |
9 | public class FileSystemClientTest {
10 |
11 | public static void main(String[] args) {
12 | UploadTokenParam param = new UploadTokenParam();
13 | Map token = FileSystemClient.getClient("xxxx2").createUploadToken(param);
14 |
15 | System.out.println(token);
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/CustomConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.rest;
5 |
6 | import com.jeesuite.rest.excetion.ExcetionWrapper;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2016年12月23日
12 | */
13 | public interface CustomConfig {
14 |
15 | /**
16 | * 对异常包装返回给前端
17 | * @return
18 | */
19 | ExcetionWrapper createExcetionWrapper();
20 |
21 | /**
22 | * 返回要扫描的包(rest接口)
23 | * @return
24 | */
25 | String packages();
26 | }
27 |
--------------------------------------------------------------------------------
/jeesuite-cache/src/main/java/com/jeesuite/cache/redis/JedisProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.cache.redis;
5 |
6 | import org.springframework.beans.factory.DisposableBean;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2015年04月23日
12 | */
13 | public interface JedisProvider extends DisposableBean{
14 |
15 | public S get();
16 |
17 | public B getBinary();
18 |
19 | public void release();
20 |
21 | public String mode();
22 |
23 | public String groupName();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/jeesuite-scheduler/src/main/java/com/jeesuite/scheduler/JobLogPersistHandler.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.scheduler;
5 |
6 | import java.util.Date;
7 |
8 | import com.jeesuite.scheduler.model.JobConfig;
9 |
10 | /**
11 | * 任务运行日志持久化接口
12 | * @description
13 | * @author vakin
14 | * @date 2016年12月30日
15 | */
16 | public interface JobLogPersistHandler {
17 |
18 | public void onSucess(JobConfig conf, Date nextFireTime);
19 |
20 | public void onError(JobConfig conf, Date nextFireTime,Exception e);
21 | }
22 |
--------------------------------------------------------------------------------
/jeesuite-springweb/src/main/java/com/jeesuite/springweb/model/WrapperResponseEntity.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.springweb.model;
2 |
3 | public class WrapperResponseEntity extends WrapperResponse
--------------------------------------------------------------------------------
/jeesuite-cache/src/test/resources/ehcache.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
20 |
21 |
22 |
31 |
32 |
--------------------------------------------------------------------------------
/jeesuite-event/jeesuite-event.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/jeesuite-common2/src/test/java/test/lock/RedisDistributeLockTest.java:
--------------------------------------------------------------------------------
1 | package test.lock;
2 |
3 | import java.util.concurrent.CountDownLatch;
4 | import java.util.concurrent.ExecutorService;
5 | import java.util.concurrent.Executors;
6 | import java.util.concurrent.locks.Lock;
7 |
8 | import org.apache.commons.lang3.RandomUtils;
9 |
10 | import com.jeesuite.common2.lock.redis.RedisDistributeLock;
11 |
12 | public class RedisDistributeLockTest {
13 |
14 | private static CountDownLatch latch;
15 |
16 | public static void main(String[] args) throws Exception {
17 |
18 |
19 | int taskcount = 21;
20 | latch = new CountDownLatch(taskcount);
21 | ExecutorService threadPool = Executors.newFixedThreadPool(taskcount);
22 |
23 | for (int i = 0; i < taskcount; i++) {
24 | threadPool.submit(new LockWorker("worker-"+i));
25 | }
26 |
27 | latch.await();
28 | threadPool.shutdown();
29 | }
30 |
31 | static class LockWorker implements Runnable{
32 |
33 | private String id;
34 |
35 | public LockWorker(String id) {
36 | super();
37 | this.id = id;
38 | }
39 |
40 | @Override
41 | public void run() {
42 | Lock lock = new RedisDistributeLock("test",60);
43 | try {
44 | lock.lock();
45 | } catch (Exception e) {
46 | latch.countDown();
47 | System.out.println("LockWorker[" + id + "] get lock error->"+e.getMessage());
48 | return;
49 | }
50 | System.out.println("LockWorker[" + id + "] get lock,doing-----" + ShareResource.add());
51 | try {Thread.sleep(RandomUtils.nextLong(100, 1000));} catch (Exception e) {}
52 | lock.unlock();
53 | latch.countDown();
54 | System.out.println("LockWorker[" + id + "] release lock,done");
55 | }
56 |
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/jeesuite-springweb/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.jeesuite
6 | jeesuite-libs
7 | 1.3.4-SNAPSHOT
8 |
9 | jeesuite-springweb
10 |
11 |
12 |
13 | com.jeesuite
14 | jeesuite-common
15 | ${project.parent.version}
16 | true
17 |
18 |
19 | org.springframework
20 | spring-web
21 | ${spring.version}
22 |
23 |
24 |
25 | org.springframework
26 | spring-webmvc
27 | ${spring.version}
28 |
29 |
30 |
31 | javax.servlet
32 | javax.servlet-api
33 | 3.1.0
34 | provided
35 |
36 |
37 |
38 | com.google.guava
39 | guava
40 | 19.0
41 |
42 |
43 |
44 |
45 |
46 |
47 | org.apache.maven.plugins
48 | maven-deploy-plugin
49 |
50 | false
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/jeesuite-springboot-starter/src/main/java/com/jeesuite/springboot/starter/kafka/DelegateKafkaProducerConfiguration.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.springboot.starter.kafka;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
8 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
9 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
10 | import org.springframework.context.annotation.Bean;
11 | import org.springframework.context.annotation.Configuration;
12 |
13 | import com.jeesuite.kafka.spring.TopicProducerSpringProvider;
14 |
15 | /**
16 | * @description
17 | * @author vakin
18 | * @date 2017年3月28日
19 | */
20 | @Configuration
21 | @EnableConfigurationProperties(KafkaProducerProperties.class)
22 | @ConditionalOnClass(TopicProducerSpringProvider.class)
23 | @ConditionalOnProperty(name="kafka.bootstrap.servers")
24 | public class DelegateKafkaProducerConfiguration {
25 |
26 | @Autowired
27 | private KafkaProducerProperties producerProperties;
28 |
29 | @Bean
30 | public TopicProducerSpringProvider producerProvider() {
31 |
32 | TopicProducerSpringProvider bean = new TopicProducerSpringProvider();
33 | bean.setConfigs(producerProperties.getConfigs());
34 | bean.setDefaultAsynSend(producerProperties.isDefaultAsynSend());
35 | bean.setDelayRetries(producerProperties.getDelayRetries());
36 | bean.setProducerGroup(producerProperties.getProducerGroup());
37 | bean.setMonitorEnabled(producerProperties.isMonitorEnabled());
38 | bean.setConsumerAckEnabled(producerProperties.isConsumerAckEnabled());
39 | return bean;
40 | }
41 |
42 |
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/jeesuite-scheduler/src/main/java/com/jeesuite/scheduler/monitor/MonitorCommond.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.scheduler.monitor;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * @description
10 | * @author vakin
11 | * @date 2016年10月31日
12 | */
13 | public class MonitorCommond implements Serializable {
14 |
15 | private static final long serialVersionUID = 1L;
16 |
17 |
18 | public final static byte TYPE_EXEC = 0x01; //执行定时任务
19 | public final static byte TYPE_STATUS_MOD = 0x02;//开停状态修改
20 | public final static byte TYPE_CRON_MOD = 0x03;//执行时间策略修改
21 |
22 |
23 | private byte cmdType;
24 | private String jobGroup;
25 | private String jobName;
26 | private Object body;
27 |
28 | public MonitorCommond() {}
29 |
30 | public MonitorCommond(byte cmdType, String jobGroup, String jobName, Object body) {
31 | super();
32 | this.cmdType = cmdType;
33 | this.jobGroup = jobGroup;
34 | this.jobName = jobName;
35 | this.body = body;
36 | }
37 | public byte getCmdType() {
38 | return cmdType;
39 | }
40 | public void setCmdType(byte cmdType) {
41 | this.cmdType = cmdType;
42 | }
43 | public String getJobGroup() {
44 | return jobGroup;
45 | }
46 | public void setJobGroup(String jobGroup) {
47 | this.jobGroup = jobGroup;
48 | }
49 | public String getJobName() {
50 | return jobName;
51 | }
52 | public void setJobName(String jobName) {
53 | this.jobName = jobName;
54 | }
55 |
56 | public Object getBody() {
57 | return body;
58 | }
59 |
60 | public void setBody(Object body) {
61 | this.body = body;
62 | }
63 |
64 | @Override
65 | public String toString() {
66 | return "MonitorCommond [cmdType=" + cmdType + ", jobGroup=" + jobGroup + ", jobName=" + jobName + "]";
67 | }
68 |
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/jeesuite-common/src/main/java/com/jeesuite/common/crypt/SHA1.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.common.crypt;
2 |
3 | import java.security.MessageDigest;
4 | import java.util.Arrays;
5 |
6 | import com.jeesuite.common.JeesuiteBaseException;
7 |
8 |
9 | public class SHA1 {
10 |
11 | /**
12 | *
13 | * 用SHA1算法生成安全签名
14 | *
15 | *
16 | * @param token
17 | * 票据
18 | * @param timestamp
19 | * 时间戳
20 | * @param nonce
21 | * 随机字符串
22 | * @param encrypt
23 | * 密文
24 | * @return 安全签名
25 | *
26 | * @throws AESException {@link AESException}
27 | */
28 | public static String getSHA1(String token, String timestamp, String nonce, String encrypt) {
29 | try {
30 | String[] array = new String[]{token, timestamp, nonce, encrypt};
31 | StringBuffer sb = new StringBuffer();
32 |
33 | /* 字符串排序 */
34 | Arrays.sort(array);
35 | for (int i = 0; i < 4; i++) {
36 | sb.append(array[i]);
37 | }
38 |
39 | /* SHA1签名生成 */
40 | MessageDigest md = MessageDigest.getInstance("SHA-1");
41 | md.update(sb.toString().getBytes());
42 | byte[] digest = md.digest();
43 |
44 | StringBuffer hexstr = new StringBuffer();
45 | String shaHex = "";
46 | for (int i = 0; i < digest.length; i++) {
47 | shaHex = Integer.toHexString(digest[i] & 0xFF);
48 | if (shaHex.length() < 2) {
49 | hexstr.append(0);
50 | }
51 | hexstr.append(shaHex);
52 | }
53 |
54 | return hexstr.toString();
55 | } catch (Exception e) {
56 | throw new JeesuiteBaseException(500, "error", e);
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/jeesuite-kafka/src/main/java/com/jeesuite/kafka/producer/ConsumerAckWatcher.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.kafka.producer;
2 |
3 | import java.util.Objects;
4 | import java.util.concurrent.CountDownLatch;
5 | import java.util.concurrent.TimeUnit;
6 |
7 | import org.I0Itec.zkclient.IZkDataListener;
8 | import org.I0Itec.zkclient.ZkClient;
9 | import org.slf4j.Logger;
10 | import org.slf4j.LoggerFactory;
11 |
12 | import com.jeesuite.kafka.KafkaConst;
13 |
14 | /**
15 | * 消费回执观察者
16 | * @description
17 | * @author vakin
18 | * @date 2017年11月27日
19 | */
20 | public class ConsumerAckWatcher {
21 |
22 | private static final Logger log = LoggerFactory.getLogger(ConsumerAckWatcher.class);
23 |
24 | private CountDownLatch latch;
25 | private String consumerGroup;
26 |
27 | public ConsumerAckWatcher(String messageId, ZkClient zkClient) {
28 | this.latch = new CountDownLatch(1);
29 |
30 | String path = KafkaConst.ZK_PRODUCER_ACK_PATH + messageId;
31 | zkClient.createEphemeral(path);
32 |
33 | zkClient.subscribeDataChanges(path, new IZkDataListener() {
34 | @Override
35 | public void handleDataDeleted(String dataPath) throws Exception {}
36 | @Override
37 | public void handleDataChange(String dataPath, Object data) throws Exception {
38 | latch.countDown();
39 | consumerGroup = Objects.toString(data);
40 | log.debug("recv_consumer_ack messageId:{},from group:{}",messageId,consumerGroup);
41 | try {zkClient.delete(dataPath);} catch (Exception e) {}
42 | }
43 | });
44 | }
45 |
46 |
47 | /**
48 | * 等待应答
49 | * @return 返回消费者groupName
50 | */
51 | public String waitAck(){
52 | try {
53 | this.latch.await(5000, TimeUnit.MILLISECONDS);
54 | return consumerGroup;
55 | } catch (Exception e) {}
56 | return null;
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/BaseApplicaionConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.rest;
5 |
6 | import org.glassfish.jersey.jackson.JacksonFeature;
7 | import org.glassfish.jersey.server.ResourceConfig;
8 | import org.glassfish.jersey.server.ServerProperties;
9 | import org.springframework.web.filter.RequestContextFilter;
10 |
11 | import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
12 | import com.jeesuite.rest.excetion.BaseExceptionMapper;
13 | import com.jeesuite.rest.filter.DefaultWebFilter;
14 | import com.jeesuite.rest.filter.FilterConfig;
15 | import com.jeesuite.rest.resolver.ObjectMapperResolver;
16 | import com.jeesuite.rest.resolver.ValidationContextResolver;
17 |
18 | import io.swagger.jaxrs.listing.SwaggerSerializers;
19 |
20 | /**
21 | * @description
22 | * @author vakin
23 | * @date 2016年1月16日
24 | * @Copyright (c) 2015, vakinge@github
25 | */
26 | public abstract class BaseApplicaionConfig extends ResourceConfig implements CustomConfig {
27 |
28 | public BaseApplicaionConfig() {
29 | //设置默认时区
30 | System.setProperty("user.timezone","Asia/Shanghai");
31 |
32 | register(ValidationContextResolver.class);
33 | property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);
34 | property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);
35 |
36 | this.packages(packages());
37 |
38 | register(ObjectMapperResolver.class);
39 | register(JacksonFeature.class);
40 | register(JacksonJsonProvider.class);
41 | register(new BaseExceptionMapper(createExcetionWrapper()));
42 | register(RequestContextFilter.class);
43 |
44 | register(DefaultWebFilter.class);
45 | //
46 | if(FilterConfig.apiDocEnabled()){
47 | register(SwaggerSerializers.class);
48 | }
49 | }
50 |
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/jeesuite-rest/src/main/java/com/jeesuite/rest/filter/handler/ResponseWrapperHandler.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.jeesuite.rest.filter.handler;
5 |
6 | import javax.servlet.http.HttpServletRequest;
7 | import javax.ws.rs.container.ContainerRequestContext;
8 | import javax.ws.rs.container.ContainerResponseContext;
9 | import javax.ws.rs.container.ResourceInfo;
10 | import javax.ws.rs.core.MediaType;
11 |
12 | import com.jeesuite.rest.filter.FilterHandler;
13 | import com.jeesuite.rest.response.ResponseCode;
14 | import com.jeesuite.rest.response.WrapperResponseEntity;
15 |
16 | /**
17 | * @description
18 | * @author vakin
19 | * @date 2017年1月2日
20 | */
21 | public class ResponseWrapperHandler implements FilterHandler {
22 |
23 |
24 | @Override
25 | public void processRequest(ContainerRequestContext requestContext, HttpServletRequest request,
26 | ResourceInfo resourceInfo) {}
27 |
28 | @Override
29 | public void processResponse(ContainerRequestContext requestContext, ContainerResponseContext responseContext,
30 | ResourceInfo resourceInfo) {
31 | MediaType mediaType = responseContext.getMediaType();
32 | if (mediaType != null && MediaType.APPLICATION_JSON_TYPE.equals(mediaType)) {
33 | Object responseData = responseContext.getEntity();
34 | WrapperResponseEntity jsonResponse;
35 |
36 | if (responseData instanceof WrapperResponseEntity) {
37 | jsonResponse = (WrapperResponseEntity) responseData;
38 | } else {
39 | jsonResponse = new WrapperResponseEntity(ResponseCode.OK);
40 | jsonResponse.setData(responseData);
41 | }
42 | responseContext.setStatus(ResponseCode.OK.getCode());
43 |
44 | responseContext.setEntity(jsonResponse);
45 |
46 | }
47 | }
48 |
49 | @Override
50 | public int getPriority() {
51 | return 9;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/plugin/shard/TableRouteHandler.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.mybatis.plugin.shard;
2 |
3 | import org.apache.ibatis.plugin.Invocation;
4 | import org.slf4j.Logger;
5 | import org.slf4j.LoggerFactory;
6 | import org.springframework.beans.factory.InitializingBean;
7 |
8 | import com.jeesuite.mybatis.core.InterceptorHandler;
9 | import com.jeesuite.mybatis.plugin.JeesuiteMybatisInterceptor;
10 |
11 | /**
12 | * 分库自动路由处理
13 | *
14 | * @description
15 | * @author vakin
16 | * @date 2015年12月7日
17 | * @Copyright (c) 2015, jwww
18 | */
19 | public class TableRouteHandler implements InterceptorHandler,InitializingBean {
20 |
21 |
22 | protected static final Logger logger = LoggerFactory.getLogger(TableRouteHandler.class);
23 |
24 |
25 | @Override
26 | public void afterPropertiesSet() throws Exception {
27 | // TODO Auto-generated method stub
28 |
29 | }
30 |
31 | @Override
32 | public Object onInterceptor(Invocation invocation) throws Throwable {
33 | // TODO Auto-generated method stub
34 | return null;
35 | }
36 |
37 | @Override
38 | public void onFinished(Invocation invocation, Object result) {
39 | // TODO Auto-generated method stub
40 |
41 | }
42 |
43 |
44 | /* (non-Javadoc)
45 | * @see com.jeesuite.mybatis.core.InterceptorHandler#onStart()
46 | */
47 | @Override
48 | public void start(JeesuiteMybatisInterceptor context) {
49 | // TODO Auto-generated method stub
50 |
51 | }
52 |
53 | /* (non-Javadoc)
54 | * @see com.jeesuite.mybatis.core.InterceptorHandler#onClose()
55 | */
56 | @Override
57 | public void close() {
58 | // TODO Auto-generated method stub
59 |
60 | }
61 |
62 | @Override
63 | public int interceptorOrder() {
64 | // TODO Auto-generated method stub
65 | return 0;
66 | }
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/jeesuite-log/src/main/java/com/jeesuite/log/LogFactory.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.log;
2 |
3 | import java.lang.reflect.Constructor;
4 |
5 | public class LogFactory {
6 |
7 | private static Constructor> logConstructor;
8 |
9 | static{
10 | Class> implClass = null;
11 | try {
12 | classForName("org.apache.log4j.Logger");
13 | implClass = classForName("com.ayg.openapi.log.Log4jImpl");
14 | } catch (Throwable t) {}
15 |
16 | if(implClass == null){
17 | try {
18 | classForName("org.apache.logging.log4j.Logger");
19 | implClass = classForName("com.ayg.openapi.log.Log4j2Impl");
20 | } catch (Throwable t) {}
21 | }
22 |
23 | if(implClass == null){
24 | try {
25 | classForName("org.slf4j.Logger");
26 | implClass = classForName("com.ayg.openapi.log.SLF4JImpl");
27 | } catch (Throwable t) {}
28 | }
29 |
30 | try {
31 | logConstructor = implClass.getConstructor(new Class[] { String.class });
32 | } catch (Throwable e) {}
33 | }
34 |
35 | public static Log getLog(String loggerName) {
36 | try {
37 | return (Log) logConstructor.newInstance(loggerName);
38 | } catch (Throwable t) {
39 | throw new RuntimeException("Error creating logger for logger '" + loggerName + "'. Cause: " + t, t);
40 | }
41 | }
42 |
43 | private static Class> classForName(String className) throws ClassNotFoundException {
44 | Class> clazz = null;
45 | try {
46 | clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
47 | } catch (Exception e) {
48 | // Ignore. Failsafe below.
49 | }
50 | if (clazz == null) {
51 | clazz = Class.forName(className);
52 | }
53 | return clazz;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/jeesuite-security/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.jeesuite
6 | jeesuite-libs
7 | 1.3.4-SNAPSHOT
8 |
9 | jeesuite-security
10 |
11 |
12 |
13 | com.jeesuite
14 | jeesuite-common
15 | ${project.parent.version}
16 |
17 |
18 |
19 | com.jeesuite
20 | jeesuite-spring
21 | ${project.parent.version}
22 |
23 |
24 |
25 | com.jeesuite
26 | jeesuite-cache
27 | ${project.parent.version}
28 | true
29 |
30 |
31 |
32 | com.jeesuite
33 | jeesuite-springweb
34 | ${project.parent.version}
35 |
36 |
37 |
38 | javax.servlet
39 | javax.servlet-api
40 | 3.1.0
41 | provided
42 |
43 |
44 |
45 | com.google.guava
46 | guava
47 | 19.0
48 |
49 |
50 |
51 |
52 |
53 |
54 | org.apache.maven.plugins
55 | maven-deploy-plugin
56 |
57 | false
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/jeesuite-mybatis/src/main/java/com/jeesuite/mybatis/crud/helper/ColumnMapper.java:
--------------------------------------------------------------------------------
1 | package com.jeesuite.mybatis.crud.helper;
2 |
3 | import org.apache.ibatis.type.JdbcType;
4 | import org.apache.ibatis.type.TypeHandler;
5 |
6 | public class ColumnMapper {
7 |
8 | private String property;
9 | private String column;
10 | private Class> javaType;
11 | private JdbcType jdbcType;
12 | private Class extends TypeHandler>> typeHandler;
13 | private boolean id = false;
14 | private boolean insertable = true;
15 | private boolean updatable = true;
16 |
17 | public String getProperty() {
18 | return property;
19 | }
20 |
21 | public void setProperty(String property) {
22 | this.property = property;
23 | }
24 |
25 | public String getColumn() {
26 | return column;
27 | }
28 |
29 | public void setColumn(String column) {
30 | this.column = column;
31 | }
32 |
33 | public Class> getJavaType() {
34 | return javaType;
35 | }
36 |
37 | public void setJavaType(Class> javaType) {
38 | this.javaType = javaType;
39 | }
40 |
41 | public boolean isId() {
42 | return id;
43 | }
44 |
45 | public void setId(boolean id) {
46 | this.id = id;
47 | }
48 |
49 | public boolean isInsertable() {
50 | return insertable;
51 | }
52 |
53 | public void setInsertable(boolean insertable) {
54 | this.insertable = insertable;
55 | }
56 |
57 | public boolean isUpdatable() {
58 | return updatable;
59 | }
60 |
61 | public void setUpdatable(boolean updatable) {
62 | this.updatable = updatable;
63 | }
64 |
65 | public JdbcType getJdbcType() {
66 | return jdbcType;
67 | }
68 |
69 | public void setJdbcType(JdbcType jdbcType) {
70 | this.jdbcType = jdbcType;
71 | }
72 |
73 | public Class extends TypeHandler>> getTypeHandler() {
74 | return typeHandler;
75 | }
76 |
77 | public void setTypeHandler(Class extends TypeHandler>> typeHandler) {
78 | this.typeHandler = typeHandler;
79 | }
80 |
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/jeesuite-kafka/src/test/resources/test-kafka-producer.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
30 | ${kafka.servers}
31 | 1
32 | 1
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------