시작 서버 보고서:but was actually of type'com.sun.proxy.$Proxy23 오류

2147 단어 문제 요약
원인 1: 인터페이스 및 구현 클래스 이름이 규범에 맞지 않습니다. 인터페이스:
public interface Delivery_addressesService {
	public Delivery_addresses getByUser(int user_id);
	public Integer addressSave(int user_id,String address,String addressValue);
	public void createAddress(int user_id);
	
	public Integer addressSet(int user_id,String addressValue);
	
}

인터페이스 구현:
@Transactional
@Service(value="delivery_addressesService")
public class Delivery_addressesServiceI implements Delivery_addressesService {
	
	@Resource
	private Delivery_addressesMapper delivery_addressesMapper;
	@Resource
	private UsersMapper usersMapper;
	@Override
	public Delivery_addresses getByUser(int user_id) {
		Delivery_addresses delivery_addresses = delivery_addressesMapper.getByUser_id(user_id);
		return delivery_addresses;
	}
	@Override
	public Integer addressSave(int user_id, String address, String addressValue) {
			Delivery_addresses delivery_addresses = new Delivery_addresses();
			delivery_addresses.setUser_id(user_id);
			if(address.equals("addresses1")) {
				delivery_addresses.setAddresses1(addressValue);
			}
			if(address.equals("addresses2")) {
				delivery_addresses.setAddresses2(addressValue);
			}
			if(address.equals("addresses3")) {
				delivery_addresses.setAddresses3(addressValue);
			}
			if(address.equals("addresses4")) {
				delivery_addresses.setAddresses4(addressValue);
			}
			if(address.equals("addresses5")) {
				delivery_addresses.setAddresses5(addressValue);
			}
			delivery_addressesMapper.updateAddress(delivery_addresses);
		return 1;
	}
	@Override
	public Integer addressSet(int user_id, String addressValue) {
			Users users  =new Users();
			users.setId(user_id);
			users.setAddress(addressValue);
			usersMapper.update(users);
		return 1;
	}
	@Override
	public void createAddress(int user_id) {
			delivery_addressesMapper.createAddress(user_id);
		
	}

}

컨트롤러:
@Controller
@RequestMapping("/address")
public class AddressController {
	@Resource
	private Delivery_addressesService delivery_addressesService;

좋은 웹페이지 즐겨찾기