Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
77e350ac
Commit
77e350ac
authored
Jan 18, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish contribution
parent
3e291ff0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
LocalDevToolsAutoConfiguration.java
...evtools/autoconfigure/LocalDevToolsAutoConfiguration.java
+6
-3
RestartCompatibleRedisSerializerConfigurer.java
...configure/RestartCompatibleRedisSerializerConfigurer.java
+1
-1
LocalDevToolsAutoConfigurationTests.java
...ls/autoconfigure/LocalDevToolsAutoConfigurationTests.java
+9
-5
No files found.
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java
View file @
77e350ac
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -50,6 +50,7 @@ import org.springframework.util.StringUtils;
...
@@ -50,6 +50,7 @@ import org.springframework.util.StringUtils;
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Andy Wilkinson
* @author Andy Wilkinson
* @author Vladimir Tsanev
* @since 1.3.0
* @since 1.3.0
*/
*/
@Configuration
@Configuration
...
@@ -164,12 +165,14 @@ public class LocalDevToolsAutoConfiguration {
...
@@ -164,12 +165,14 @@ public class LocalDevToolsAutoConfiguration {
}
}
@Configuration
@Configuration
@ConditionalOnBean
(
name
=
"sessionRedisTemplate"
)
@ConditionalOnBean
(
name
=
RedisRestartConfiguration
.
SESSION_REDIS_TEMPLATE_BEAN_NAME
)
static
class
RedisRestartConfiguration
{
static
class
RedisRestartConfiguration
{
static
final
String
SESSION_REDIS_TEMPLATE_BEAN_NAME
=
"sessionRedisTemplate"
;
@Bean
@Bean
public
RestartCompatibleRedisSerializerConfigurer
restartCompatibleRedisSerializerConfigurer
(
public
RestartCompatibleRedisSerializerConfigurer
restartCompatibleRedisSerializerConfigurer
(
@Qualifier
(
"sessionRedisTemplate"
)
RedisTemplate
<?,
?>
sessionRedisTemplate
)
{
@Qualifier
(
SESSION_REDIS_TEMPLATE_BEAN_NAME
)
RedisTemplate
<?,
?>
sessionRedisTemplate
)
{
return
new
RestartCompatibleRedisSerializerConfigurer
(
return
new
RestartCompatibleRedisSerializerConfigurer
(
sessionRedisTemplate
);
sessionRedisTemplate
);
}
}
...
...
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/RestartCompatibleRedisSerializerConfigurer.java
View file @
77e350ac
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java
View file @
77e350ac
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -68,6 +68,7 @@ import static org.mockito.Mockito.verify;
...
@@ -68,6 +68,7 @@ import static org.mockito.Mockito.verify;
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Andy Wilkinson
* @author Andy Wilkinson
* @author Vladimir Tsanev
*/
*/
public
class
LocalDevToolsAutoConfigurationTests
{
public
class
LocalDevToolsAutoConfigurationTests
{
...
@@ -244,14 +245,14 @@ public class LocalDevToolsAutoConfigurationTests {
...
@@ -244,14 +245,14 @@ public class LocalDevToolsAutoConfigurationTests {
public
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers10
()
public
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers10
()
throws
Exception
{
throws
Exception
{
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
Session
RedisTemplateConfig10
.
class
);
Session
10RedisTemplateConfig
.
class
);
}
}
@Test
@Test
public
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers11
()
public
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers11
()
throws
Exception
{
throws
Exception
{
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
Session
RedisTemplateConfig11
.
class
);
Session
11RedisTemplateConfig
.
class
);
}
}
private
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
private
void
sessionRedisTemplateIsConfiguredWithCustomDeserializers
(
...
@@ -320,7 +321,7 @@ public class LocalDevToolsAutoConfigurationTests {
...
@@ -320,7 +321,7 @@ public class LocalDevToolsAutoConfigurationTests {
}
}
@Configuration
@Configuration
public
static
class
Session
RedisTemplateConfig10
{
public
static
class
Session
10RedisTemplateConfig
{
@Bean
@Bean
public
RedisTemplate
<
String
,
ExpiringSession
>
sessionRedisTemplate
()
{
public
RedisTemplate
<
String
,
ExpiringSession
>
sessionRedisTemplate
()
{
...
@@ -328,10 +329,11 @@ public class LocalDevToolsAutoConfigurationTests {
...
@@ -328,10 +329,11 @@ public class LocalDevToolsAutoConfigurationTests {
redisTemplate
.
setConnectionFactory
(
mock
(
RedisConnectionFactory
.
class
));
redisTemplate
.
setConnectionFactory
(
mock
(
RedisConnectionFactory
.
class
));
return
redisTemplate
;
return
redisTemplate
;
}
}
}
}
@Configuration
@Configuration
public
static
class
Session
RedisTemplateConfig11
{
public
static
class
Session
11RedisTemplateConfig
{
@Bean
@Bean
public
RedisTemplate
<
Object
,
Object
>
sessionRedisTemplate
()
{
public
RedisTemplate
<
Object
,
Object
>
sessionRedisTemplate
()
{
...
@@ -339,5 +341,7 @@ public class LocalDevToolsAutoConfigurationTests {
...
@@ -339,5 +341,7 @@ public class LocalDevToolsAutoConfigurationTests {
redisTemplate
.
setConnectionFactory
(
mock
(
RedisConnectionFactory
.
class
));
redisTemplate
.
setConnectionFactory
(
mock
(
RedisConnectionFactory
.
class
));
return
redisTemplate
;
return
redisTemplate
;
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment