正在學習spring boot。
請先看以下代碼:
public abstract class Thing
{
......
}
public class Person extends Thing
{
......
}
public interface Thing_Repository extends JpaRepository
{ }
public interface Person_Repository extends Thing_Repository
{ }
但是以上黑體“Thing_Repository”下有紅划綫報錯“The type Thing_Repository is not generic; it cannot be parameterized with arguments ”
我希望做到當運行以下代碼:
Thing_Repository.save(Thing)
如果Thing是Person的話,它會自動調:
Person_Repository.save(Person)
可以做到嗎?