sdeleuze
11/26/2020, 2:26 PMsdeleuze
11/26/2020, 2:26 PMRobert Jaros
11/26/2020, 2:27 PMsdeleuze
11/26/2020, 2:27 PMsdeleuze
11/26/2020, 2:27 PMsdeleuze
11/26/2020, 2:27 PMRobert Jaros
11/26/2020, 2:28 PMsdeleuze
11/26/2020, 2:28 PMRobert Jaros
11/26/2020, 2:29 PMsdeleuze
11/26/2020, 2:29 PMsdeleuze
11/26/2020, 2:29 PMsdeleuze
11/26/2020, 2:29 PMRobert Jaros
11/26/2020, 2:29 PMManuel Lorenzo
11/27/2020, 8:54 AMManuel Lorenzo
11/27/2020, 8:55 AMkqr
11/27/2020, 1:21 PMmarzelwidmer
11/27/2020, 6:29 PMKotlin
SpringBoot
Project a RestTemplate
as Bean DSL
have some body any hint. What I’m missing…
Thread in Slack Conversationmarzelwidmer
11/27/2020, 6:30 PMCould not autowire. No beans of 'RestTemplate' type found.
and also my tests Failed. (default Spring Boot Test Class 🙂 from teh starter.io)
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :test
KbootDemoApplicationTests > contextLoads() FAILED
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:798
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException at DefaultListableBeanFactory.java:1777
1 test completed, 1 failed
Thread in Slack Conversationmarzelwidmer
11/27/2020, 6:30 PMmarzelwidmer
11/28/2020, 7:55 AMRestTemplate
with the BeanDefinitionDsl
? @sdeleuze maybe U have a sample ? 😉
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.web.client.RestTemplate' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798)
Task :test
HttpsDemoClientApplicationTests > contextLoads() FAILED
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:798
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException at DefaultListableBeanFactory.java:1777
but when I start the applications and test it with a Rest call it woks
@SpringBootApplication
class HttpsDemoClientApplication
fun main(args: Array<String>) {
runApplication<HttpsDemoClientApplication>(*args){
addInitializers(
beans {
bean {
ApplicationRunner { println("-----------------> ApplicationRunner <-----------------") }
}
// bean<RestTemplate>(name = "restTemplate"){
// RestTemplateBuilder().build()
// }
// bean {
// RestTemplate()
// }
bean<RestTemplate> {
RestTemplateBuilder().build()
}
}
)
}
}
//@Configuration
//class BeanConfiguration {
// @Bean
// internal fun restTemplate(restTemplateBuilder: RestTemplateBuilder) = restTemplateBuilder.build()
//}
@RestController
class CallRemoteHttpsServer (private val restTemplate: RestTemplate){
@GetMapping
fun sayHello() = restTemplate.getForEntity("<http://localhost:8081>", String::class.java)
}
Nikky
12/03/2020, 11:31 AM@ConnectMapping()
and somehow assosciate it with following calls to @MessageMapping
i am a bit stuck with the last bit, how can I store and access the users session later ?Júlio Santos
12/08/2020, 11:59 AMday()
, month()
and year()
, I tried to read something in the documentation, but by the deadline of my activity I left aside, can you say something about it? Thanksthana
12/08/2020, 12:05 PMsuspend
?Manuel Lorenzo
12/09/2020, 9:01 AMSubhanshu
12/10/2020, 2:46 PMSubhanshu
12/10/2020, 2:47 PMSubhanshu
12/10/2020, 3:33 PMSubhanshu
12/10/2020, 3:33 PMSubhanshu
12/10/2020, 3:33 PMsdeleuze
12/14/2020, 3:41 PM