fix: 修复omada上云问题
This commit is contained in:
@@ -32,11 +32,5 @@
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
@@ -27,7 +26,6 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author: caiyuchao
|
||||
* @date: 2024-11-21
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class FeignConfig implements RequestInterceptor {
|
||||
|
||||
@@ -85,9 +83,6 @@ public class FeignConfig implements RequestInterceptor {
|
||||
requestTemplate.uri("/openapi/v1/" + omadaProperties.getOmadacId() + lastUri);
|
||||
}
|
||||
|
||||
log.info("requestTemplate path:{}", requestTemplate.path());
|
||||
log.info("omadacId:{}", omadaProperties.getOmadacId());
|
||||
log.info("authorization:{}", authorization);
|
||||
// 添加授权请求头
|
||||
requestTemplate.header(AUTHORIZATION, authorization);
|
||||
}
|
||||
|
||||
@@ -57,4 +57,7 @@ public interface RemoteUserService
|
||||
|
||||
@PostMapping("/device/settingJob")
|
||||
public R<Boolean> settingJob();
|
||||
|
||||
@PostMapping("/device/testJob")
|
||||
public R<String> testJob();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
||||
public R<Boolean> settingJob() {
|
||||
return R.fail("oamda setting job error:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> testJob() {
|
||||
return R.fail("oamda test job error:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user