Coder Social home page Coder Social logo

Comments (9)

fengyws avatar fengyws commented on June 18, 2024 1

1.) 2.0.0.M2 can not find spring-cloud-openfeign-core, and find the spring-cloud-netflix-core
2. )because lack the jar

<dependency>
         <groupId>io.github.openfeign</groupId>
         <artifactId>feign-java8</artifactId>
 </dependency>

from spring-cloud-openfeign.

ryanjbaxter avatar ryanjbaxter commented on June 18, 2024

Please open an issue per question. Or better yet ask questions on Gitter or StackOverflow.

Please learn how to format code on GitHub.

1.) spring-cloud-openfeign-core is part of spring-cloud-starter-openfeign so you should not need to add it
https://github.com/spring-cloud/spring-cloud-openfeign/blob/v2.0.0.M2/spring-cloud-starter-openfeign/pom.xml#L28

2.) I dont know what this means

in my project, when dependency other *.jar(the jar is feign project)

from spring-cloud-openfeign.

ryanjbaxter avatar ryanjbaxter commented on June 18, 2024

1.) There have been some problems with the moving the code and the jar naming in maven repos. Clean you local maven repo and try your build again.

2.) You should not need to include any additional feign jars. sounds like a pom misconfiguration

from spring-cloud-openfeign.

fengyws avatar fengyws commented on June 18, 2024

thanks,i try

from spring-cloud-openfeign.

keyantec avatar keyantec commented on June 18, 2024

@ryanjbaxter I have the same problem, 2.0.0.M2 can not find spring-cloud-openfeign-core,you can see the newest pom
<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>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix</artifactId> <version>2.0.0.M2</version> </parent> <artifactId>spring-cloud-starter-openfeign</artifactId> <name>Spring Cloud Starter OpenFeign</name> <description>Spring Cloud Starter OpenFeign</description> <url>https://projects.spring.io/spring-cloud</url> <organization> <name>Pivotal Software, Inc.</name> <url>https://www.spring.io</url> </organization> <properties> <main.basedir>${basedir}/../../..</main.basedir> </properties> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-core</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-commons</artifactId> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-core</artifactId> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-slf4j</artifactId> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-hystrix</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-ribbon</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-archaius</artifactId> </dependency> </dependencies> </project>
I include the feign core in this way:
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-openfeign-core</artifactId> <version>2.0.0.M2</version> </dependency>
,there is no problem when compile,bug when I run the program ,has error:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.xiaoke.teach.spring.cloud.base.FeignClientTest': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'feignDecoder' defined in org.springframework.cloud.openfeign.FeignClientsConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [feign.codec.Decoder]: Factory method 'feignDecoder' threw exception; nested exception is java.lang.NoClassDefFoundError: feign/optionals/OptionalDecoder

from spring-cloud-openfeign.

keyantec avatar keyantec commented on June 18, 2024

@ryanjbaxter I see the pom in the github project , bug when you download the jar with maven, it is different, I think that the change is not upload to maven repo.

from spring-cloud-openfeign.

keyantec avatar keyantec commented on June 18, 2024

@ryanjbaxter
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-openfeign-core</artifactId> <version>2.0.0.M2</version> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-java8</artifactId> <version>9.6.0</version> </dependency>
I need to include three jars that project can run OK.

from spring-cloud-openfeign.

ryanjbaxter avatar ryanjbaxter commented on June 18, 2024

There was a couple problems with old jars in certain repos for M2. Finchley.RC1 was just released try that instead.

Please learn how to format code on GitHub.

from spring-cloud-openfeign.

henzer avatar henzer commented on June 18, 2024

Hi @keyantec, there is no need to add feign-java8 library. The OptionalDecoder class was added into feign-core since 10.0.0 version. You should update it

from spring-cloud-openfeign.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.