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
371f8b3b
Commit
371f8b3b
authored
Jul 27, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feign polishing
parent
b0b4916d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
FeignClientsRegistrar.java
...gframework/cloud/netflix/feign/FeignClientsRegistrar.java
+2
-0
SpringMvcContract.java
...mework/cloud/netflix/feign/support/SpringMvcContract.java
+3
-3
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientsRegistrar.java
View file @
371f8b3b
...
...
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.BeanClassLoaderAware;
import
org.springframework.beans.factory.annotation.AnnotatedBeanDefinition
;
import
org.springframework.beans.factory.config.BeanDefinition
;
import
org.springframework.beans.factory.config.BeanDefinitionHolder
;
import
org.springframework.beans.factory.support.AbstractBeanDefinition
;
import
org.springframework.beans.factory.support.BeanDefinitionBuilder
;
import
org.springframework.beans.factory.support.BeanDefinitionReaderUtils
;
import
org.springframework.beans.factory.support.BeanDefinitionRegistry
;
...
...
@@ -105,6 +106,7 @@ public class FeignClientsRegistrar implements ImportBeanDefinitionRegistrar,
definition
.
addPropertyValue
(
"url"
,
getUrl
(
attributes
));
definition
.
addPropertyValue
(
"name"
,
getServiceId
(
attributes
));
definition
.
addPropertyValue
(
"type"
,
className
);
definition
.
setAutowireMode
(
AbstractBeanDefinition
.
AUTOWIRE_BY_TYPE
);
String
beanName
=
StringUtils
.
uncapitalize
(
className
.
substring
(
className
.
lastIndexOf
(
"."
)
+
1
));
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/support/SpringMvcContract.java
View file @
371f8b3b
...
...
@@ -42,10 +42,10 @@ public class SpringMvcContract extends Contract.BaseContract {
private
static
final
String
CONTENT_TYPE
=
"Content-Type"
;
@Override
p
ublic
MethodMetadata
parseAndValidatateMetadata
(
Method
method
)
{
MethodMetadata
md
=
super
.
parseAndValidat
ateMetadata
(
method
);
p
rotected
MethodMetadata
parseAndValidateMetadata
(
Class
<?>
targetType
,
Method
method
)
{
MethodMetadata
md
=
super
.
parseAndValidat
eMetadata
(
targetType
,
method
);
RequestMapping
classAnnotation
=
method
.
getDeclaringClass
()
.
getAnnotation
(
RequestMapping
.
class
);
RequestMapping
classAnnotation
=
targetType
.
getAnnotation
(
RequestMapping
.
class
);
if
(
classAnnotation
!=
null
)
{
// Prepend path from class annotation if specified
if
(
classAnnotation
.
value
().
length
>
0
)
{
...
...
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