Folder size in terminal

Posted on by Kim

sudo du -h -d 1 -h : human read -d : depth

Get user in Spring

Posted on by Kim

SecurityContextHolder.getContext().authentication.name

Use of DateTimeFormatter

Posted on by Kim

Use DateTimeFormatter instead of SimpleDateFormat

DateTimeFormatter.ofPattern("yyyyMMdd_HHmm").format(LocalDateTime.now()));