While the transaction is not provided in @PostConstruct methods, it's possible to use it "the standard way" via ApplicationContext.getBean():
@Transactional(readOnly = true)
public class MyServiceImpl implements MyService {
@Autowired
private MyDao myDao;
private CacheList cacheList;
@Autowired
private ApplicationContext appContext;
@PostConstruct
public void init() {
appContext.getBean(MyService.class).onInit();
}
@Transactional(readOnly = true)
public void onInit() {
this.cacheList = new CacheList();
this.cacheList.reloadCache(this.myDao.getAllFromServer());
}
...
}