fabricio
11/12/2018, 2:33 PM<java.version>11</java.version>
with kotlin. But I get this error:
>> Error: Kotlin: Unknown JVM target version: 11Supported versions: 1.6, 1.8
bdeg
11/21/2018, 7:51 AMMichael Gysel
11/29/2018, 4:18 PMsdeleuze
11/29/2018, 5:00 PMDefaultCorsProcessor
to TRACE
bdeg
11/29/2018, 5:32 PMtjb
12/02/2018, 7:48 AM@Configuration
@EnableAuthorizationServer
class AuthServerConfig(@Value("\${test.oauth.tokenTimeout:3600}")
var expiration: Int): AuthorizationServerConfigurerAdapter() {
@Autowired lateinit var userDetailsService: UserDetailsService
@Autowired lateinit var authenticationManager: AuthenticationManager
@Bean fun passwordEncoder(): PasswordEncoder {
return BCryptPasswordEncoder()
}
override fun configure(configurer: AuthorizationServerEndpointsConfigurer) {
configurer.authenticationManager(authenticationManager)
configurer.userDetailsService(userDetailsService)
}
override fun configure(clients: ClientDetailsServiceConfigurer) {
clients
.inMemory()
.withClient("test") // TODO: Set to settings in application.yml
.accessTokenValiditySeconds(expiration)
.scopes("read", "write")
.authorizedGrantTypes("password", "refresh_token")
}
}
Czar
12/09/2018, 2:23 PMrodolpho.couto
12/12/2018, 7:21 PMlewik
12/20/2018, 8:12 PMResource not found in classpath: kotlin/coroutines/coroutines.kotlin_builtins
No coroutines in m code
What dependency I should add?Tristan Caron
12/21/2018, 10:48 AMEvgeniy Zaharov
12/21/2018, 12:26 PMthanksforallthefish
12/21/2018, 12:55 PMSlackbot
12/23/2018, 11:20 PMdavidkarlsen
12/30/2018, 8:25 PMMockito.`when`(ccmService.getApplication(Mockito.eq(appName), Mockito.eq(finodsGroup)))
.thenReturn(Optional.of(Application(
0L,
appName,
"",
email, null, "jfr", "EOS", email, employee, employee, employee, employee)))
but I get
-> at com.evry.fs.arch.icpautomate.automator.AutomatorServiceTest.testCreateNamespace(AutomatorServiceTest.kt:39)
You cannot use argument matchers outside of verification or stubbing.
Examples of correct usage of argument matchers:
when(mock.get(anyInt())).thenReturn(null);
doThrow(new RuntimeException()).when(mock).someVoidMethod(anyObject());
verify(mock).someMethod(contains("foo"))
This message may appear after an NullPointerException if the last matcher is returning an object
like any() but the stubbed method signature expect a primitive argument, in this case,
use primitive alternatives.
when(mock.get(any())); // bad use, will raise NPE
when(mock.get(anyInt())); // correct usage use
the mock is injected with:
@MockBean(name = "ccmServiceImpl")
lateinit var ccmService: CcmService
Nimelrian
01/04/2019, 7:07 PM...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modelService' defined in file [G:\src\java\afraid\model\build\classes\kotlin\main\de\nimelrian\afraid\model\ModelService.class]: Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: Resource not found in classpath: kotlin/coroutines/coroutines.kotlin_builtins
Caused by: java.lang.IllegalStateException: Resource not found in classpath: kotlin/coroutines/coroutines.kotlin_builtins
...
I have a reproduction repository here: https://github.com/Nimelrian/kotlin-1.3-spring-test-error
Running .\gradlew build
should show the failing test.
Gradle also shows some warnings regarding differing versions, so I tried pinning the versions using the dependency management plugin, which makes both the warnings and the test error disappear (See the potential-fix
branch in the repo). I do wonder whether this is the correct way though.s1m0nw1
01/07/2019, 6:02 PM@MockKBean
varpa89
01/07/2019, 6:43 PMpoohbar
01/08/2019, 2:35 AMreik.schatz
01/08/2019, 9:31 AMlateinit var
way to the @Autowired val
constructor way (junit5). one test class with 4 test method can now only execute 1 test method successfully. the other ones are failing with No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available
. What makes this test class different, is a @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
annotation. I am also running with junit.jupiter.testinstance.lifecycle.default=per_class
. Maybe all of this doesn’t play nice together?Pankaj
01/08/2019, 5:23 PMorangy
01/09/2019, 8:33 PMdh44t
01/11/2019, 7:27 AMdavidkarlsen
01/11/2019, 1:47 PMSlackbot
01/14/2019, 1:37 PMLucas
01/15/2019, 3:34 AMhennilu
01/18/2019, 4:53 PMander.dev
01/22/2019, 5:27 AMander.dev
01/22/2019, 5:28 AMsdeleuze
01/23/2019, 10:39 AMWebClient
which is the reactive web client usable with both Spring WebFlux and Spring MVC servers. I am actively working on Coroutines support which will be available in experimental mode shortly, and in a fully supported fashion in Spring Boot 2.2. For now, you should use WebClient
Reactive API IMO.masc3d
01/24/2019, 5:05 PMmasc3d
01/24/2019, 5:05 PMsdeleuze
01/28/2019, 1:28 PMmasc3d
01/29/2019, 11:29 AMcom.sun.proxy
ours is based on cglibRuntimeException
https://github.com/masc3d/spring-kotlin-jpaJpaCityServiceTest
to replicate, it will fail on several tests with UndeclaredThrowableException