Commit 453c8df1 authored by libin's avatar libin

使用Feign的时候,如果参数中带有 @PathVariable形式的参数,则要用value=""标明对应的参数,否则会抛出IllegalStateException异常

parent b601a815
...@@ -53,7 +53,7 @@ public interface UserFeign { ...@@ -53,7 +53,7 @@ public interface UserFeign {
* @return * @return
*/ */
@RequestMapping(value = "/member/app/unauth/level/{type}", method = RequestMethod.GET) @RequestMapping(value = "/member/app/unauth/level/{type}", method = RequestMethod.GET)
public BaseUserMemberLevel level(@PathVariable Integer type); public BaseUserMemberLevel level(@PathVariable(value = "type") Integer type);
/** /**
* 批量获取用户基本信息 * 批量获取用户基本信息
......
...@@ -21,9 +21,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -21,9 +21,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableCircuitBreaker @EnableCircuitBreaker
@SpringBootApplication @SpringBootApplication
@EnableFeignClients({"com.github.wxiaoqi.security","com.xxfc.platform"})
@EnableFeignClients({"com.github.wxiaoqi.security.auth.client.feign","com.xxfc.platform","com.github.wxiaoqi.security.admin.feign"})
//@EnableFeignClients({"com.github.wxiaoqi.security","com.xxfc.platform"})
@EnableScheduling @EnableScheduling
@EnableAceAuthClient @EnableAceAuthClient
@EnableAceCache @EnableAceCache
......
...@@ -15,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -15,7 +15,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableScheduling @EnableScheduling
@EnableAceAuthClient @EnableAceAuthClient
@EnableFeignClients({"com.github.wxiaoqi.security.auth.client.feign", "com.github.wxiaoqi.security.admin.feign","com.xxfc.platform.vehicle.feign"}) @EnableFeignClients({"com.github.wxiaoqi.security","com.xxfc.platform.vehicle.feign"})
@EnableAceCache @EnableAceCache
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.vehicle.mapper") @tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.vehicle.mapper")
public class VehicleApplication { public class VehicleApplication {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment