poohbar
04/19/2018, 1:14 PMBoolean
but that would be too much magicPere Casafont
04/19/2018, 11:13 PMCSRF Token has been associated to this client
... any ideas?Michael
04/20/2018, 7:04 PMPair
, and a CompositeItemWriter
that sends half the pair to each of two individual writers. But if something goes wrong, I only want to write to one: normally you can return null from a processor and nothing gets written, but if I return Pair(object1, null)
, then the writer that receives the null gives me a Target object must not be null
. Am I approaching this the wrong way, or is there a way around this?Pere Casafont
04/22/2018, 11:10 PMdiesieben07
04/23/2018, 11:37 AMlateinit var
in a JPA entity? Right now it fails, because Spring Data's isNew
check accesses the ID and expects null, this could be patched to allow for lateinit
. Is that a good idea?Lucas
04/24/2018, 8:02 PMrouter { }
block? I've been developing an API without Spring annotations but couldn't understand how to wire them. Here is my last attempt: https://github.com/lucasvalenteds/responder/commit/1e4714304b0a24d59a55e36770b476c954b2dee1visakha
04/25/2018, 12:02 AM@Test
fun testFnCall_partyAddrByCleanCd() {
println("\n\n\n\n ---------------- SEE MEE START ----------------------")
val start = System.currentTimeMillis()
val res = ecmDbSvc.callFnGetPartyAddrByExtCleanCd("ECM-123")
assert(res != null)
assertTrue(res.count() == 100)
val fluxOfPartyAddr = Flux.fromIterable(res)
.delayElements(Duration.ofMillis(100))
.parallel(4).runOn(Schedulers.parallel())
.doOnNext { e -> println(e.addrLine1) }
// fluxOfPartyAddr.blockLast() --> Invalid when using parallel
fluxOfPartyAddr.doOnComplete {
val end = System.currentTimeMillis()
println("time talen: " + (end - start) + " milliSeconds")
println("---------------- SEE MEE START COMPLETE ----------------------")
}
fluxOfPartyAddr.subscribe()
// ??? anything here to make the thread wait ???
}
sdeleuze
04/25/2018, 1:10 PMCzar
04/25/2018, 7:31 PMandyb
04/27/2018, 8:16 AMandyb
04/27/2018, 1:48 PMavolkmann
04/28/2018, 6:44 PMavolkmann
04/28/2018, 7:00 PMmcblum
04/29/2018, 2:11 PMNo Beans of TestRestTemplate found
? According to the testing guide, if you provide a local port then it should automatically wire it up for you. https://spring.io/guides/gs/testing-web/
For whatever reason that’s not happening.sdeleuze
05/04/2018, 2:32 PM@ConfigurationProperties
, etc. but I would appreciate some early feedback, and eventually some improvements via PR (typos, sentences improvements since I am not native english speaker, etc.). I will start working on the WebFlux + functional API + reactive MongoDB + WebTestClient one next week. Thanks and have a good weekend. https://github.com/sdeleuze/tut-spring-boot-kotlinsdeleuze
05/04/2018, 2:34 PMavolkmann
05/05/2018, 8:41 AMCarlos Ottoboni
05/09/2018, 11:50 AM@Modifying
@Transactional
@Query("DELETE FROM CollectionComicBook WHERE comic_book_id = ?1")
fun deleteByComicBookId(comicBookId: Long): Int
When I run this query it works ok, I can see in my database that the value is being deleted, however my service return this error:
"Modifying queries can only use void or int/Integer as return type!; nested exception is java.lang.IllegalArgumentException: Modifying queries can only use void or int/Integer as return type!
I've tried to change the return type to Long, Integer (from java), Unit and also leave it blank, but I'm still getting this error. I don't know what I can do to solve this. Anyone can help me with this?sdeleuze
05/09/2018, 1:04 PMsdeleuze
05/11/2018, 9:01 AMMichael
05/11/2018, 6:21 PMKotlin: Expected type does not accept nulls in Java, but the value may be null in Kotlin
around a MapSqlParameterSource("key", null)
- but the value can be null, as far as I can tell.Czar
05/13/2018, 6:29 PMvisakha
05/14/2018, 4:36 PMvisakha
05/15/2018, 3:26 AMCaused by: java.lang.IllegalArgumentException: Cannot subclass final class com.winsupply.ecm.job.infa.mdm.EcmBulkCleanUserId
visakha
05/15/2018, 3:53 AMfun updateUserIdDefault(cbPartyXref: CBPartyXref): String {...}
==> this one need to be called from the aboveMichael
05/16/2018, 6:33 PMjackson-module-kotlin
in my pom dependencies. When I run my NamedParameterJdbcTemplate
with a BeanPropertyRowMapper
, though, it’s throwing Illegal arguments for constructor; nested exception is java.lang.IllegalArgumentException: No argument provided for a required parameter: parameter #0
. What might I be missing?OhWhy
05/17/2018, 9:43 AM@Component
private class ActivityRepositoryImpl(private val dbCursor: DbCursor) {
...
}
After upgrading Spring greets me with the following stacktrace:
Caused by: java.lang.IllegalAccessException: Class kotlin.reflect.jvm.internal.FunctionCaller$Constructor can not access a member of class com.trireduce.persistence.ActivityRepositoryImpl with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) ~[?:1.8.0_112]
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296) ~[?:1.8.0_112]
at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288) ~[?:1.8.0_112]
at java.lang.reflect.Constructor.newInstance(Constructor.java:413) ~[?:1.8.0_112]
at kotlin.reflect.jvm.internal.FunctionCaller$Constructor.call(FunctionCaller.kt:66) ~[kotlin-reflect-1.2.41.jar:1.2.41-release-74 (1.2.41)]
at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:107) ~[kotlin-reflect-1.2.41.jar:1.2.41-release-74 (1.2.41)]
at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod(KCallableImpl.kt:149) ~[kotlin-reflect-1.2.41.jar:1.2.41-release-74 (1.2.41)]
at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:111) ~[kotlin-reflect-1.2.41.jar:1.2.41-release-74 (1.2.41)]
at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(BeanUtils.java:765) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:170) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271) ~[spring-beans-5.0.6.RELEASE.jar:5.0.6.RELEASE]
... 22 more
Does anybody have an idea how to solve this?visakha
05/17/2018, 6:14 PMvisakha
05/18/2018, 1:06 PMjava.lang.Exception: Test class should have exactly one public zero-argument constructor
at org.junit.runners.BlockJUnit4ClassRunner.validateZeroArgConstructor(BlockJUnit4ClassRunner.java:171)
at org.junit.runners.BlockJUnit4ClassRunner.validateConstructor(BlockJUnit4ClassRunner.java:148)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:127)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
tmg
05/25/2018, 1:45 PMtmg
05/25/2018, 1:45 PMsdeleuze
05/25/2018, 2:20 PMtmg
05/25/2018, 2:22 PMsnowe
05/25/2018, 3:08 PM