Skip to content

Instantly share code, notes, and snippets.

View key-del-jeeinho's full-sized avatar
👋
Hello World!

지인호 [Raul] key-del-jeeinho

👋
Hello World!
View GitHub Profile

Certainly! Here is a detailed deployment plan for the API:

  1. Choose a hosting platform: There are many hosting platforms available, such as AWS, Azure, and Google Cloud. Choose a platform that meets your requirements and budget.

  2. Set up a virtual machine: Create a virtual machine on the hosting platform and install a suitable operating system, such as Ubuntu.

  3. Install dependencies: Install Java, Kotlin, and any other dependencies required to run the API.

  4. Deploy the API: Build the API using the ./gradlew build command, then copy the resulting jar file to the virtual machine and run it using the java -jar command.

Certainly! Here is an example of unit tests for the API using Kotest:

import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
import io.kotest.spring.SpringAutowireConstructorExtension
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.http.MediaType
import org.springframework.test.web.servlet.MockMvc

Certainly! Here is an example of an API for managing accounts using Kotlin, Spring Boot, the clean architecture principles, and DTOs (data transfer objects) to decouple the service and controller layers from the entity layer:

First, let's define the Account entity and the AccountRepository interface:

import javax.persistence.*

@Entity
@Table(name = "accounts")
data class Account(
        @Id

Certainly! Here is an example of an API for managing accounts using Kotlin, Spring Boot, and the clean architecture principles, with a MySQL database running on localhost:3306:

First, let's define theAccount entity and the AccountRepository interface:

import javax.persistence.*

@Entity
@Table(name = "accounts")
data class Account(

Sure, here is an example of a simple API for managing accounts using Kotlin and Spring Boot:

import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/accounts")
class AccountController {
@key-del-jeeinho
key-del-jeeinho / Main.java
Created December 26, 2021 10:58
[알고리즘 - 백준] 1009 분산처리 최적화 관련 질문
//package baekjoon._1000_9999번대._1000번대._1009_분산처리.지인호;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int caseCnt = 0; caseCnt < t; caseCnt++) {
@key-del-jeeinho
key-del-jeeinho / Main.java
Created December 24, 2021 13:04
[알고리즘 - 백준] 1003 피보나치 함수 Wrong Answer 질문
//package baekjoon._1000_9999번대._1000번대._1003_피보나치_함수.지인호;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static int[] dp = new int[40];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);