Skip to content

Instantly share code, notes, and snippets.

View arahansa's full-sized avatar

arahansa arahansa

  • Seoul, South Korea
View GitHub Profile
@arahansa
arahansa / component 화 fragment.html
Created April 5, 2023 01:24
타임리프에서 input 요소같은 것들도 은근 변경되는 경우가 많아서, component화가 필요했었다는 설명
<!--/*
인풋 디스플레이 전용 요소
icon : 아이콘
name : 필드명
label : 플레이스 홀더 label
maxLength : 길이
*/-->
<!--/* BEGIN :: 일반 1,2단 폼 요소 */-->
<div class="form-input" th:fragment="writeNV(icon, formName, name, label, maxLength)">
<div class="ic-r-area"></div>
@arahansa
arahansa / test.js
Created November 27, 2020 17:54
test
test.df
/**
* [숫자][문자열]자바설명 (필수) (3~50글자)
*/
static class SilmuconDescriptor {
private boolean isRequired;
private TypeDescriptor typeDescriptor;
private LengthDescriptor lengthDescriptor;
private String comments;
private String name;
@arahansa
arahansa / MineSweeper.java
Created July 31, 2020 01:09
코딩도장용 지뢰찾기
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
public class CodingDojangMineSweeper {
@arahansa
arahansa / CIterator.java
Last active November 19, 2019 01:04
CPS 자바연습
package com.arahansa;
public class CIterator {
public static class Result{
boolean done;
Object value;
public Result(boolean done) {
this.done = done;
@arahansa
arahansa / ValidStringMatch.kt
Last active November 8, 2019 08:07
빈밸리데이션 크로스 필드 체크
import org.springframework.beans.BeanWrapperImpl
import javax.validation.Constraint
import javax.validation.ConstraintValidator
import javax.validation.ConstraintValidatorContext
import javax.validation.Payload
import kotlin.reflect.KClass
@Target(AnnotationTarget.CLASS)
@Constraint(validatedBy = [StringMatchValidator::class])
@arahansa
arahansa / FpJava.java
Last active November 17, 2017 04:46
함수형을 자바로
package chap02.chap02_6;
import chap02.chap02_5.PolyFuncJava;
import chap03.chap03_2.JavaList;
import chap10.Foldable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.BiFunction;
@arahansa
arahansa / gist:ce8879a27077ee9d98e7e1c185516359
Created September 2, 2017 13:19
정사각형 검색하기..
import java.util.ArrayList;
import java.util.List;
public class TryHelloWorld
{
static class Point{
int x,y;
public Point(int x, int y){
this.x = x;
@arahansa
arahansa / CustomLocaleResolver.java
Last active March 18, 2017 12:36
처음에는 AcceptHeaderLocaleResolver 로 한번 쿠키 설정된 이후로는 CookieLocaleResolver 로 동작하는 스프링 리졸버
public class CustomLocaleResolver extends CookieLocaleResolver {
public void setSupportedLocales(List<Locale> locales) {
this.supportedLocales.clear();
if (locales != null) {
this.supportedLocales.addAll(locales);
}
}
@Override
@arahansa
arahansa / SpringBootApp.java
Created March 2, 2017 11:27
스프링 컨트롤러 연습
@RequestMapping("/arahansa")
@RestController
static class TestController {
List<String> list = Arrays.asList("test,1,2,3,4,5,6,7".split(","));
// 접근가능한 주소 /arahansa/test
@GetMapping("/test")
public List<String> apiList() {
return list;
}