1.impl文件要加入@service
注解
@Service
public class CityServiceImpl implements CityService{
@Autowired
private CityDao cityDao;
2.dao文件上要加@Repository
注解
@Repository
public interface CityDao {
@service
注解@Service
public class CityServiceImpl implements CityService{
@Autowired
private CityDao cityDao;
@Repository
注解@Repository
public interface CityDao {