SpringMVC @Resource @Service @AnnotationDAO注解的使用和不加导致的异常

@Service

/**
 * 收费
 * @author jinlong
 *
 */
@Service
public class FeeService {

}

如果不加@Service参数 在 FeeController中调用service方法 会抛如下异常:

严重: Servlet.service() for servlet spring-mvc threw exception
java.lang.NullPointerException

猜你喜欢

转载自justice-jl.iteye.com/blog/1827577