@Override @Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false) public HttpCode createOrFetch(String httpCode) { HttpCode httpCodePers = new HttpCode(); httpCodePers.setCode(httpCode); return httpCodeRepository.saveAndFlush(httpCodePers); }
@Override @Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = true) public HttpCode find(String httpCode) { return httpCodeRepository.findByCode(httpCode); }