How To Use Java Code To Set File Permission

java.io.File provide several methods to get or set file permissions in java code. But the drawback of java.io.File ‘s methods is that it can only separate file permission into two groups which is owner or all users. So java 7 introduce java.nio.file.attribute.PosixFilePermission which provide methods that can let you define file permission more accurately for different […]

How To Use Java Code To Set File Permission Read More »

Spring Autowire Use @Component, @Repository, @Service and @Controller Annotations

Besides define Spring beans in a configuration file, Spring also provides some java annotation interface for you to make Spring bean declaration simple and easy. These interfaces are also called stereotype annotation. They are @Component, @Repository, @Service, and @Controller. If you want to reference such a bean, you just need to annotate that field with

Spring Autowire Use @Component, @Repository, @Service and @Controller Annotations Read More »