@ConditionalOnWebApplication主要的用处是: 当Spring为web服务时,才使注解的类生效;通常是配置类; 与之对应的是@ConditionalOnNotWebApplication(不是web应用)