Here is an example of a pom.xml file for using Feign in a Java project:

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>feign-example</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>Feign Example</name>
    <url>http://www.example.com</url>

    <properties>
        <java.version>1.8</java.version>
        <feign.version>11.0</feign.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
            <version>${feign.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

In this example, we are using Spring Boot and Spring Cloud OpenFeign starter to integrate Feign into our project. The feign.version property is set to specify the version of Feign to use

feign pom文件

原文地址: https://www.cveoy.top/t/topic/iojE 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录