Shay
Shay

Reputation: 121

spring-cloud-config client without starting a server

I have short lived task with client to spring cloud config. (dependency to spring-cloud-starter-config or spring-cloud-config-client).

As I mention, this is short lived task that start, load configurations from the server, do some processing, and closed.

the problem is that spring-cloud-config-client start web server (tomcat), and this is redundant- I don't want to start a web server on my client application/task.

I understand that this web server give me the abilities to refresh or update my short lived task, but I doesn't need it. Is there a way to use spring-cloud-config client without starting a server on the client application?

Upvotes: 0

Views: 399

Answers (1)

wargre
wargre

Reputation: 4753

I got the same issue and found a solution, so here it is:

For spring boot 2 you can use a configuration (yaml format)

spring:
  main:
    web-application-type: none

For spring boot 1.x it is

spring:
  main:
    web-environment: false

Upvotes: 0

Related Questions