Posts

Showing posts from March, 2017

Play with CMD

dir | clip   // copy to clip board type error.log | clip echo hello > a.txt     // overrite file echo hello >> a.txt  // append  file doskey /HISTORY > history.txt  // copy all commands MyCommand.exe 1>stdout.txt 2>errors.txt Copy & Paste a command session as follows: 1.) At the end of your session, click the upper left corner to display the menu. Then select.. Edit -> Select all 2.) Again, click the upper left corner to display the menu. Then select.. Edit -> Copy 3.) Open your favorite text editor and use Ctrl+V or your normal Paste operation to paste in the text. mod con lines=32766 @echo off cmd "mode con:cols=140 lines=2500" @echo off echo test! pause exit You'll have to kill the program using Ctrl + C where C stands for Cancel.

Spring Rest API Validation

https://jcp.org/en/jsr/detail?id=303  @NotBlank(message = "username can't empty!")     String username;  @NotBlank     @Size(min = 3, max = 50)     private String username; @NotEmpty     @Length(max = 140)     private String text; ConstraintComposition Boolean operator that is applied to all constraints of a composing constraint annotation. CreditCardNumber The annotated element has to represent a valid credit card number. CreditCardNumber.List Defines several  @CreditCardNumber  annotations on the same element. Email The string has to be a well-formed email address. Email.List Defines several  @Email  annotations on the same element. Length Validate that the string is between min and max included. Length.List Defines several  @Length  annotations on the same element. NotBlank Validate that the annotated string is not  null  or empty. NotBlank.List Defines several  @NotBlank  an...

Spring Annotation

Class level annotation method level  annoation property level annotation @Autowired by default use by type xyz.MyBean abc.MyBean resolve that conflict dependency issue using @Qualifier  annotation @Resource @Inject @component scan base package

Spring Annotation

Image