Configuring boostrap.yaml and application.yaml

In the section, we created our main class. Before we run it, we should create our two configuration files. The bootstrap.yaml inside the src/main/resources directory and the application.yaml on our GitHub repository. They will be downloaded via Config Server and provided by the Zipkin server project.

Let's start with bootstrap.yaml:

spring:  application:    name: zipkin  cloud:    config:      uri: http://localhost:5000      label: master

Nothing special, we have configured our Config Server address.

Let's jump to our application.yaml:

server:  port: 9999spring:  rabbitmq:    port: 5672    host: localhost  datasource:    schema: classpath:/mysql.sql    url: jdbc:mysql://${MYSQL_HOST:localhost}/zipkin?autoReconnect=true driver-class-name: ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.