This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cloudnative.buildpacks.example; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class GreetingController { | |
@GetMapping | |
public String hello() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
kafka: | |
bootstrap-servers: ${CLUSTER_BOOTSTRAP_SERVERS} | |
properties: | |
ssl.endpoint.identification.algorithm: https | |
sasl.mechanism: PLAIN | |
request.timeout.ms: 20000 | |
security.protocol: SASL_SSL | |
retry.backoff.ms: 500 | |
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username='${CLUSTER_API_KEY}' password='${CLUSTER_API_SECRET}'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 8082 | |
spring: | |
application: | |
name: "stock-tick-consumer-avro" | |
kafka: | |
bootstrap-servers: localhost:9092 | |
properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
kafka: | |
bootstrap-servers: ${CLUSTER_BOOTSTRAP_SERVERS} | |
properties: | |
ssl.endpoint.identification.algorithm: https | |
sasl.mechanism: PLAIN | |
request.timeout.ms: 20000 | |
security.protocol: SASL_SSL | |
retry.backoff.ms: 500 | |
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username='${CLUSTER_API_KEY}' password='${CLUSTER_API_SECRET}'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 8080 | |
spring: | |
application: | |
name: "stock-tick-producer-avro" | |
kafka: | |
bootstrap-servers: localhost:9092 | |
properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
kafka: | |
consumer: | |
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer | |
value-deserializer: io.confluent.kafka.serializers.KafkaAvroDeserializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
kafka: | |
producer: | |
key-serializer: org.apache.kafka.common.serialization.StringSerializer | |
value-serializer: io.confluent.kafka.serializers.KafkaAvroSerializer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-rsocket</artifactId> | |
</dependency> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stock: | |
quote: | |
subscription: | |
endpoint: http://stockgeeks.io/api | |
enabled: true | |
apiKey: secret | |
subscriptionType: realtime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.immutable.configuration.binding; | |
import lombok.Getter; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.boot.context.properties.ConstructorBinding; | |
@Getter | |
@ConfigurationProperties("stock.quote.subscription") | |
public class ImmutableStockQuoteSubscriptionProperties { |