I have a bank view that when registering a new record the same view brings the outdated values to my listing. It only brings the data up to date if I bring down the server and upload again.
I'm using Spring Data and below is more details to help:
@RequestMapping("/serviceList")
public ModelAndView getMenuServiceList(Model model) {
ModelAndView mv = new ModelAndView("service/serviceList");
// Dados estão chegando desatualizados!!!
List<VwOpenService> openServiceList = serviceFacade.getOpenServiceList();
mv.addObject("serviceListRegister", openServiceList);
countOfBudgets(model);
return mv;
}
Service Layer
public List<VwOpenService> getOpenServiceList() {
return vwOpenService.findAll();
}
Repository (Spring Data)
@Repository
public interface OpenServiceRepository extends BaseRepository<VwOpenService, Long>{
List<VwOpenService> findAll();
}