Stream, a new feature of java8

The beginning of experience First, define a dish class: Dish public class Dish {     private final String name;     private final boolean vegetarian;     private final int calories;     private final Type type;          public boolean isVegetarian() {         return vegetarian;     }          //Omit the set, get, toString me ...

Posted by VirtualOdin on Fri, 04 Mar 2022 07:15:33 +0100

GoFrame framework: log configuration management

introduce Through a complete example, in gogf/gf Manage logs reasonably in the framework. What are the usage scenarios? Log auto scroll Split into multiple log files Log format modification wait We will use rk-boot To start gogf/gf Microservices of the framework. Please visit the following address for a complete tut ...

Posted by jazz_snob on Thu, 20 Jan 2022 22:35:11 +0100

If you don't know how to use the Consumer interface, come to the company and I'll tell you face to face

background Yes, I'm still working on the XXXX project and interfacing with a third party. The difference is that this time I deal with my own business logic. During the development process, I encountered such a problem: Table structure: A main table A and an associated table B. table A stores the record status of table B. Scenario: Step 1: ...

Posted by drkstr on Tue, 14 Dec 2021 04:43:05 +0100

Original SpringBoot practice: how to use Optional

Optional is also one of the new features of Java 8. It is used to handle the null pointer problem and can be used gracefully in the return and processing of the application query interface Impl. The official definition is: The Optional class is a null able container object. If the value exists, the isPresent() method will return true, and c ...

Posted by wanted420 on Wed, 08 Sep 2021 11:41:30 +0200