注解
## @EnableWebSecurity: 开启springsecurity注解服务
## @EnableGlobalMethodSecurity
1. 相当于Spring MVC传统xml配置的<global-method-security>
2. @EnableGlobalMethodSecurity用来启用基于annotation如@Security, @PreAuthorize,@RolesAllowed的服务层安全机制
3. @EnableGlobalMethodSecurity本身包含了@Configuration注解
4. @EnableGlobalMethodSecurity有三个属性值
1. securedEnabled设定是否启用@Secured
2. prePostEnabled设定是否启用@PreAuthorize
3. jsr250Enabled设定是否启用@RolesAllowed
4. 启动@Secured即在配置类上写:@EnableGlobalMethodSecurity(prePostEnabled = true)