기본 패키지 및 클래스, 설정파일 생성
This commit is contained in:
@@ -20,7 +20,12 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
implementation 'org.springframework.kafka:spring-kafka'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||
implementation 'io.projectreactor.kafka:reactor-kafka:1.3.11'
|
||||
|
||||
implementation 'io.springfox:springfox-boot-starter:3.0.0'
|
||||
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
|
||||
|
||||
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.github.deogicorgi.reactor.kafka.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Kafka 설정
|
||||
*/
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.github.deogicorgi.reactor.kafka.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
|
||||
/**
|
||||
* Swaager UI 설정
|
||||
*/
|
||||
@Configuration
|
||||
public class SwaggerConfig {
|
||||
@Bean
|
||||
public Docket api() {
|
||||
return new Docket(DocumentationType.OAS_30)
|
||||
.useDefaultResponseMessages(false)
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.github.deogicorgi.reactor.kafka.web.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
.apiInfo(apiInfo());
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Kafka Producer API Swagger")
|
||||
.description("Kafka Producer API")
|
||||
.version("1.0")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.github.deogicorgi.reactor.kafka.web.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 카프카 프로듀서 Controller
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class ProducerController {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.github.deogicorgi.reactor.kafka.web.service;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ProduceService {
|
||||
}
|
||||
Reference in New Issue
Block a user