-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Module move and rename: spring4 -> spring (#2392)
* Module move and rename: spring4 -> spring * Add the description for changes of Spring(4) module * Feign Spring: relocation information * Feign Spring, relocation: leave only artifactId * Update license plugin's configuration
- Loading branch information
Showing
9 changed files
with
141 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Feign Spring | ||
This module overrides OpenFeign/feign annotation processing to instead use standard ones supplied by the spring annotations specification. | ||
|
||
|
||
## Currently Supported Annotation Processing | ||
Feign only supports processing java interfaces (not abstract or concrete classes). | ||
|
||
ISE is raised when any annotation's value is empty or null. Ex. `Path("")` raises an ISE. | ||
|
||
Here are a list of behaviors currently supported. | ||
### Type Annotations | ||
#### `@RequestMapping` | ||
Appends the ```value``` to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
The ```method``` sets the request method. | ||
The ```produces``` adds the first value as the `Accept` header. | ||
The ```consume``` adds the first value as the `Content-Type` header. | ||
### Method Annotations | ||
#### `@RequestMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
The method sets the request method. | ||
#### `@GetMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `GET` request method. | ||
#### `@PostMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `POST` request method. | ||
#### `@PutMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `PUT` request method. | ||
#### `@DeleteMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `DELETE` request method. | ||
#### `@PatchMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `PATCH` request method. | ||
### Parameter Annotations | ||
#### `@PathVariable` | ||
Links the value of the corresponding parameter to a template variable declared in the path. | ||
#### `@RequestParam` | ||
Links the value of the corresponding parameter to a query parameter. When invoked, null will skip the query param. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2012-2024 The Feign Authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
in compliance with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software distributed under the License | ||
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
or implied. See the License for the specific language governing permissions and limitations under | ||
the License. | ||
--> | ||
<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>io.github.openfeign</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>13.3-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>feign-spring</artifactId> | ||
<name>Feign Spring</name> | ||
<description>Feign Contracts for Spring</description> | ||
|
||
<properties> | ||
<main.basedir>${project.basedir}/..</main.basedir> | ||
|
||
<spring.version>5.3.34</spring.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>feign-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<!-- testing --> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>feign-mock</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
<artifactId>feign-jackson</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
2 changes: 1 addition & 1 deletion
2
...ain/java/feign/spring/SpringContract.java → ...ain/java/feign/spring/SpringContract.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spring4/src/test/java/feign/spring/Data.java → spring/src/test/java/feign/spring/Data.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/feign/spring/SpringContractTest.java → ...java/feign/spring/SpringContractTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,3 @@ | ||
# Feign Spring | ||
This module overrides OpenFeign/feign annotation processing to instead use standard ones supplied by the spring annotations specification. | ||
# Feign Spring4 | ||
|
||
|
||
## Currently Supported Annotation Processing | ||
Feign only supports processing java interfaces (not abstract or concrete classes). | ||
|
||
ISE is raised when any annotation's value is empty or null. Ex. `Path("")` raises an ISE. | ||
|
||
Here are a list of behaviors currently supported. | ||
### Type Annotations | ||
#### `@RequestMapping` | ||
Appends the ```value``` to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
The ```method``` sets the request method. | ||
The ```produces``` adds the first value as the `Accept` header. | ||
The ```consume``` adds the first value as the `Content-Type` header. | ||
### Method Annotations | ||
#### `@RequestMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
The method sets the request method. | ||
#### `@GetMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `GET` request method. | ||
#### `@PostMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `POST` request method. | ||
#### `@PutMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `PUT` request method. | ||
#### `@DeleteMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `DELETE` request method. | ||
#### `@PatchMapping` | ||
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathVariable` annotations. | ||
Sets the `PATCH` request method. | ||
### Parameter Annotations | ||
#### `@PathVariable` | ||
Links the value of the corresponding parameter to a template variable declared in the path. | ||
#### `@RequestParam` | ||
Links the value of the corresponding parameter to a query parameter. When invoked, null will skip the query param. | ||
The module was moved to [spring](../spring) and renamed to **Feign Spring**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters