Robert Jaros
08/09/2019, 3:16 PMclient.execute("UPDATE .....")
.bind(...).fetch().rowsUpdated()
.then(
client.execute("UPDATE ......").bind(...).fetch().rowsUpdated()
).then().`as`(operator::transactional).awaitSingle()
Is this correct way?sdeleuze
08/09/2019, 5:46 PMRobert Jaros
08/09/2019, 6:20 PMRobert Jaros
08/09/2019, 6:23 PMthen
they areRobert Jaros
08/09/2019, 6:24 PMsdeleuze
08/09/2019, 8:52 PMcorneil
08/12/2019, 2:21 PMcorneil
08/12/2019, 2:22 PMorg.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'properties' cannot be found on object of type 'kotlin.reflect.jvm.internal.KClassImpl' - maybe not public or not valid?
at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:217)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:104)
at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:91)
at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:53)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:89)
at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:83)
at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:83)
at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:83)
at org.springframework.expression.spel.ast.OpPlus.getValueInternal(OpPlus.java:83)
at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:109)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:328)
looki
08/19/2019, 11:23 AMtjb
08/20/2019, 2:10 PMtjb
08/20/2019, 2:10 PMmainClassName
need Kt
at the end?tjb
08/20/2019, 2:10 PMdiesieben07
08/20/2019, 2:11 PMFooKt
to contain any top-level functions of a file named foo.kt
. You can adjust this using @file:JvmName
if you wanttjb
08/20/2019, 2:12 PMtjb
08/20/2019, 2:14 PMtjb
08/20/2019, 2:17 PMRobert Menke
08/25/2019, 6:03 AMNoSuchBeanDefinitionException: No qualifying bean of type 'com.my.package.user.UserService' available
Lt. Templeton Peck
08/28/2019, 2:35 PM@ModelAttribute
rest controller methodLt. Templeton Peck
08/28/2019, 2:36 PM@RestController
class ParamController {
@GetMapping
@ResponseStatus(HttpStatus.OK)
fun query(@ModelAttribute query: ParamQuery) = query.ids1 + query.ids2
}
data class ParamQuery(
val ids1: Set<String> = setOf()
) {
var ids2: Set<String> = setOf()
}
Lt. Templeton Peck
08/28/2019, 2:37 PM@Test
fun `multiple params returns 4 entries`() {
mockMvc.perform(
MockMvcRequestBuilders.get("/v1")
.param("ids1", "A", "B")
.param("ids2", "C", "D")
.contentType(MediaType.APPLICATION_JSON)
)
.andExpect(status().isOk)
.andExpect(jsonPath("$.length()", equalTo(4)))
.andExpect(jsonPath("$[0]", equalTo("A")))
.andExpect(jsonPath("$[1]", equalTo("B")))
.andExpect(jsonPath("$[2]", equalTo("C")))
.andExpect(jsonPath("$[3]", equalTo("D")))
}
Lt. Templeton Peck
08/28/2019, 2:37 PM@Test
fun `multiple params comma-separated returns 4 entries`() {
mockMvc.perform(
MockMvcRequestBuilders.get("/v1")
.param("ids1", "A,B")
.param("ids2", "C,D")
.contentType(MediaType.APPLICATION_JSON)
)
.andExpect(status().isOk)
.andExpect(jsonPath("$.length()", equalTo(4)))
.andExpect(jsonPath("$[0]", equalTo("A")))
.andExpect(jsonPath("$[1]", equalTo("B")))
.andExpect(jsonPath("$[2]", equalTo("C")))
.andExpect(jsonPath("$[3]", equalTo("D")))
}
Lt. Templeton Peck
08/28/2019, 2:38 PM["A,B","C","D"]
Lt. Templeton Peck
08/28/2019, 2:39 PM["A","B","C","D"]
Lt. Templeton Peck
08/28/2019, 2:39 PMLt. Templeton Peck
08/28/2019, 2:45 PMcorneil
08/28/2019, 9:12 PM["A,B", "C,D"]
?Lt. Templeton Peck
08/28/2019, 10:49 PMLt. Templeton Peck
08/28/2019, 11:46 PM["A","B","C","D"]
is what they both should returnLt. Templeton Peck
08/29/2019, 5:37 AMParamQuery
was originally a Java class with default constructor with getter/setters. I converted it to a Kotlin data class with constructor params only and it broke the original behavior. Making the params properties of the data class restored the original behavior but that loses the niceness of a data class (equals/hash/copy). It should work the same so it seems like a bug?corneil
08/30/2019, 7:14 AM