10
Kotlin + Spring Boot 2 Erik Pragt (@epragt)

Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

Kotlin +SpringBoot2

ErikPragt(@epragt)

Page 2: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

Meetup’sKotlin usage

Android

Backend

Page 3: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

WhyKotlin?

“SpringBootisabitmorecoolwithKotlin*”

*https://moelholm.com/2017/03/19/spring-boot-a-bit-more-cool-with-kotlin/

Page 4: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

Spring5

Page 5: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased
Page 6: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

Otherfeatures

• FunctionalbeandeclarationDSL(SPR-15755)• Arrayliterals• Null-safetyofSpringFrameworkAPI(SPR-15540)(JSR-305)

• Kotlin basedGradle buildconfiguration• Kotlin Scriptbasedtemplate

Page 7: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

FunctionalBeanDeclaration

Page 8: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

ArrayLiterals(Kotlin 1.2)

Page 9: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased

NullSafety(JSR305..ish)

• JSR305adds@NotNull etc infotoJavacode• HelpfulforIDE’s,toolslikeSonar,andKotlin

• Specneverimplementedfully

Page 10: Kotlin+ Spring Boot 2 - SYDspace · 14/08/2017  · “Spring Boot is a bit more cool with Kotlin* ... •Null-safety of Spring Framework API (SPR-15540) (JSR-305) •Kotlinbased