小编Vin*_*Rai的帖子

Rancher with cattle vs Rancher with Kubernetes vs Standalone Kubernetes

我正在努力挖掘Rancher,并且想知道如果Rancher插入Kubernetes是否有任何额外的好处而不是牧羊人在家庭编排框架中.到目前为止,我还没弄清楚为什么有人会选择Kubernetes牧场主.它是否只能帮助缓解Kubernetes的初始设置?这些选项与Kubernetes的独立设置有何不同?

kubernetes rancher cattle

14
推荐指数
1
解决办法
3780
查看次数

为单个 Feign 客户端禁用 Hystrix

我的 SpringBoot 应用程序启用了 Hystrix,并为某些 Feign 客户端定义了回退,其余客户端未定义。

现在,我想为尚未定义回退的那些禁用 Hystrix。因此,我按照 [第 7.4 段] https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html 中列出的步骤操作,即使用 vanilla Feign.Builder 创建单独的 Feign 配置. 但是,添加新的 @Bean Feign.Builder 会禁用我不想要的所有 Feign 客户端的 Hystrix 功能。如果我删除@Bean Feign.Builder,Hystrix 回退会像往常一样在 myhystrixclient 中启动。一个类似的问题在这里如何在多个假客户端之一中禁用 hystrix仍然是开放的。我究竟做错了什么?

public class MyFeignClientConfiguration {

@Bean
public FeignErrorDecoder feignErrorDecoder() {
    return new FeignErrorDecoder();
}

@Bean
@Scope("prototype")
public Feign.Builder feignBuilder() {
    return Feign.builder();
}
}
Run Code Online (Sandbox Code Playgroud)

我的 Feign 客户端如下所示:

@FeignClient(name = "myregularclient", configuration = MyFeignClientConfiguration.class)
public interface MyRegularClient {
//my APIs here
}
Run Code Online (Sandbox Code Playgroud)

我的 Hystrix Feign 配置如下所示:

public class …
Run Code Online (Sandbox Code Playgroud)

java spring-boot hystrix spring-cloud-feign

6
推荐指数
1
解决办法
1414
查看次数

Spring Boot - java.lang.ClassNotFoundException:org.springframework.context.ApplicationContextInitializer

我正在尝试将一个简单的Spring Boot Web应用程序部署到Pivotal Cloud代工厂,但是当我执行cf push时,我在日志中遇到以下错误

java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextInitializer
Run Code Online (Sandbox Code Playgroud)

这是我的pom.xml

    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.4.0.BUILD-SNAPSHOT</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.7</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-tomcat</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc-portlet</artifactId>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <snapshots> …
Run Code Online (Sandbox Code Playgroud)

spring-mvc spring-boot pivotal-cloud-foundry

4
推荐指数
1
解决办法
8451
查看次数