kotlin-logging에서 logger를 선언하는 방법은 2가지로 정리할 수 있다.
import io.github.oshai.kotlinlogging.KotlinLogging
private val logger = KotlinLogging.logger {} // 로거를 클래스 밖에 두는 방법| import jakarta.persistence.Column | |
| import jakarta.persistence.Entity | |
| import jakarta.persistence.GeneratedValue | |
| import jakarta.persistence.GenerationType | |
| import jakarta.persistence.Id | |
| import java.util.Objects | |
| @Table( | |
| uniqueConstraints = [ | |
| UniqueConstraint(name = "udx_name_email", columnNames = ["name", "email"]), |
| import jakarta.persistence.Column | |
| import jakarta.persistence.EntityListeners | |
| import jakarta.persistence.MappedSuperclass | |
| import org.springframework.data.annotation.CreatedBy | |
| import org.springframework.data.annotation.CreatedDate | |
| import org.springframework.data.annotation.LastModifiedBy | |
| import org.springframework.data.annotation.LastModifiedDate | |
| import org.springframework.data.jpa.domain.support.AuditingEntityListener | |
| import java.time.LocalDateTime | |
| import java.time.ZoneOffset |
| ### Querydsl | |
| /src/main/generated |
| import org.springframework.boot.context.properties.ConfigurationProperties; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver; | |
| @Configuration | |
| public class ThymeleafConfig { | |
| @Bean | |
| public SpringResourceTemplateResolver thymeleafTemplateResolver( |
| package com.example.bootdemo; | |
| import io.swagger.models.parameters.AbstractSerializableParameter; | |
| import io.swagger.models.properties.BaseIntegerProperty; | |
| import org.junit.jupiter.api.AfterEach; | |
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.Test; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.PrintStream; |
| package com.your.project.config; | |
| import com.zaxxer.hikari.HikariDataSource; | |
| import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; | |
| import org.springframework.boot.context.properties.ConfigurationProperties; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.context.annotation.Primary; | |
| import javax.sql.DataSource; |
| # Credit http://stackoverflow.com/a/2514279 | |
| for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
| #!/bin/bash | |
| # save this file as tailc then | |
| # run as: $ tailc logs/supplier-matching-worker.log Words_to_highlight | |
| file=$1 | |
| if [[ -n "$2" ]]; then | |
| color=' | |
| // {print "\033[37m" $0 "\033[39m"} | |
| /(WARN|WARNING)/ {print "\033[1;33m" $0 "\033[0m"} | |
| /(ERROR|CRIT)/ {print "\033[1;31m" $0 "\033[0m"} |
| package my.controllertest.controller; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| /** | |
| * 이 문제의 수동 테스트 결과는 "/path/home" 이다.<br> | |
| * 1. 자식클래스의 "path"가 부모 클래스나 인터페이스를 override했기 때문.<br> | |
| * 2. 자식클래스 "path"를 제거할 경우 답은 "/if/home" 이다.<br> | |
| * 3. 자식 인터페이스 "if"를 제거할 경우 답은 "/superif/home"<br> |