Renovus-Tech / solarec-java

GNU Affero General Public License v3.0
0 stars 1 forks source link

Configure the services to use as properties in the application.properties #52

Closed pferrariuy closed 5 months ago

pferrariuy commented 5 months ago

Description

For the services that are only allowed one implementation, but multiple implementation are provided, make the service available by the use of properties in the application.properties file.

Use Case

Currently 2 weather services are implemented and available: MeteoBlue and OpenMeteo. Currently to use one or another, the developer has to remove the @Service annotation on the services that is not required.

Now, the developer has to set the weather service in the application.properties.

Expected Behavior

Load the service according to the new properties in the application.properties file:

solarec.service.weather.provider = 
solarec.service.grid.provider = 
solarec.service.certificate.provider = 

Additional Context

Each services will define the required value in order to be enabled as sevice. Current values availabel are:

Impact on Existing Features

New properties need to be set in the application.properties in order to work.

Related Issues