JSF Bean içinde aşağıdaki kodu yazarak beanlara ulaşılabilir.
ApplicationContext context = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance());
PersonelEkleService ser =(PersonelEkleService)context.getBean(PersonelEkleService.class);
bir diğer yöntem ise sınıf içinde PersonelEkleService Sınıfına
@Autowired anotasyonu eklenerek de ulaşılabilir.
JSF Bean içinde aşağıdaki kodu yazarak beanlara ulaşılabilir.
Yazılım Soru - Kod Kısmı
ApplicationContext context = FacesContextUtils.getWebApplicationContext(FacesContext.getCurrentInstance());
PersonelEkleService ser =(PersonelEkleService)context.getBean(PersonelEkleService.class);
bir diğer yöntem ise sınıf içinde
PersonelEkleService Sınıfına
@Autowired anotasyonu eklenerek de ulaşılabilir.