Skip to content

Instantly share code, notes, and snippets.

View mkheck's full-sized avatar
💭
Coding, of course!

Mark Heckler mkheck

💭
Coding, of course!
View GitHub Profile
dependencies {
compile('org.springframework.cloud:spring-cloud-starter-sleuth')
compile('org.springframework.boot:spring-boot-starter-web')
compileOnly('org.projectlombok:lombok')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
package com.example.szproviderservice;
import lombok.extern.java.Log;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
public class SzProviderServiceApplication {
package com.example.szconsumerservice;
import lombok.extern.java.Log;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestOperations;
import org.springframework.web.client.RestTemplate;
humbert :: ~ » http :8081/greet
HTTP/1.1 200
Content-Length: 12
Content-Type: text/plain;charset=UTF-8
Date: Tue, 27 Jun 2017 20:19:00 GMT
Hello there!
humbert :: ~ »
2017-06-27 15:21:45.029 INFO [sz-consumer-service,6cb9e5c7261f9d64,6cb9e5c7261f9d64,false] 3272 --- [nio-8081-exec-8] c.e.s.ConsumerController : Logging GET request to /greet for class com.example.szconsumerservice.ConsumerController
2017-06-27 15:21:45.032 INFO [sz-provider-service,6cb9e5c7261f9d64,85714e4c9db87eaa,false] 3260 --- [nio-8080-exec-9] c.e.s.ProviderController : Logging GET request to /hi
@mkheck
mkheck / SCSCLIMarketplace.txt
Created February 13, 2018 22:33
SCS CLI Marketplace
humbert :: ~ » cf m
Getting services from marketplace in org pivot-mheckler / space development as mheckler@pivotal.io...
OK
service plans description
app-autoscaler standard Scales bound applications in response to load
metrics-forwarder unlimited Custom metrics service
mongodb-odb standalone, replica_set, sharded_cluster MongoDB Service
p-circuit-breaker-dashboard standard Circuit Breaker Dashboard for Spring Cloud Applications
p-cloudcache extra-small Pivotal Cloud Cache offers the ability to deploy a GemFire cluster as a service in Pivotal Cloud Foundry.
@mkheck
mkheck / SCS_pom_xml_properties.txt
Last active February 14, 2018 19:23
SCS properties defined in microservices' pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud-services.version>1.6.0.RELEASE</spring-cloud-services.version>
<spring-cloud.version>Edgware.SR2</spring-cloud.version>
</properties>
@mkheck
mkheck / SCS_pom_xml_dependencies_backingservice.txt
Last active February 14, 2018 01:10
SCS dependencies added to backing service's pom.xml
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-config-client</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-service-registry</artifactId>
</dependency>
@mkheck
mkheck / SCS_pom_xml_dependencies_edgeservice.txt
Created February 14, 2018 01:11
SCS dependencies added to edge service's pom.xml
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-config-client</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-service-registry</artifactId>
</dependency>
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>