fix:看视频 解决feign的问题

上级 adddfe80
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.kwan.springcloudalibaba</groupId>
<artifactId>nacos-server-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>nacos-feign-api</artifactId>
<name>nacos-feign-api</name>
<description>nacos-feign-api</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.3.0.RELEASE</spring-boot.version>
<spring-cloud-alibaba.version>2.2.1.RELEASE</spring-cloud-alibaba.version>
</properties>
<dependencies>
<dependency>
<groupId>com.kwan.springcloudalibaba</groupId>
<artifactId>nacos-server-common</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
</dependencies>
</project>
......@@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
* @version : 2.2.0
* @date : 2023/1/10 13:45
*/
//@FeignClient(value = "nacos-server-producer",path = "/user", fallback = ComputeClientHystrix.class)
@FeignClient(value = "nacos-server-producer", path = "/user")
public interface ComputeClient {
......
......@@ -32,11 +32,11 @@
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-openfeign</artifactId>-->
<!-- <version>2.0.0.RELEASE</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-hystrix</artifactId>-->
......
......@@ -24,8 +24,8 @@
<dependencies>
<dependency>
<groupId>com.kwan.springcloudalibaba</groupId>
<artifactId>nacos-server-common</artifactId>
<version>1.0.0</version>
<artifactId>nacos-feign-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
......@@ -53,6 +53,11 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
</dependencies>
......
......@@ -4,11 +4,8 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//@EnableFeignClients
//@EnableCircuitBreaker
@SpringBootApplication
//@SpringBootApplication(exclude={DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
public class NacosConsumerApplication {
public static void main(String[] args) {
......
......@@ -23,6 +23,7 @@
<module>nacos-server-common</module>
<module>nacos-server-producer</module>
<module>nacos-server-consumer</module>
<module>nacos-feign-api</module>
<module>nacos-server-sentinel-consumer</module>
</modules>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册