Boa tarde Professor
Tive que mudar a versão do Spring Boot e antes minhas invocacoes funcionavam normalmente, agora esta dando java.lang.ClassCastException nessa invocacao em negrito:
@Autowired
private TradePhoneService service;
@CrossOrigin(origins = {"http://localhost:4200","http://localhost:8081"})
@PostMapping(value = "/listarRamaisDiponiveis", produces = "application/json")
public ResponseEntity <List<TpbPrvtRecPhoneExtVO>> listarRamaisDiponiveis() {
List<TpbPrvtRecPhoneExtVO> list = new ArrayList<>();
try {
** list =service.listarRamaisDiponiveis();**
Sobre a classe TpbPrvtRecPhoneExtVO:
public class TpbPrvtRecPhoneExtVO extends BaseVO implements Serializable{
----Sobre a interface TradePhoneService:
package com.citibank.spring.service;
import java.util.List;
import com.citibank.spring.model.TpbPrvtRecPhoneExtVO;
public interface TradePhoneService { public List listarRamaisDiponiveis();
public TpbPrvtRecPhoneExtVO listarRamalUsuario(String soeid); public TpbPrvtRecPhoneExtVO gravar(TpbPrvtRecPhoneExtVO vo);
}
--E sobre a classe que implementa a interface TradePhoneService:
@Transactional(rollbackOn=Exception.class)
@Service
public class TradePhoneServiceImpl implements TradePhoneService {
@Autowired
private TradePhoneDAO dao;
public List<TpbPrvtRecPhoneExtVO> listarRamaisDiponiveis() {
return listBeansToVos(dao.listarRamaisDiponiveis());
}
O que pode ser?
Obrigado