Annotation
竹马追风
卧布晓德
展开
-
Sprng MVC注解
代码示例 @RestController @RequestMapping("agent") public class AgentController { @Resource private AgentService agentService; @RequestMapping("/deleteAgent") @ResponseBody public Objec...原创 2019-08-07 15:28:20 · 243 阅读 · 0 评论 -
JUnit 相关注解
1. 代码示例 <!-- 测试类 --> @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"classpath:/spring-application.xml"}) public class GoodsServiceImplTest { @Test public void testG...原创 2019-08-20 14:10:41 · 137 阅读 · 0 评论 -
JPA注解
1. JPA概述 (1)JPA(Java Persistence API)是java中的持久层API; (2)作用:使应用程序以统一的方式访问持久层; (3)JPA 是一种 ORM 规范,是 Hibernate 功能的一个子集,JPA默认使用hibernate作为ORM实现,所以,一般使用Spring Data JPA即会使用hibernate。 2. 常用注解 2.1 代码示例 @Entity ...原创 2019-08-16 17:26:15 · 100 阅读 · 0 评论