service 是有用的相当于 xml配置中得bean id = service 也可以不指定 不指定相当于 bean id = com. service.service 就是这个类的全限定名,表示给当前类命名一个别名,方便注入到其他需要用到的类中;
加的话 可自己定义,或者是为了区分使用其他@Service 直接使用当前类名,但是首字母小写
@Service("lwApiCompanyServiceImpl ")
public class LwApiCompanyServiceImpl implements LwCompanyService {}
不加的话,默认别名就是当前类名,但是首字母小写
@Service
public class LwApiCompanyServiceImpl implements LwCompanyService {}