@Transactional
@Service
public class UserServiceImpl implements UserService {
@PersistenceContext
EntityManager entityManager;
public void init(){
// i called this code in controller in index method
AppUsers user = new AppUsers();
user.setId(1);
user.setName("alice");
user.setLastname("brown");
user.setEmail("example@gmail.com");
user.setPassword("123456");
entityManager.persist(user);
}}