-
Kubernetes(μΏ λ²λ€ν°μ€)μ Docker(λ컀)μ κ΄κ³λ **“κ²½μ κ΄κ³"κ° μλλΌ “μνΈ λ³΄μμ μΈ κ΄κ³”**μ λλ€. μ΄ λμ μ°¨μ΄λ₯Ό λͺ νν μ΄ν΄νκΈ° μν΄ κ°μ₯ μ¬μ΄ λΉμ λ₯Ό λ€μ΄ μ€λͺ ν΄ λλ¦¬κ² μ΅λλ€.
1. ν΅μ¬ λΉμ : νλ¬Όμ κ³Ό νλ§ μμ€ν
μ΄ λ κΈ°μ μ κ΄κ³λ₯Ό λ¬Όλ₯ μμ€ν μ λΉμ νλ©΄ μμ£Ό λͺ νν΄μ§λλ€.
-
Docker (컨ν μ΄λ): **‘κ·κ²©νλ νλ¬Ό 컨ν μ΄λ λ°μ€’**μ λλ€.
-
물건(μ ν리μΌμ΄μ μ½λ, λΌμ΄λΈλ¬λ¦¬ λ±)μ λ°μ€μ λ΄μ ν¬μ₯νλ κΈ°μ μ λλ€.
-
μ΄ λ°μ€λ§ μμΌλ©΄ μ΄λ€ λ°°(μλ²)λ νΈλ(λ ΈνΈλΆ)μ μ€μ΄λ λ΄μ©λ¬Όμ΄ μμ νκ² μ λ¬λ©λλ€.
-
Kubernetes (μ‘°νμ/νλ§ κ΄λ¦¬μ): **‘μμ² κ°μ 컨ν μ΄λλ₯Ό κ΄λ¦¬νλ μμ€ν ’**μ λλ€.
-
컨ν μ΄λκ° λ°°μ μ μ€λ Έλμ§, λ°°κ° νλ€λ € 컨ν μ΄λκ° λ¨μ΄μ§λ©΄(μλ¬ λ°μ) λ€μ μ€μ΄μ£Όλμ§, νλ¬Όμ΄ λ§μμ§λ©΄ λ°°λ₯Ό λ λΆλ₯Όμ§(μ€μΌμΌλ§)λ₯Ό κ²°μ ν©λλ€.
CreatedTue, 06 Jan 2026 10:30:03 +0900 -
-
λ΅
import java.util.ArrayList; // 30. κ°λ¨ν μ λμ¨ νμΈλ μκ³ λ¦¬μ¦ κ΅¬ννκΈ° public class Solution30 { private static int[] parent; private static int findRootNode(int x) { if (parent[x] == x) { return x; } parent[x] = findRootNode(parent[x]); return parent[x]; } private static void union(int x, int y) { int root1 = findRootNode(x); int root2 = findRootNode(y); parent[root2] = root1; } public static Boolean[] solution(int k, int[][] operations) { parent = new int[k]; for (int i = 0; i < k; i++) { parent[i] = i; } ArrayList<Boolean> answer = new ArrayList<>(); for (int[] op : operations) { if (op[0] == 0) { union(op[1], op[2]); } else { answer.add(findRootNode(op[1]) == findRootNode(op[2])); } } return answer.toArray(new Boolean[0]); } }μ½λμμ
return answer.toArray(new Boolean[0]);ꡬ문μArrayList<Boolean>νμ μΈanswerλ₯ΌBoolean[]λ°°μ΄λ‘ λ³ννμ¬ λ°ννλ μν μ ν©λλ€.CreatedMon, 29 Dec 2025 09:37:03 +0900 -
νλ‘κ·Έλ¨μΌλ‘ νμΈνκΈ°.
λ°©λ² 1: μ§μ λ§λ μ€ν¬λ¦½νΈ (μμ‘΄μ± μμ)
chmod +x scan-secrets.sh ./scan-secrets.shλ°©λ² 2: gitleaks μ¬μ© (λ μ νν¨, κΆμ₯)
# gitleaks μ€μΉ brew install gitleaks # λλ apt install gitleaks # κ° λ ν¬μμ μ€ν git clone git@github.com:dev-minimalism/kr-canslim-notifier.git cd kr-canslim-notifier gitleaks detect --source . --verbose # μ 체 νμ€ν 리 ν¬ν¨ gitleaks detect --source . --verbose --log-opts="--all"λ°©λ² 3: truffleHog (μνΈλ‘νΌ κΈ°λ° νμ§)
pip install truffleHog truffleHog git git@github.com:dev-minimalism/kr-canslim-notifier.git --since_commit HEAD~100νΉμ νμ€ν 리 λ€ λ λ €λ²λ¦¬κ³ μ΄κΈ°ν νκΈ°
git checkout --orphan latest_branch git add . git commit -m "initial commit after reset" git branch -D main git branch -m main git push -f origin mainνΉμ νμΌλ§ νμ€ν 리μμ μμ ν μμ κΈ° (.envμ μ)
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch .env" --prune-empty --tag-name-filter cat -- --allCreatedWed, 17 Dec 2025 11:16:03 +0900 -
SDKMANμ ν΅μ¬μ **“μ€μΉ(Install) -> μ ν(Switch) -> νμΈ(Check)”**μ νλ¦μ λλ€. κ°μ₯ μμ£Ό μ°λ λͺ λ Ήμ΄ μμ£Όλ‘ κΉλνκ² μ λ¦¬ν΄ λλ¦¬κ² μ΅λλ€.
1. μ€μΉ κ°λ₯ν λ²μ λͺ©λ‘ 보기 (
list)λ¨Όμ μ΄λ€ λ²μ μ μ€μΉν μ μλμ§ νμΈν΄μΌ ν©λλ€.
sdk list java- νλ©΄ μ‘°μ: λͺ©λ‘μ΄ κΈΈκ² λμ΅λλ€.
Space(λ€μ νμ΄μ§),Enter(ν μ€ μλ),q(λκ°κΈ°) ν€λ₯Ό κΈ°μ΅νμΈμ. - μλ³μ(Identifier): 맨 μ€λ₯Έμͺ½ μ΄μ μλ ν
μ€νΈκ° μ€μν©λλ€. (μ:
24-open,17.0.10-temλ±) μ€μΉν λ μ΄ μ΄λ¦μ μ¬μ©ν©λλ€.
2. λ²μ μ€μΉνκΈ° (
install)μνλ λ²μ μ μλ³μ(Identifier)λ₯Ό μ λ ₯νμ¬ μ€μΉν©λλ€.
CreatedMon, 08 Dec 2025 08:49:54 +0900 - νλ©΄ μ‘°μ: λͺ©λ‘μ΄ κΈΈκ² λμ΅λλ€.
-
IT κ°λ°μμ Aggregate ν¨ν΄κ³Ό Bulkhead ν¨ν΄μ λͺ¨λ **λ§μ΄ν¬λ‘μλΉμ€ μν€ν μ²(MSA)**λ λΆμ° μμ€ν μμ μμ£Ό μ¬μ©λλ **μ€κ³ ν¨ν΄(Design Pattern)**μ λλ€. κ°κ°μ λͺ©μ μ λ€λ₯΄μ§λ§, μμ€ν μμ μ±κ³Ό μλ΅ ν¨μ¨μ λμ΄κΈ° μν κ³΅ν΅ λͺ©νλ₯Ό κ°μ§λλ€. μλμμ μμΈν μ€λͺ λ릴κ²μ.
π§© 1. Aggregate ν¨ν΄
π‘ κ°λ
Aggregate ν¨ν΄μ **λλ©μΈ μ£Όλ μ€κ³(DDD: Domain-Driven Design)**μμ λ±μ₯νλ κ°λ μΌλ‘, λ°μ΄ν°μ μΌκ΄μ±κ³Ό λ³κ²½ λ¨μλ₯Ό μ μνκΈ° μν ꡬ쑰μ λλ€. μ¦, κ΄λ ¨λ μν°ν°(Entity)μ κ° κ°μ²΄(Value Object)λ₯Ό νλμ **μ§ν©(Aggregate)**μΌλ‘ λ¬Άκ³ , κ·Έ μ§ν©μ μΌκ΄μ±μ μ± μμ§λ λ£¨νΈ μν°ν°λ₯Ό Aggregate RootλΌκ³ λΆλ¦ λλ€.
CreatedTue, 11 Nov 2025 10:16:50 +0900 -
Javaλ λ©ν° ν¨λ¬λ€μ μΈμ΄μΈκ°?
Javaλ λ©ν° ν¨λ¬λ€μ μΈμ΄λΌκ³ ν μ μμ΅λλ€. νΉν Java 8 μ΄νλ‘λ λμ± λͺ νν΄μ‘μ΅λλ€. μ΄κΈ°μλ “μμν” κ°μ²΄μ§ν₯ μΈμ΄λ₯Ό λͺ©νλ‘ νμ§λ§, μκ°μ΄ μ§λλ©΄μ λ€μν νλ‘κ·Έλλ° ν¨λ¬λ€μμ μμ©νκ² λμμ΅λλ€.
Javaκ° μ§μνλ νλ‘κ·Έλλ° ν¨λ¬λ€μ
1. κ°μ²΄μ§ν₯ νλ‘κ·Έλλ° (OOP) - ν΅μ¬ ν¨λ¬λ€μ
// ν΄λμ€, μμ, μΊ‘μν, λ€νμ± public class Animal { private String name; public void makeSound() { System.out.println("Some sound"); } } public class Dog extends Animal { @Override public void makeSound() { System.out.println("Woof!"); } }2. λͺ λ Ήν νλ‘κ·Έλλ° (Imperative)
// μν λ³κ²½κ³Ό μ μ΄ νλ¦μ λͺ μμ μΌλ‘ μμ± public static int factorial(int n) { int result = 1; for (int i = 1; i <= n; i++) { result *= i; // μν λ³κ²½ } return result; }3. ν¨μν νλ‘κ·Έλλ° (Functional) - Java 8+
import java.util.*; import java.util.function.*; import java.util.stream.*; public class FunctionalExample { public static void main(String[] args) { // 1. λλ€ ννμκ³Ό κ³ μ°¨ ν¨μ Function<Integer, Integer> square = x -> x * x; Function<Integer, Integer> addOne = x -> x + 1; // ν¨μ ν©μ± Function<Integer, Integer> squareThenAdd = square.andThen(addOne); System.out.println(squareThenAdd.apply(3)); // 10 // 2. λΆλ³μ±κ³Ό μμ ν¨μ List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); List<Integer> doubled = numbers.stream() .map(n -> n * 2) // μλ³Έμ λ³κ²½νμ§ μμ .collect(Collectors.toList()); // 3. ν¨μλ₯Ό νλΌλ―Έν°λ‘ μ λ¬ calculate(10, 5, (a, b) -> a + b); // 15 calculate(10, 5, (a, b) -> a * b); // 50 } static void calculate(int x, int y, BinaryOperator<Integer> operation) { System.out.println(operation.apply(x, y)); } }4. μ λ€λ¦ νλ‘κ·Έλλ° (Generic)
// νμ νλΌλ―Έν°λ₯Ό μ¬μ©ν μΌλ°ν public class Box<T> { private T content; public void set(T content) { this.content = content; } public T get() { return content; } } // μ λ€λ¦ λ©μλ public static <T extends Comparable<T>> T findMax(List<T> list) { return list.stream() .max(Comparable::compareTo) .orElse(null); }5. λμμ±/λ³λ ¬ νλ‘κ·Έλλ° (Concurrent/Parallel)
import java.util.concurrent.*; public class ConcurrentExample { public static void main(String[] args) throws Exception { // CompletableFutureλ₯Ό μ¬μ©ν λΉλκΈ° νλ‘κ·Έλλ° CompletableFuture<String> future1 = CompletableFuture .supplyAsync(() -> fetchDataFromAPI1()); CompletableFuture<String> future2 = CompletableFuture .supplyAsync(() -> fetchDataFromAPI2()); // λ μμ μ κ²°ν© CompletableFuture<String> combined = future1 .thenCombine(future2, (result1, result2) -> result1 + " " + result2); System.out.println(combined.get()); } }6. λ°μν νλ‘κ·Έλλ° (Reactive) - λΌμ΄λΈλ¬λ¦¬ μ¬μ©
// RxJava λλ Project Reactor μ¬μ© μμ Flux.just(1, 2, 3, 4, 5) .filter(n -> n % 2 == 0) .map(n -> n * 2) .subscribe(System.out::println);λ€μν ν¨λ¬λ€μμ νΌν©ν μ€μ μμ
import java.util.*; import java.util.concurrent.*; import java.util.stream.*; // OOP: ν΄λμ€μ μΈν°νμ΄μ€ μ μ interface DataProcessor<T> { CompletableFuture<List<T>> process(List<T> data); } public class HybridExample implements DataProcessor<Integer> { private final ExecutorService executor = Executors.newFixedThreadPool(4); @Override public CompletableFuture<List<Integer>> process(List<Integer> data) { // ν¨μν + λμμ± νλ‘κ·Έλλ° return CompletableFuture.supplyAsync(() -> data.parallelStream() // λ³λ ¬ μ²λ¦¬ .filter(n -> n > 0) // ν¨μν: νν°λ§ .map(this::complexCalculation) // λ©μλ μ°Έμ‘° .sorted() // μ λ ¬ .collect(Collectors.toList()), executor ); } // λͺ λ Ήν μ€νμΌμ 볡μ‘ν κ³μ° private Integer complexCalculation(Integer n) { int result = n; for (int i = 0; i < 3; i++) { result = result * 2 + 1; } return result; } public static void main(String[] args) throws Exception { HybridExample processor = new HybridExample(); List<Integer> data = Arrays.asList(1, -2, 3, 4, -5, 6); // λΉλκΈ° μ²λ¦¬ μμ CompletableFuture<List<Integer>> future = processor.process(data); // μ½λ°± μ²΄μΈ (ν¨μν) future.thenApply(result -> { System.out.println("μ²λ¦¬ κ²°κ³Ό: " + result); return result; }) .thenAccept(result -> { // κ²°κ³Ό νμ© int sum = result.stream().mapToInt(Integer::intValue).sum(); System.out.println("ν©κ³: " + sum); }) .get(); // μλ£ λκΈ° processor.executor.shutdown(); } }Javaμ λ©ν° ν¨λ¬λ€μ νΉμ§
μ₯μ
- μ μ§μ λμ : κΈ°μ‘΄ OOP μ½λλ² μ΄μ€μ ν¨μν μμλ₯Ό μ μ§μ μΌλ‘ λμ κ°λ₯
- μ μ°μ±: λ¬Έμ μ κ°μ₯ μ ν©ν ν¨λ¬λ€μ μ ν κ°λ₯
- μνκ³: λ€μν μ€νμΌμ λΌμ΄λΈλ¬λ¦¬μ νΈν
νκ³
- μμ νμ§ μμ ν¨μν: λΆλ³μ±μ΄ μΈμ΄ μ°¨μμμ κ°μ λμ§ μμ
- νΌμ¬λ μ€νμΌ: μ¬λ¬ ν¨λ¬λ€μμ΄ μμ¬ μΌκ΄μ± μ μ§κ° μ΄λ €μΈ μ μμ
- νμ΅ κ³‘μ : λͺ¨λ ν¨λ¬λ€μμ ν¨κ³Όμ μΌλ‘ μ¬μ©νλ €λ©΄ νμ΅μ΄ νμ
κ²°λ‘
Javaλ “μ€μ©μ μΈ” λ©ν° ν¨λ¬λ€μ μΈμ΄μ λλ€. μμν ν¨μν μΈμ΄(Haskell)λ μμν κ°μ²΄μ§ν₯ μΈμ΄(Smalltalk)μ λ¬λ¦¬, Javaλ μ€μ©μ±μ μ€μνλ©° μ¬λ¬ ν¨λ¬λ€μμ μ₯μ μ μ νμ μΌλ‘ νμ©ν μ μκ² μ€κ³λμμ΅λλ€. νΉν Java 8 μ΄νλ‘λ νλμ μΈ νλ‘κ·Έλλ° ν¨λ¬λ€μμ μ κ·Ήμ μΌλ‘ μμ©νκ³ μμ΄, μ§μ ν λ©ν° ν¨λ¬λ€μ μΈμ΄λ‘ μ§ννλ€κ³ λ³Ό μ μμ΅λλ€.
CreatedMon, 20 Oct 2025 13:50:50 +0900