forked from LianjiaTech/retrofit-spring-boot-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GlobalInterceptor and NetworkInterceptor support Order
- Loading branch information
1 parent
50f84ac
commit f119d4c
Showing
13 changed files
with
199 additions
and
138 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
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
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
29 changes: 0 additions & 29 deletions
29
...n/java/com/github/lianjiatech/retrofit/spring/boot/interceptor/BaseGlobalInterceptor.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...ithub/lianjiatech/retrofit/spring/boot/interceptor/GlobalAndNetworkInterceptorFinder.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.lianjiatech.retrofit.spring.boot.interceptor; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
/** | ||
* @author 陈添明 | ||
* @since 2022/3/30 11:01 下午 | ||
*/ | ||
public class GlobalAndNetworkInterceptorFinder { | ||
|
||
@Autowired(required = false) | ||
private List<GlobalInterceptor> globalInterceptors; | ||
|
||
@Autowired(required = false) | ||
private List<NetworkInterceptor> networkInterceptors; | ||
|
||
public List<GlobalInterceptor> getGlobalInterceptors() { | ||
if (globalInterceptors == null) { | ||
return Collections.emptyList(); | ||
} | ||
return globalInterceptors; | ||
} | ||
|
||
public List<NetworkInterceptor> getNetworkInterceptors() { | ||
if (networkInterceptors == null) { | ||
return Collections.emptyList(); | ||
} | ||
return networkInterceptors; | ||
} | ||
} |
Oops, something went wrong.