generated from semicolondsm/Semicolon_Repository_Generator
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c68ae11
commit e6ea69b
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
39 changes: 39 additions & 0 deletions
39
...nfrastructure/src/main/kotlin/com/xquare/v1userservice/configuration/feign/ExcelClient.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.xquare.v1userservice.configuration.feign | ||
|
||
import org.springframework.web.bind.annotation.PostMapping | ||
import org.springframework.cloud.openfeign.FeignClient | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RequestParam | ||
import org.springframework.web.multipart.MultipartFile | ||
import reactor.netty.http.server.HttpServerResponse | ||
|
||
@FeignClient( | ||
name = "ExcelClient", | ||
url = "\${excel.url}", | ||
configuration = [FeignConfig::class] | ||
) | ||
interface ExcelClient { | ||
@GetMapping | ||
fun createExcelSheet(httpServletResponse: HttpServerResponse) | ||
|
||
@PostMapping | ||
fun saveExcelInfo( | ||
@RequestParam scheme: String, | ||
@RequestParam host: String, | ||
@RequestParam port: Int, | ||
@RequestParam database: String, | ||
@RequestParam username: String, | ||
@RequestParam password: String, | ||
file: MultipartFile | ||
) | ||
|
||
@GetMapping("/userInfo") | ||
fun createExcelSheetAsDB( | ||
@RequestParam scheme: String, | ||
@RequestParam host: String, | ||
@RequestParam port: Int, | ||
@RequestParam database: String, | ||
@RequestParam username: String, | ||
@RequestParam password: String | ||
) | ||
} |
11 changes: 11 additions & 0 deletions
11
...nfrastructure/src/main/kotlin/com/xquare/v1userservice/configuration/feign/FeignConfig.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.xquare.v1userservice.configuration.feign | ||
|
||
import org.springframework.cloud.openfeign.EnableFeignClients | ||
import org.springframework.cloud.openfeign.FeignAutoConfiguration | ||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@EnableFeignClients | ||
@ImportAutoConfiguration(FeignAutoConfiguration::class) | ||
@Configuration | ||
class FeignConfig |
This file contains 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