Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Not reading azure.activedirectory properties from Spring Property file passed by -Dspring.config.location=<property file> #926

@prabdeb

Description

@prabdeb

Environment

  • Spring boot starter:

    • active directory spring boot starter
  • OS Type: Linux

  • Java version:

    • 1.8

Summary

No reading azure.activedirectory properties (Ex. azure.activedirectory.tenant-id) from Spring Property file passed by -Dspring.config.location=<property file> in Java Command line while starting the application

Reproduce steps

Do not hard code azure.activedirectory.* properties in a file application.properties instead have them in a property file, created in a location other than classpath and passed to JVM using Spring Option - -Dspring.config.location=<property file>

Expected Results

Should read the properties from a file that is not in classpath and loaded via Spring Option

Actual Results

Receiving exception - azure.activedirectory.tenant-id not found

Workaround

Instead of passing -Dspring.config.location=<property file> in Java Command Line while starting application, rename the <property file> into application.properties and place into the same directory from where the Java Command Line is triggered to start the application - Ex.

cp $PROPERTY_FILE_PATH /home/user/application.properties && cd /home/user && java -jar application.war

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions