• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MavenProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.cloud.deployer.resource.maven.MavenProperties的典型用法代码示例。如果您正苦于以下问题:Java MavenProperties类的具体用法?Java MavenProperties怎么用?Java MavenProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MavenProperties类属于org.springframework.cloud.deployer.resource.maven包,在下文中一共展示了MavenProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ModuleService

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
public ModuleService(SpinnakerConfiguration spinnakerConfiguration,
					 CloudFoundryAppDeployerFactory appDeployerFactory,
					 ResourcePatternResolver ctx,
					 CounterService counterService,
					 TempFileManager fileManager,
					 MavenProperties mavenProperties,
					 ResourceLoader resourceLoader) {

	this.spinnakerConfiguration = spinnakerConfiguration;
	this.appDeployerFactory = appDeployerFactory;
	this.ctx = ctx;
	this.counterService = counterService;
	this.fileManager = fileManager;
	this.mavenProperties = mavenProperties;
	this.resourceLoader = resourceLoader;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:17,代码来源:ModuleService.java


示例2: lruCleaningResourceLoaderBeanPostProcessor

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public LRUCleaningResourceLoaderBeanPostProcessor lruCleaningResourceLoaderBeanPostProcessor(
		SkipperServerProperties skipperServerProperties, MavenProperties mavenProperties) {
	return new LRUCleaningResourceLoaderBeanPostProcessor(
			skipperServerProperties.getFreeDiskSpacePercentage() / 100F,
			new File(mavenProperties.getLocalRepository()));
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-skipper,代码行数:8,代码来源:SkipperServerConfiguration.java


示例3: resourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public ResourceLoader resourceLoader() {
	MavenProperties mavenProperties = new MavenProperties();
	mavenProperties.setRemoteRepositories(new HashMap<>(Collections.singletonMap("springRepo",
			new MavenProperties.RemoteRepository("https://repo.spring.io/libs-snapshot"))));

	Map<String, ResourceLoader> resourceLoaders = new HashMap<>();
	resourceLoaders.put("maven", new MavenResourceLoader(mavenProperties));
	resourceLoaders.put("file", new FileSystemResourceLoader());

	DelegatingResourceLoader delegatingResourceLoader = new DelegatingResourceLoader(resourceLoaders);
	return delegatingResourceLoader;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dashboard,代码行数:14,代码来源:TestDependencies.java


示例4: moduleService

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
ModuleService moduleService(SpinnakerConfiguration spinnakerConfiguration,
							CloudFoundryAppDeployerFactory appDeployerFactoryBean,
							ApplicationContext ctx,
							CounterService counterService,
							TempFileManager fileManager,
							MavenProperties mavenProperties,
							LRUCleaningResourceLoader resourceLoader) {
	return new ModuleService(spinnakerConfiguration, appDeployerFactoryBean, ctx, counterService, fileManager, mavenProperties, resourceLoader);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:11,代码来源:Config.java


示例5: lruCleaningResourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
LRUCleaningResourceLoader lruCleaningResourceLoader(MavenResourceLoader resourceLoader,
													CloudFoundryServerConfigurationProperties serverConfigurationProperties,
													MavenProperties mavenProperties) {
	float fRatio = serverConfigurationProperties.getFreeDiskSpacePercentage() / 100F;
	File repositoryCache = new File(mavenProperties.getLocalRepository());
	repositoryCache.deleteOnExit();
	return new LRUCleaningResourceLoader(resourceLoader, fRatio, repositoryCache);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:10,代码来源:Config.java


示例6: mavenProperties

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
MavenProperties mavenProperties() {

	MavenProperties properties = new MavenProperties();
	properties.getRemoteRepositories().put("jcenter", new MavenProperties.RemoteRepository("http://jcenter.bintray.com/"));
	properties.getRemoteRepositories().put("spring-snapshots", new MavenProperties.RemoteRepository("http://repo.spring.io/snapshot"));
	properties.getRemoteRepositories().put("spring-milestones", new MavenProperties.RemoteRepository("http://repo.spring.io/milestone"));
	properties.getRemoteRepositories().put("spring-releases", new MavenProperties.RemoteRepository("http://repo.spring.io/release"));
	return properties;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:11,代码来源:Config.java


示例7: moduleService

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
ModuleService moduleService(SpinnakerConfiguration spinnakerConfiguration,
							CloudFoundryAppDeployerFactory appDeployerFactoryBean,
							ApplicationContext ctx,
							CounterService counterService,
							TempFileManager fileManager,
							MavenProperties mavenProperties,
							LRUCleaningResourceLoader resourceLoader) {
	return new ModuleService(spinnakerConfiguration, appDeployerFactoryBean, mockPatternResolver(ctx), counterService, fileManager, mavenProperties, resourceLoader);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:11,代码来源:ModuleServiceTests.java


示例8: mavenProperties

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
		MavenProperties mavenProperties() throws IOException {

			MavenProperties properties = new MavenProperties();
			Path tempDirectory = Files.createTempDirectory("spring-cloud-spinnaker-tests-");
			tempDirectory.toFile().deleteOnExit();
			properties.setLocalRepository(tempDirectory.toString());
			properties.getRemoteRepositories().put("spring-snapshots", new MavenProperties.RemoteRepository("http://repo.spring.io/snapshot"));
			properties.getRemoteRepositories().put("spring-milestones", new MavenProperties.RemoteRepository("http://repo.spring.io/milestone"));
//			properties.getRemoteRepositories().put("spring-releases", new MavenProperties.RemoteRepository("http://repo.spring.io/release"));
			return properties;
		}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:13,代码来源:ModuleServiceTests.java


示例9: getResource

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
/**
 * Retrieve the corresponding {@link Resource} instance based on the URI String.
 * Maven properties are used if the URI corresponds to maven resource.
 *
 * @param uriString String representation of the resource URI
 * @param mavenProperties the maven properties to use in case of maven resource
 * @return the resource instance
 */
public static Resource getResource(String uriString, MavenProperties mavenProperties) {
	Assert.isTrue(StringUtils.hasText(uriString), "Resource URI must not be empty");
	try {
		URI uri = new URI(uriString);
		String scheme = uri.getScheme();
		Assert.notNull(scheme, "a scheme (prefix) is required");
		if (scheme.equals("maven")) {
			String coordinates = uriString.replaceFirst("maven:\\/*", "");
			MavenResource mavenResource = MavenResource.parse(coordinates, mavenProperties);
			return mavenResource;
		}
		else if (scheme.equals("docker")) {
			String dockerUri = uriString.replaceFirst("docker:\\/*", "");
			return new DockerResource(dockerUri);
		}
		else {
			ResourceLoader resourceLoader = null;
			if (!scheme.equalsIgnoreCase("http") && !scheme.equalsIgnoreCase("https")) {
				resourceLoader = new DefaultResourceLoader();
			}
			else {
				resourceLoader = new DownloadingUrlResourceLoader();
			}
			return resourceLoader.getResource(uriString);
		}
	}
	catch (URISyntaxException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:39,代码来源:ResourceUtils.java


示例10: DefaultAppRegistryService

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
public DefaultAppRegistryService(AppRegistrationRepository appRegistrationRepository,
		ResourceLoader resourceLoader, MavenProperties mavenProperties) {
	super(resourceLoader, mavenProperties);
	Assert.notNull(appRegistrationRepository, "'appRegistrationRepository' must not be null");
	Assert.notNull(resourceLoader, "'resourceLoader' must not be null");
	this.appRegistrationRepository = appRegistrationRepository;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:8,代码来源:DefaultAppRegistryService.java


示例11: VersionedAppRegistryController

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
public VersionedAppRegistryController(AppRegistryService appRegistryService,
		ApplicationConfigurationMetadataResolver metadataResolver,
		ForkJoinPool forkJoinPool, MavenProperties mavenProperties) {
	this.appRegistryService = appRegistryService;
	this.metadataResolver = metadataResolver;
	this.forkJoinPool = forkJoinPool;
	this.mavenProperties = mavenProperties;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:VersionedAppRegistryController.java


示例12: resourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public DelegatingResourceLoader resourceLoader(MavenProperties mavenProperties) {
	Map<String, ResourceLoader> resourceLoaders = new HashMap<>();
	resourceLoaders.put("maven", new MavenResourceLoader(mavenProperties));
	resourceLoaders.put("file", new FileSystemResourceLoader());

	DelegatingResourceLoader delegatingResourceLoader = new DelegatingResourceLoader(resourceLoaders);
	return delegatingResourceLoader;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:10,代码来源:TestDependencies.java


示例13: delegatingResourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public DelegatingResourceLoader delegatingResourceLoader(MavenProperties mavenProperties) {
	DockerResourceLoader dockerLoader = new DockerResourceLoader();
	MavenResourceLoader mavenResourceLoader = new MavenResourceLoader(mavenProperties);
	Map<String, ResourceLoader> loaders = new HashMap<>();
	loaders.put("docker", dockerLoader);
	loaders.put("maven", mavenResourceLoader);
	return new DelegatingResourceLoader(loaders);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:10,代码来源:LocalDataFlowServerAutoConfiguration.java


示例14: lruCleaningResourceLoaderInstaller

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public LRUCleaningResourceLoaderBeanPostProcessor lruCleaningResourceLoaderInstaller(
		LocalDeployerProperties localDeployerProperties,
		MavenProperties mavenProperties) {
	File repositoryCache = new File(mavenProperties.getLocalRepository());
	float fRatio = localDeployerProperties.getFreeDiskSpacePercentage() / 100F;
	return new LRUCleaningResourceLoaderBeanPostProcessor(fRatio, repositoryCache);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:9,代码来源:LocalDataFlowServerAutoConfiguration.java


示例15: testTaskLauncher

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Test
public void testTaskLauncher() {
	MavenResourceLoader mavenResourceLoader =
			context.getBean(MavenResourceLoader.class);
	assertNotNull(mavenResourceLoader);

	DelegatingResourceLoader delegatingResourceLoader =
			context.getBean(DelegatingResourceLoader.class);
	assertNotNull(delegatingResourceLoader);

	MavenProperties mavenProperties =
			context.getBean(MavenProperties.class);
	assertNotNull(mavenProperties);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:15,代码来源:ResourceLoadingAutoConfigurationTests.java


示例16: mavenResourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public MavenResourceLoader mavenResourceLoader(MavenProperties properties) {
	return new MavenResourceLoader(properties);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dashboard,代码行数:5,代码来源:DataFlowControllerAutoConfiguration.java


示例17: mavenProperties

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
public MavenProperties mavenProperties() {
	return new MavenConfigurationProperties();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dashboard,代码行数:5,代码来源:DataFlowControllerAutoConfiguration.java


示例18: mavenResourceLoader

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
MavenResourceLoader mavenResourceLoader(MavenProperties mavenProperties) {
	return new MavenResourceLoader(mavenProperties);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:5,代码来源:Config.java


示例19: mavenProperties

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
@Bean
@ConfigurationProperties("maven")
public MavenProperties mavenProperties() {
	return new MavenProperties();
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-deployer,代码行数:6,代码来源:AbstractIntegrationTests.java


示例20: AbstractAppRegistryCommon

import org.springframework.cloud.deployer.resource.maven.MavenProperties; //导入依赖的package包/类
public AbstractAppRegistryCommon(ResourceLoader resourceLoader, MavenProperties mavenProperties) {
	this.resourceLoader = resourceLoader;
	this.mavenProperties = mavenProperties;
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-dataflow,代码行数:5,代码来源:AbstractAppRegistryCommon.java



注:本文中的org.springframework.cloud.deployer.resource.maven.MavenProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CoreProperties类代码示例发布时间:2022-05-23
下一篇:
Java Page类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap