searching for a resource to build Microservices with Kafka server

Hi guys,

I will be joining a new company where we will build a project depends on Microservices Architecture with Kafka server (we will use Spring Boot as a framework)

I am looking for a good resource, since I have been searching for a while, but not able to find something that attracts my intention.

Any help ?

submitted by /u/mazzo77
[link] [comments]

Continue Reading searching for a resource to build Microservices with Kafka server

Trying to get property reference from a type given by function receiver

I’m making a builder for any class. It’s based on KProperty reflections and it works well for now, but I want to improve an interface of it. Here is an example of current usage:


data class Data( val nonDef: String, val defValue: String = "DEF_VALUE", val copyValue: String = nonDef, val nonDef2: String, val aMap: Map<String, String> = emptyMap(),

) val builtData = Builder<Data>() .assign(Data::aMap, mapOf(“key” to “value”)) .assign(Data::nonDef2, “10”) .assign(Data::nonDef, “10”) .build()

I don’t like, that I have to specify Data:: receiver for every property reference in assign method. Data class is already given as generic for Builder, so I can pass only reference with receiving Data class.

So, I want to make new function prettyAssign() with callable argument, where class reference receiver is passed as function receiver for callable, so I could address ::aMap, ::nonDef and ::nonDef2 to implicit ‘this’. Here how it would look like:


class Builder&lt;T : Any&gt;(val kClass: KClass&lt;T&gt;) { fun &lt;K&gt; assign(prop: KProperty1&lt;T, K&gt;, value: K) : Builder&lt;T&gt; = TODO("doing all reflection magic here") fun &lt;K&gt; prettyAssign(call: KClass&lt;T&gt;.() -&gt; Pair&lt;KProperty1&lt;T, K&gt;, K&gt;) { val (prop, value) = call(kClass) return assign(prop, value) } } val builtData = DataBuilder&lt;Data&gt;() .prettyAssign { ::aMap to mapOf("key" to "value") } .prettyAssign { ::nonDef2 to "10" } .prettyAssign { ::nonDef to "10" } .build()

In that approach it doesn’t work, because KClass<T> doesn’t have references to T properties.

So, I don’t understand, is there a way to make prettyAssign() working

submitted by /u/stasmarkin
[link] [comments]

Continue Reading Trying to get property reference from a type given by function receiver

Can we fix the documentation layout? Specifically the standard lib section?

The layout of the STD LIB docs is so shitty it hurts. There are no collapsable sections once you enter into a package. Why can’t it be laid out like the JavaDocs? Trying to find something on the page requires you to scroll half a mile to find the sub-heading you’re even looking for. Entire sections should be collapsable at least on the subheading

submitted by /u/intelinvestor8
[link] [comments]

Continue Reading Can we fix the documentation layout? Specifically the standard lib section?

Unable to create a simple project following the Spring Guide tutorial

This is the tutorial in Java: https://spring.io/guides/gs/validating-form-input/

I cloned the above repo and ran in local and it is working fine.

I’m trying to create the same with Kotlin. Project Link: https://github.com/imranpasha-tech/Kotlin-springweb-thymeleaf-example

This project is also working except it is unable to catch errors and forward them to view.

So, when I try to insert Null values against the allowed values it is supposed to show the validation errors on the form. But that is being redirected to 404

Entering empty/null values here

This empty form should be validated as shown in the tutorial. However, it is not working as expected. Instead it is being redirected to:

Not supposed to happen

Origin tutorial screenshots:

from original tutorial in java working fine.

submitted by /u/hitherto_insignia
[link] [comments]

Continue Reading Unable to create a simple project following the Spring Guide tutorial

End of content

No more pages to load