spring-bootjerseyjersey-client

Spring boot with jersey only as a client


I uses latest of spring boot and I would like to use jersey as a rest client. But I really do not need a rest server!

Including

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jersey</artifactId>
</dependency>

starts a jersey server.

How can I disable this? TIA!


Solution

  • My solution was, adding the following to the pom.xml:

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey.version}</version>    <!-- Spring boot's version -->
        </dependency>
    

    and removing the dependency to spring-boot-starter-jersey.