I have Spring Boot with Kotlin app which uses Bolt (slack api for Java). I need to fetch data from external resource during AppHomeOpenedEvent
. I would like to use FeignClient
but problem is that during there is no external resource call and during debugging nothing happens (even if I try to call some random fake api found on the internet). With RestTemplate
everything works fine. Is there any limitation with usage of slack api and openfeign?
Asked
Active
Viewed 50 times
0

ketrab321
- 541
- 2
- 12
- 22
1 Answers
0
Ok there was a problem with configuration
@Configuration
class SlackAppConfig {
@Bean
fun slackApp(appConfig: AppConfig): App {
return App(appConfig)
}
@Bean
fun slackAppServer(app: App): SlackAppServer {
val server = SlackAppServer(app)
server.start()
return server
}
}
Looks like SlackAppServer
somehow causes that FeignClient cannot be used. After changing config to
@Configuration
class SlackAppConfig {
@Bean
fun loadOAuthConfig(): AppConfig {
return AppConfig.builder()
//some config
.build()
}
@Bean
fun slackApp(appConfig: AppConfig): App {
return App(appConfig)
}
}
started working

ketrab321
- 541
- 2
- 12
- 22