Untitled
user_8699250
java
7 months ago
548 B
4
Indexable
@Service
public class EmployeeService {
private final EmployeeRepository employeeRepository;
@EventListener(ApplicationReadyEvent.class)
public void test() {
testSelfInvocation();
}
@Transactional
public void testSelfInvocation() {
Employee emp1 = new Employee("Henry", "Ford", 22);
employeeRepository.save(emp1);
BigDecimal.ONE.divide(BigDecimal.ZERO);
Employee emp2 = new Employee("John", "Wick", 33);
employeeRepository.save(emp2);
}
}Editor is loading...
Leave a Comment