diff --git a/spring-cloud.html b/spring-cloud.html index 77b63d0..0374295 100644 --- a/spring-cloud.html +++ b/spring-cloud.html @@ -460,7 +460,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Declarative REST Client: Feign
  • Client Side Load Balancer: Ribbon
  • External Configuration: Archaius
  • -
  • Router and Filter: Zuul
  • +
  • Router and Filter: Zuul + +
  • Spring Cloud Cluster
  • @@ -1205,6 +1209,57 @@ normal Eureka functionality under /v2/*.

    Eureka background reading: see flux capacitor and google group discussion.

    +
    + + + + + +
    +
    Tip
    +
    +
    +

    You can run the Eureka server as an executable JAR (or WAR) using the +Spring +Boot build tools, but to avoid problems with classpath scanning in +Jersey 1.x you have to tell the build plugins to unpack the jars that +contain JAX-RS resources, e.g. (for Maven)

    +
    +
    +
    pom.xml
    +
    +
    <plugin>
    +    <groupId>org.springframework.boot</groupId>
    +    <artifactId>spring-boot-maven-plugin</artifactId>
    +    <configuration>
    +        <requiresUnpack>
    +            <dependency>
    +                <groupId>com.netflix.eureka</groupId>
    +                <artifactId>eureka-core</artifactId>
    +            </dependency>
    +            <dependency>
    +                <groupId>com.netflix.eureka</groupId>
    +                <artifactId>eureka-client</artifactId>
    +            </dependency>
    +        </requiresUnpack>
    +    </configuration>
    +</plugin>
    +
    +
    +
    +

    or with Gradle

    +
    +
    +
    build.gradle
    +
    +
    apply plugin: 'spring-boot'
    +springBoot {
    +    requiresUnpack = ['com.netflix.eureka:eureka-core','com.netflix.eureka:eureka-client']
    +}
    +
    +
    +
    +
    @@ -1447,6 +1502,8 @@ public class Application extends FeignConfigurer {

    Zuul’s rule engine allows rules and filters to be written in essentially any JVM language, with built in support for Java and Groovy.

    +
    +

    Embedded Zuul Reverse Proxy

    Spring Cloud has created an embedded Zuul proxy to ease the development of a very common use case where a UI application wants to proxy calls to one or more back end services. To enable it, annotate a Spring Boot main class with @EnableZuulProxy. This forwards local calls to /proxy/* to the appropriate service. The proxy uses Ribbon to locate an instance to forward to via Eureka. Forwarding to the service is protected by a Hystrix circuit breaker. Rules are configured via the Spring environment. The Config Server is an ideal place for the Zuul configuration. Configuration rules look like the following:

    @@ -1460,6 +1517,7 @@ public class Application extends FeignConfigurer {
    +

    Spring Cloud Cluster

    @@ -1646,7 +1704,7 @@ with Eureka will also become a Cloud Foundry service.