Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spring.datasource.url=jdbc:mysql://foo.bar.com:12345
- spring.datasource.username=user
- spring.datasource.password=password
- spring.datasource.driver-class-name=com.mysql.jdbc.Driver
- @Service
- public class ProjectServiceImpl implements ProjectService {
- @Autowired
- ProjectRepository projectRepository;
- @Override
- @Transactional(isolation = Isolation.SERIALIZABLE)
- public Project save(Project project) {
- // there might be some additional logic here, besides the action on repository
- return projectRepository.save(project);
- }
- }
- @Repository
- public interface ProjectRepository extends CrudRepository<Project, Long> {}
- "exception": "org.springframework.transaction.InvalidIsolationLevelException",
- "message": "JtaTransactionManager does not support custom isolation levels by default - switch 'allowCustomIsolationLevels' to 'true'",
- transactionManager.setAllowCustomIsolationLevels(true);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement