목록전체 글 (27)
0gam
+---------------------------+ High Address| Command-Line Args | (OS 관리)+---------------------------+| Stack | ↓ 함수 호출 시 Push+---------------------------+| Heap | ↑ 동적 메모리 증가+---------------------------+| Initialized Data (Data) || Uninitialized Data (BSS)|+---------------------------+| Text (Code) |+---------------------------+ L..
Docker to start charging for Docker Desktop... containerd & Lima: Open source alternative to Docker for Mac https://medium.com/nttlabs/containerd-and-lima-39e0b64d2a59 containerd & Lima: Open source alternative to Docker for Mac Today, the community was shocked by the sudden news that Docker Desktop for Mac/Win is no longer free [-as-in-beer] for “professional use… medium.com Lima: Linux virtual..
https://stackoverflow.com/questions/45200585/using-kafka-connect-howto-commit-offsets-as-soon-as-a-put-is-completed-in-si Using Kafka Connect HOWTO "commit offsets" as soon as a "put" is completed in SinkTask I am using Kafka Connect to get messages from a Kafka Broker (v0.10.2) and then sync it to a downstream service. Currently, I have code in SinkTask#put that will process the SinkRecord & th..
A Quick Refresher on SOLID SOLID is an acronym for a set of five software development principles, which if followed, are intended to help developers create flexible and clean code. The five principles are: The Single Responsibility Principle — Classes should have a single responsibility and thus only a single reason to change. The Open/Closed Principle — Classes and other entities should be open..
JPA Cascade TypesThe cascade types supported by the Java Persistence Architecture are as below:CascadeType.PERSIST : means that save() or persist() operations cascade to related entities.CascadeType.MERGE : means that related entities are merged when the owning entity is merged.CascadeType.REFRESH : does the same thing for the refresh() operation.CascadeType.REMOVE : removes all related entities..
Spring Framework provides following ways to help us achieving robust exception handling.Controller Based – We can define exception handler methods in our controller classes. All we need is to annotate these methods with @ExceptionHandler annotation. This annotation takes Exception class as argument. So if we have defined one of these for Exception class, then all the exceptions thrown by our req..
This example-driven tutorial gives an in-depth overview about Java 8 streams. When I first read about the Stream API, I was confused about the name since it sounds similar to InputStream and OutputStream from Java I/O. But Java 8 streams are a completely different thing. Streams are Monads, thus playing a big part in bringing functional programming to Java:In functional programming, a monad is a..
@ComponentScanIf you understand component scan, you understand Spring.Spring is a dependency injection framework. It is all about beans and wiring in dependencies.The first step of defining Spring Beans is by adding the right annotation - @Component or @Service or @Repository.However, Spring does not know about the bean unless it knows where to search for it.This part of “telling Spring where to..
import java.util.Arrays; import java.util.Properties; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; public class ConsumerSample { public static void main(String[] args) { Properties props = new Properties(); props.put("bootstrap.servers", "203.251.177.28:9092"); props.put(..
package kafka.book.producer; import java.util.Properties; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.log4j.BasicConfigurator; /** * Hello world! * */ public class KafkaClientsProducerSample { public static void main(String[] args) { BasicConfigurator.configur..