mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-12-01 19:28:30 +08:00
add: 添加starter-redisson
This commit is contained in:
parent
18166d2bea
commit
fd33fd4fdc
@ -200,6 +200,7 @@ public class MainLauncher {
|
||||
- [x] starter-mongodb NoSQL的重要一支
|
||||
- [x] starter-ssdb by [道坤](https://github.com/albinhdk)
|
||||
- [x] starter-elasticsearch by [大鲨鱼](https://github.com/Wizzercn)
|
||||
- [x] starter-[redisson](https://github.com/redisson/redisson) 基于Redis的Java对象/集合/同步锁的分布式实现
|
||||
- [ ] memcached
|
||||
- Mvc
|
||||
- [x] **starter-nutz-mvc Nutz自带的Mvc框架**
|
||||
|
@ -59,6 +59,7 @@
|
||||
<module>nutzboot-demo-simple-fastdfs</module>
|
||||
<module>nutzboot-demo-simple-sqlxmltpl</module>
|
||||
<module>nutzboot-demo-simple-thymeleaf-shiro</module>
|
||||
<module>nutzboot-demo-simple-redisson</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
63
nutzboot-starter/nutzboot-starter-redisson/pom.xml
Normal file
63
nutzboot-starter/nutzboot-starter-redisson/pom.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter</artifactId>
|
||||
<version>2.3.5-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>nutzboot-starter-redisson</artifactId>
|
||||
<name>nutzboot-starter-redisson</name>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<description>NutzBoot, micoservice base on Nutz</description>
|
||||
|
||||
<url>http://nutzam.com</url>
|
||||
<issueManagement>
|
||||
<system>Github Issue</system>
|
||||
<url>http://github.com/nutzam/nutzboot/issues</url>
|
||||
</issueManagement>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>wendal</id>
|
||||
<name>Wendal Chen</name>
|
||||
<email>wendal1985@gmail.com</email>
|
||||
<url>http://wendal.net/</url>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/nutzam/nutzboot.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/nutzam/nutzboot.git</developerConnection>
|
||||
<url>git://github.com/nutzam/nutzboot.git</url>
|
||||
</scm>
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>nutzcn-snapshots</id>
|
||||
<name>NutzCN snapshot repository</name>
|
||||
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
|
||||
</snapshotRepository>
|
||||
|
||||
<repository>
|
||||
<id>sonatype-release-staging</id>
|
||||
<name>Sonatype Nexus release repository</name>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutz-integration-redisson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,40 @@
|
||||
package org.nutz.boot.starter.redisson;
|
||||
|
||||
import org.nutz.boot.annotation.PropDoc;
|
||||
import org.nutz.boot.ioc.IocLoaderProvider;
|
||||
import org.nutz.integration.redisson.RedissonIocLoader;
|
||||
import org.nutz.ioc.IocLoader;
|
||||
|
||||
public class RedissonStarter implements IocLoaderProvider {
|
||||
|
||||
protected static String PRE = "redisson.";
|
||||
|
||||
@PropDoc(value = "使用json配置redisson,一般不选,属于高级配置")
|
||||
public static final String PROP_HOST = PRE + "config.fromJson";
|
||||
@PropDoc(value = "使用yaml配置redisson,一般不选,属于高级配置")
|
||||
public static final String PROP_PORT = PRE + "config.fromYaml";
|
||||
|
||||
@PropDoc(value = "redisson模式,默认单机", defaultValue = "single", possible = {"single", "masterslave", "cluster", "replicated", "sentinel"})
|
||||
public static final String PROP_TIMEOUT = PRE + "mode";
|
||||
@PropDoc(value = "redis服务器密码")
|
||||
public static final String PROP_PASSWORD = PRE + "password";
|
||||
@PropDoc(value = "redisson序列化器", defaultValue = "fst", possible = {"fst", "kryo", "lz4", "jdk", "snappy", "snappy2", "json-jackson", "msgpack-jackson", "cbor-jackson", "smile-jackson"})
|
||||
public static final String PROP_CODEC = PRE + "codec";
|
||||
|
||||
@PropDoc(value = "redisson通用配置项,对应org.redisson.config.Config类")
|
||||
public static final String PROP_CONFIG_COMMON = PRE + "*";
|
||||
|
||||
@PropDoc(value = "redisson单机模式配置项, 对应org.redisson.config.SingleServerConfig")
|
||||
public static final String PROP_SINGLE_CONFIG = PRE + "single.*";
|
||||
@PropDoc(value = "redisson单机地址", defaultValue = "redis://127.0.0.1:6379")
|
||||
public static final String PROP_SINGLE_ADDRESS = PRE + "single.address";
|
||||
|
||||
@PropDoc(value = "redisson单机模式配置项, 对应org.redisson.config.ClusterServersConfig")
|
||||
public static final String PROP_CLUSTER_CONFIG = PRE + "cluster.*";
|
||||
@PropDoc(value = "redisson集群模式节点地址,逗号分隔")
|
||||
public static final String PROP_CLUSTER_ADDRESS = PRE + "cluster.nodeAddress";
|
||||
|
||||
public IocLoader getIocLoader() {
|
||||
return new RedissonIocLoader();
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
org.nutz.boot.starter.redisson.RedissonStarter
|
@ -77,6 +77,7 @@
|
||||
<module>nutzboot-starter-fastdfs</module>
|
||||
<module>nutzboot-starter-seata</module>
|
||||
<module>nutzboot-starter-sqlxmltpl</module>
|
||||
<module>nutzboot-starter-redisson</module>
|
||||
|
||||
</modules>
|
||||
<dependencies>
|
||||
|
12
pom.xml
12
pom.xml
@ -947,6 +947,18 @@
|
||||
<artifactId>nutzboot-starter-caffeine</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-redisson</artifactId>
|
||||
<version>${nutzboot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutz-integration-redisson</artifactId>
|
||||
<version>${nutz.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<repositories>
|
||||
|
Loading…
Reference in New Issue
Block a user