Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
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
openSource
spring-cloud-netflix
Commits
29083237
Unverified
Commit
29083237
authored
Jul 13, 2016
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug logging that code is setting spring.aop.proxyTargetClass=true
See gh-1105
parent
5d37bfe2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
ServoEnvironmentPostProcessor.java
.../cloud/netflix/metrics/ServoEnvironmentPostProcessor.java
+5
-0
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/ServoEnvironmentPostProcessor.java
View file @
29083237
...
...
@@ -19,6 +19,8 @@ package org.springframework.cloud.netflix.metrics;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.env.EnvironmentPostProcessor
;
import
org.springframework.core.env.ConfigurableEnvironment
;
...
...
@@ -32,11 +34,14 @@ import org.springframework.util.ClassUtils;
*/
public
class
ServoEnvironmentPostProcessor
implements
EnvironmentPostProcessor
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
ServoEnvironmentPostProcessor
.
class
);
@Override
public
void
postProcessEnvironment
(
ConfigurableEnvironment
environment
,
SpringApplication
application
)
{
if
(
ClassUtils
.
isPresent
(
"com.netflix.servo.monitor.Monitors"
,
null
))
{
// Make spring AOP default to target class so RestTemplates can be customized
log
.
debug
(
"Setting 'spring.aop.proxyTargetClass=true' to make spring AOP default to target class so RestTemplates can be customized"
);
addDefaultProperty
(
environment
,
"spring.aop.proxyTargetClass"
,
"true"
);
}
}
...
...
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