Remove application.yml and initialize properties within ModuleLauncherProperties

Add javadoc
This commit is contained in:
Marius Bogoevici
2015-08-13 09:50:32 -04:00
committed by Eric Bottard
parent a736ade417
commit b7296705f3
4 changed files with 13 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ public class ModuleLauncherConfiguration {
private ModuleLauncherProperties properties;
/**
* Sets up the default Aether-based module resolver, unless overridden
* Sets up the default Aether-based module resolver, unless overridden.
*/
@Bean
@ConditionalOnMissingBean(ModuleResolver.class)

View File

@@ -21,14 +21,24 @@ import java.io.File;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Contains configuration properties for the module launcher.
*
* @author Ilayaperumal Gopinathan
* @author Marius Bogoevici
*/
@ConfigurationProperties
public class ModuleLauncherProperties {
private File localRepository;
/**
* File path to a locally available maven repository, where modules will be downloaded.
*/
private File localRepository = new File(System.getProperty("user.home")
+ File.separator + ".m2" + File.separator + "repository");
private String remoteRepository;
/**
* Location of a remote maven repository from which modules will be downloaded, if not available locally.
*/
private String remoteRepository = "https://repo.spring.io/libs-snapshot";
public void setRemoteRepository(String remoteRepository) {
this.remoteRepository = remoteRepository;

View File

@@ -32,7 +32,6 @@ import org.springframework.util.StringUtils;
*/
@Component
@ConfigurationProperties
// TODO: use a prefix
public class ModuleLauncherRunner implements ApplicationRunner, InitializingBean {
private final static Log log = LogFactory.getLog(ModuleLauncherRunner.class);

View File

@@ -1,2 +0,0 @@
localRepository: ${user.home}${file.separator}.m2${file.separator}repository
remoteRepository: https://repo.spring.io/libs-snapshot