All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.jhipster.lite.shared.projectfolder.infrastructure.primary.ProjectFolderConfiguration Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.shared.projectfolder.infrastructure.primary;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import tech.jhipster.lite.shared.projectfolder.domain.ForcedProjectFolder;
import tech.jhipster.lite.shared.projectfolder.domain.FreeProjectFolder;
import tech.jhipster.lite.shared.projectfolder.domain.ProjectFolder;

@Configuration
class ProjectFolderConfiguration {

  @Bean
  @ConditionalOnProperty(value = "application.forced-project-folder")
  ProjectFolder forcedProjectFolder(@Value("${application.forced-project-folder}") String forcedProjectFolder) {
    return new ForcedProjectFolder(forcedProjectFolder);
  }

  @Bean
  @ConditionalOnProperty(value = "application.forced-project-folder", matchIfMissing = true, havingValue = "dummy")
  ProjectFolder freeProjectFolder() {
    return new FreeProjectFolder();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy