我得到以下堆栈跟踪:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting
from type [java.math.BigInteger] to type [org.club.entities.Depense]
依赖实体
public class Depense {
@Id @GeneratedValue
//
@Temporal(TemporalType.DATE)
private Date datePay;
@ManyToOne
@JoinColumn(name = "idCategorie")
private Categories categoriesD;
CategoreisRepository
public interface CategoriesRepository extends JpaRepository<Categories, Long>{
@Query(nativeQuery = true, value="select * from depense p inner JOIN categories pe on p.id_categorie = pe.id_cat ")
public List<Depense> AfficheDepenseByCategories();
类别控制器
public class CategoriesController {
@Autowired
private IcategoriesService catserv;
@GetMapping("/AfficheCat")
public List<Depense> findAllC(){ return catserv.AffCateg();}