ziad
07/27/2017, 10:08 AMpoohbar
07/27/2017, 4:42 PMspring-boot-configuration-processor
on my classpath but it does not generate the metadata on rebuild or recompile. Any way to debug why it won't do it?thisen
07/27/2017, 9:11 PM@Repository
or should I wrap the respository in a @service
?thisen
07/27/2017, 9:12 PMthisen
07/27/2017, 9:12 PMthisen
07/27/2017, 9:20 PMagomez
07/27/2017, 9:56 PMagomez
07/27/2017, 9:57 PMdharrigan
07/28/2017, 10:22 AMdharrigan
07/28/2017, 10:23 AMssouris
07/28/2017, 1:25 PMMessage<Object>
in Java I supposedharrigan
07/28/2017, 1:28 PMgdrouet
07/31/2017, 7:50 AMjava.lang.NoClassDefFoundError: kotlin/reflect/full/KClasses
in my unit tests. Kotlin version is 1.1.2-5
, I tried the latest but it does not change the result, is there any breaking change that I can fix?gdrouet
07/31/2017, 8:36 AMkotlin-reflect
artifact as dependency now.strelok
08/01/2017, 2:45 AMlateinit var
can't be used as it can't be a nullable type I don't want to use Optional
as it doesn't seem the "kotlin way". Basically what would be the kotlin way for the following pure code:
public class Component {
public Component(Required required, Optional<NotRequired> optional) {....}
}
or alternatively the OLD spring annotated way
public class Component {
@Autowired(required=false) NotRequired optional;
public Component(Required required) {....}
}
strelok
08/01/2017, 3:49 AMclass Component(private val required:Required) {
@Autowired(required = false) private var optional: NotRequired? = null
}
fitzoh
08/01/2017, 3:52 AMstrelok
08/01/2017, 3:53 AMnull
it is a considered a default parameter value and Kotlin compiler will generate multiple constructorsstrelok
08/01/2017, 3:54 AMfitzoh
08/01/2017, 3:54 AMfitzoh
08/01/2017, 4:01 AM@Configuration
@SpringBootApplication
class DemoApplication {
@Bean
fun stringBean() : String? = null
}
@Component
class Runner(val whatever: Whatever) : CommandLineRunner {
override fun run(vararg p0: String?) {
whatever.hello()
}
}
fun main(args: Array<String>) {
SpringApplication.run(DemoApplication::class.java, *args)
}
@Component
class Whatever(val thing: String?) {
fun hello() = println("hello ${thing ?: "world"}")
}
strelok
08/01/2017, 4:06 AMfitzoh
08/01/2017, 4:07 AMstrelok
08/01/2017, 4:11 AMprivate var optional: NotRequired?
as constructor parameter it didn't work. I'm struggling to understand how val
makes a difference. I will test it out shortly.strelok
08/01/2017, 4:22 AMstrelok
08/01/2017, 4:23 AMParameter 1 of constructor .... required a bean of type `java.lang.String` that could not be found
strelok
08/01/2017, 4:24 AM@Bean
fun stringBean() : String? = null
from your codestrelok
08/01/2017, 4:25 AMsdeleuze
08/01/2017, 12:15 PM