Skip to content
Snippets Groups Projects
Commit e333448b authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Remove hardcoded properties source

parent ecc614fa
No related branches found
No related tags found
No related merge requests found
package de.tobias.playwall; package de.tobias.playwall;
import lombok.SneakyThrows;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileUrlResource;
import org.springframework.core.io.Resource;
@SpringBootApplication @SpringBootApplication
public class PlaywallServerApplication public class PlaywallServerApplication
{ {
@SneakyThrows
@Bean
public static PropertySourcesPlaceholderConfigurer properties()
{
PropertySourcesPlaceholderConfigurer pspc = new PropertySourcesPlaceholderConfigurer();
Resource[] resources = new Resource[]{new FileUrlResource("/Users/tobias/Documents/Programmieren/Projects/PlayWall/PlayWallServer/config/plugins.yaml")};
pspc.setLocations(resources);
pspc.setIgnoreUnresolvablePlaceholders(true);
return pspc;
}
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(PlaywallServerApplication.class, args); SpringApplication.run(PlaywallServerApplication.class, args);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment