Skip to content

Instantly share code, notes, and snippets.

@dodangquan
Created September 10, 2016 01:58
Show Gist options
  • Save dodangquan/21b6f8f0fa07fa65b1e545abffb3ffd8 to your computer and use it in GitHub Desktop.
Save dodangquan/21b6f8f0fa07fa65b1e545abffb3ffd8 to your computer and use it in GitHub Desktop.
// @org.springframework.transaction.annotation.Transactional
@Service
@Transactional(readOnly = true)
public class BookServiceImpl implements BookService {
@Autowired
private BookDao bookDao;
@Transactional
public Book findByName(String name) {
Book book = bookDao.findByName(name);
return book;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment