很好奇,我在項(xiàng)目中只定義了一個(gè),繼承了CrudRepository接口或者JpaRepository接口,的接口,他的實(shí)體類,是在什么時(shí)候生成并且注冊到Spring的IOC容器的呢?public interface TestRepository extends JpaRepository<TestEntity, String> {}上面這個(gè)接口,為什么我在代碼中,直接通過@Autowire,就可以從IOC容器中獲得這個(gè)接口的實(shí)體類,來進(jìn)行CURD操作的呢?請各位大佬不吝賜教。。
添加回答
舉報(bào)
0/150
提交
取消