@@ -0,0 +1,1072 @@
+package com.bubbles.server.domain;%0A%0Aimport com.bubbles.server.BubblesApplication;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.SpringApplicationConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.transaction.annotation.Transactional;%0A%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.EntityManagerFactory;%0A%0A/**%0A * Created by Fei on 5/16/2015.%0A */%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@SpringApplicationConfiguration(classes = BubblesApplication.class)%0A@Transactional%0Apublic class JpaTest %7B%0A%0A    @Autowired%0A    private EntityManagerFactory factory;%0A%0A    @Test%0A    public void save()%7B%0A        EntityManager em = factory.createEntityManager();%0A        User user = new User();%0A        user.setDeviceId(%22000000000000005%22);%0A        user.setCellphone(%2218910334672%22);%0A        user.setNickname(%22helloiam%22);%0A        user.setGender(%22f%22);%0A%0A        em.merge(user);%0A        em.close();%0A    %7D%0A%7D%0A

add jpa use and test