본문 바로가기
728x90

분류 전체보기970

Spring batch - ItemReaders, ItemWriters and ItemStream All batch processing can be described in its most simple form as reading in large amounts of data, performing some type of calculation or transformation, and writing the result out. Spring Batch provides three key interfaces to help perform bulk reading and writing: ItemReader, ItemProcessor, and ItemWriter. ItemReader Although a simple concept, an ItemReader is the means for providing data from.. 2020. 12. 21.
Lombok features - @With Immutable 'setters' - methods that create a clone but with one changed field. @Wither was introduced as experimental feature in lombok v0.11.4. @Wither was renamed to @With, and moved out of experimental and into the core package, in lombok v1.18.10. Overview The next best alternative to a setter for an immutable property is to construct a clone of the object, but with a new value for this one f.. 2020. 12. 21.
Lombok features - @Synchronized synchronized done right: Don't expose your locks. Overview @Synchronized is a safer variant of the synchronized method modifier. Like synchronized, the annotation can be used on static and instance methods only. It operates similarly to the synchronized keyword, but it locks on different objects. The keyword locks on this, but the annotation locks on a field named $lock, which is private. If the.. 2020. 12. 21.
Lombok features - @NoArgsConstructor, @RequiredArgsConstructor, @AllArgsConstructor Constructors made to order: Generates constructors that take no arguments, one argument per final / non-null field, or one argument for every field. Overview This set of 3 annotations generate a constructor that will accept 1 parameter for certain fields, and simply assigns this parameter to the field. @NoArgsConstructor will generate a constructor with no parameters. If this is not possible (be.. 2020. 12. 21.
Lombok features - @EqualsAndHashCode Equality made easy: Generates hashCode and equals implementations from the fields of your object. Overview Any class definition may be annotated with @EqualsAndHashCode to let lombok generate implementations of the equals(Object other) and hashCode() methods. By default, it'll use all non-static, non-transient fields, but you can modify which fields are used (and even specify that the output of .. 2020. 12. 21.
Lombok features - @ToString No need to start a debugger to see your fields: Just let lombok generate a toString for you! Overview Any class definition may be annotated with @ToString to let lombok generate an implementation of the toString() method. By default, it'll print your class name, along with each field, in order, separated by commas. By setting the includeFieldNames parameter to true you can add some clarity (but .. 2020. 12. 21.
728x90