This is spring boot kotlin example.
https://spring-boot-kotlin-example.herokuapp.com
ID : wonwoo
Password : 123
ID : user
Password : 456
# git clone https://github.com/wonwoo/spring-boot-kotlin-example.git
# cd web or webflux
# mvn spring-boot:run
or
# cd web or webflux
# mvn install
# java -jar target/${name}.jar
- kotlin 1.3.50
- Spring Boot 2.2.x
- JPA(hibernate) 5.4.8
- h2
- thymeleaf 3.0.11
- Spring Security 5.2.1
@SpringBootApplication
class SpringBootKotlinExampleApplication(private val accountRepository: AccountRepository,
                                         private val messageRepository: MessageRepository) : CommandLineRunner {
  override fun run(vararg p0: String?) {
    //.. some logic  
  }
}
fun main(args: Array<String>) {
    runApplication<SpringBootKotlinExampleApplication>(*args)
}@Service
@Transactional
class MessageService constructor(val messageRepository: MessageRepository){
  @Transactional(readOnly = true)
  fun findAll() : List<Message> {
    return messageRepository.findAll()
  }
  // ... some logic 
}
