0

I have two springboot3 applications as mentioned below and I am using config server to load the configuration files.

  1. auth server <application.name=auth-server> -> That uses secret key to generate jwt token
  2. resource server <application.name=resource-server> -> Uses the same secret key to validate jwt token

Now, my requirement is to have a common property file that will contain this secret key and both auth server and resource server should refer this file via config server.

Now, as we know, config server uses these 2 attributes to load property files

**<application-name>-<profile>**

Now, problem is, how these 2 spring boot application can refer this common file to extract a secret, as application name is different for both of them.

I don't want to have 2 property files storing a secret key, e.g. auth-server-profile-name and resource-server-profile-name, as in future the count of resource servers may increase and I don't want to maintain secret key in multiple files.

Please suggest, how I can achieve this.

Thanks in advance.

Abhi
  • 21
  • 5

0 Answers0