-
Open the Terminal
-
Use
mysqldumpto backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql -
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
| package com.thakur.kafkaserver.model | |
| import lombok.Getter | |
| import lombok.Setter | |
| import lombok.ToString | |
| @Getter | |
| @Setter | |
| @ToString | |
| data class Person( |
| package com.thakur.kafkaserver.config | |
| import org.springframework.cloud.stream.annotation.EnableBinding | |
| @EnableBinding(KafkaServerStreams::class) | |
| class StreamsConfig |
| package com.thakur.kafkaserver.config | |
| import org.springframework.cloud.stream.annotation.Output | |
| import org.springframework.messaging.MessageChannel | |
| interface KafkaServerStreams { | |
| @Output(PRODUCER_STREAM) | |
| fun producerChannel(): MessageChannel |
| # kafkahost:kafkaport | |
| spring.cloud.stream.kafka.binder.brokers="localhost:9092" | |
| # kafkatopic1 is the stream, will create, and the stream will get the destination or topic name from here | |
| # test is the topic name | |
| spring.cloud.stream.bindings.kafkatopic1.destination=test | |
| # kafkatopic1 is the stream, where we will define in what sort, we will send data | |
| spring.cloud.stream.bindings.kafkatopic1.content-type=application/json |
| spring: | |
| cloud: | |
| stream: | |
| kafka: | |
| binder: | |
| brokers: localhost:9092 #kafkahost:kafkaport | |
| bindings: | |
| kafkatopic1: # this is particular topic, we will create in spring to create connection | |
| destination: test # name of the topic | |
| contentType: application/json # what sort of data, we want to send in message |
| package com.thakur.dockerdemo.controller | |
| import org.springframework.web.bind.annotation.RequestMapping | |
| import org.springframework.web.bind.annotation.RestController | |
| @RestController | |
| @RequestMapping("/docker/api") | |
| class DockerController { | |
| @RequestMapping("/") |
| FROM openjdk:8-jdk-alpine | |
| EXPOSE 8080 | |
| ADD /build/libs/dockerdemo-0.0.1-SNAPSHOT.jar dockerdemo.jar | |
| ENTRYPOINT ["java", "-jar", "dockerdemo.jar"] |
| buildscript { | |
| ext { | |
| kotlinVersion = '1.2.51' | |
| springBootVersion = '2.0.4.RELEASE' | |
| } | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |