Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_57962205
redisson
提交
5a9b0646
R
redisson
项目概览
weixin_57962205
/
redisson
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redisson
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5a9b0646
编写于
5月 11, 2021
作者:
N
Nikita Koksharov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactoring
上级
418d0ed1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
29 addition
and
27 deletion
+29
-27
redisson/src/test/java/org/redisson/jcache/JCacheTest.java
redisson/src/test/java/org/redisson/jcache/JCacheTest.java
+27
-27
redisson/src/test/resources/org/redisson/jcache/redisson-jcache.yaml
...c/test/resources/org/redisson/jcache/redisson-jcache.yaml
+2
-0
未找到文件。
redisson/src/test/java/org/redisson/jcache/JCacheTest.java
浏览文件 @
5a9b0646
...
...
@@ -57,8 +57,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
MutableConfiguration
c
=
new
MutableConfiguration
();
c
.
setExpiryPolicyFactory
(
CreatedExpiryPolicy
.
factoryOf
(
new
Duration
(
MILLISECONDS
,
500
)));
...
...
@@ -92,8 +92,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -115,8 +115,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -138,8 +138,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -161,8 +161,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -184,8 +184,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -216,8 +216,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -247,8 +247,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -275,8 +275,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -303,8 +303,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
ObjectMapper
objectMapper
=
new
ObjectMapper
();
objectMapper
.
registerModule
(
new
JavaTimeModule
());
cfg
.
setCodec
(
new
TypedJsonJacksonCodec
(
String
.
class
,
LocalDateTime
.
class
,
objectMapper
));
...
...
@@ -329,8 +329,8 @@ public class JCacheTest extends BaseTest {
.
port
(
6311
)
.
run
();
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
json
"
);
Config
cfg
=
Config
.
from
JSON
(
configUrl
);
URL
configUrl
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
);
Config
cfg
=
Config
.
from
YAML
(
configUrl
);
Configuration
<
String
,
String
>
config
=
RedissonConfiguration
.
fromConfig
(
cfg
);
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
()
...
...
@@ -377,7 +377,7 @@ public class JCacheTest extends BaseTest {
config
.
setExpiryPolicyFactory
(
CreatedExpiryPolicy
.
factoryOf
(
new
Duration
(
TimeUnit
.
SECONDS
,
1
)));
config
.
setStoreByValue
(
true
);
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
json
"
).
toURI
();
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
).
toURI
();
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
(
configUri
,
null
)
.
createCache
(
"test"
,
config
);
...
...
@@ -411,7 +411,7 @@ public class JCacheTest extends BaseTest {
MutableConfiguration
<
String
,
String
>
config
=
new
MutableConfiguration
<>();
config
.
setStoreByValue
(
true
);
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
json
"
).
toURI
();
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
).
toURI
();
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
(
configUri
,
null
)
.
createCache
(
"test"
,
config
);
...
...
@@ -448,7 +448,7 @@ public class JCacheTest extends BaseTest {
MutableConfiguration
<
String
,
String
>
config
=
new
MutableConfiguration
<>();
config
.
setStoreByValue
(
true
);
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
json
"
).
toURI
();
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
).
toURI
();
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
(
configUri
,
null
)
.
createCache
(
"test"
,
config
);
...
...
@@ -490,7 +490,7 @@ public class JCacheTest extends BaseTest {
MutableConfiguration
<
String
,
String
>
config
=
new
MutableConfiguration
<>();
config
.
setStoreByValue
(
true
);
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
json
"
).
toURI
();
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
).
toURI
();
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
(
configUri
,
null
)
.
createCache
(
"test"
,
config
);
...
...
@@ -527,7 +527,7 @@ public class JCacheTest extends BaseTest {
MutableConfiguration
<
String
,
String
>
config
=
new
MutableConfiguration
<>();
config
.
setStoreByValue
(
true
);
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
json
"
).
toURI
();
URI
configUri
=
getClass
().
getResource
(
"redisson-jcache.
yaml
"
).
toURI
();
Cache
<
String
,
String
>
cache
=
Caching
.
getCachingProvider
().
getCacheManager
(
configUri
,
null
)
.
createCache
(
"test"
,
config
);
...
...
redisson/src/test/resources/org/redisson/jcache/redisson-jcache.yaml
0 → 100644
浏览文件 @
5a9b0646
singleServerConfig
:
address
:
"
redis://127.0.0.1:6379"
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录