No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src service 및 domain test 추가 Oct 27, 2016
.gitignore Initial commit Oct 21, 2016
README.md Update README.md Jul 27, 2017
pom.xml service 및 domain test 추가 Oct 27, 2016

README.md

spring boot kotlin

Deploy

This is spring boot kotlin example.

Live Demo

https://spring-boot-kotlin-example.herokuapp.com

demo image1 demo image1

Login

ID : wonwoo

Password : 123

ID : user

Password : 456

How to run?

clone

# git clone https://github.com/wonwoo/spring-boot-kotlin-example.git

run

# mvn spring-boot:run

or

# mvn install
# java -jar target/spring-boot-kotlin-example-0.0.1-SNAPSHOT.jar

use

  1. kotlin 1.0.3
  2. Spring Boot 1.4.1
  3. JPA(hibernate) 5.0.11
  4. h2
  5. thymeleaf 3.0.0
  6. Spring Security 4.1.3

spring boot koilin sample code

Main sample

@SpringBootApplication
open class SpringBootKotlinExampleApplication constructor(val accountRepository: AccountRepository, val messageRepository: MessageRepository) : CommandLineRunner{
  override fun run(vararg p0: String?) {
    //.. some logic  
  }
}

fun main(args: Array<String>) {
  SpringApplication.run(SpringBootKotlinExampleApplication::class.java, *args)
}

Service sample

@Service
@Transactional
open class MessageService constructor(val messageRepository: MessageRepository){

  @Transactional(readOnly = true)
  open fun findAll() : List<Message> {
    return messageRepository.findAll()
  }
  // ... some logic 
}