본문 바로가기

전체 글

(22)
Kotlin 기본 문법 따라하기 - 5. Data classes Kotlin 기본 문법 따라하기 https://kotlinlang.org/docs/reference/data-classes.html Data Classes - Kotlin Programming Language kotlinlang.org package com.kotlintest.test class MainDtClass { fun main() { var ssing = User("ssing", 10) println("ssing : ${ssing.toString()}") var kim = ssing.copy(name = "kim") println("kim : ${kim.toString()}") val lee = User1("lee"); lee.age = 10 println("lee : ${lee.toString..
Kotlin 기본 문법 따라하기 - 4. Properties and fields Kotlin 기본 문법 따라하기 https://kotlinlang.org/docs/reference/properties.html Properties and Fields: Getters, Setters, const, lateinit - Kotlin Programming Language kotlinlang.org package com.kotlintest.test class MainProClass() { fun main() { var address = Address() println("city : ${address.city} - ${address.isSeoul}") address.city = "Seoul" println("city : ${address.city} - ${address.isSeoul}") pri..
Kotlin 기본 문법 따라하기 - 3. Class Kotlin 기본 문법 따라하기 https://kotlinlang.org/docs/reference/classes.html Classes and Inheritance - Kotlin Programming Language kotlinlang.org package com.kotlintest.test import com.sun.tools.doclets.internal.toolkit.util.DocPath.parent class MainClzClass() { fun main() { val person1 = Person("kim"); println("person1 : ${person1.name} ${person1.age} ${person1.birthday}") val person2 = Person("lee", 1..
Kotlin 기본 문법 따라하기 - 2. BasicType Kotlin 기본 문법 따라하기 https://kotlinlang.org/docs/reference/basic-types.html Basic Types: Numbers, Strings, Arrays - Kotlin Programming Language kotlinlang.org package com.kotlintest.test import java.awt.SystemColor.text import javax.xml.bind.DatatypeConverter.printDouble class BasicType { fun main() { val one = 1 // Int val threeBillion = 3000000000 // Long val oneLong = 1L // Long val oneByte: Byt..
Kotlin 기본 문법 따라하기 - 1. Basic Syntax Kotlin 기본 문법 따라하기 https://kotlinlang.org/docs/reference/basic-syntax.html Basic Syntax - Kotlin Programming Language kotlinlang.org package com.kotlintest.test import java.lang.Integer.parseInt class BasicSyntax{ fun main() { println("Hello Kotlin") println("sum(1, 2) : ${sum(1, 2)}") println("sumOneLine(3, 4) : ${sumOneLine(3, 4)}") printSum(5, 6) variable() println("maxOf(7, 8) : ${maxOf(7, 8)..
Kotlin - SpringBoot + Kotlin 프로젝트 생성 1. 프로젝트 생성 1-1. IntelliJ > New Project > Spring Initializr 1-2. Project Metadata Group : com.springboot.kotlin Artifact : springboot-kotlin Type : Maven Project Language : Kotlin Package : com.kotlintest 1-3. Dependency Spring Web Thymeleaf 1-4. pom.xml 4.0.0 org.springframework.boot spring-boot-starter-parent 2.2.4.RELEASE com.springboot.kotlin springboot-kotlin 0.0.1-SNAPSHOT springboot-kotlin..
Rabbit MQ - RAM Node Server 구성 1. RabbitMQ 의존 라이브러리 설치 erlang 설치 $ sudo wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo $ sudo yum install erlang 2. RabbitMQ 설치 2-1. rabbitmq-server 설치 $ sudo wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.5/rabbitmq-server-3.3.5-1.noarch.rpm $ sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc $ sud..
Rabbit MQ - Master Server 구성 1. RabbitMQ 의존 라이브러리 설치 erlang 설치 $ sudo wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo $ sudo yum install erlang 2. RabbitMQ 설치 2-1. rabbitmq-server 설치 $ sudo wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.3.5/rabbitmq-server-3.3.5-1.noarch.rpm $ sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc $ sud..