Skip to content

Commit

Permalink
BAH-4106 | Fix. Remove @repository annotation and create beans throug…
Browse files Browse the repository at this point in the history
…h xml (#69)
  • Loading branch information
mohan-13 authored Sep 13, 2024
1 parent 329499e commit bb14f56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Date;
import java.util.List;

@Repository
public class TaskDaoImpl implements TaskDao {

private SessionFactory sessionFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

// TODO: This Dao is to be removed after support openmrs R5

@Repository
public class TaskRequestedPeriodDaoImpl implements TaskRequestedPeriodDao {

private SessionFactory sessionFactory;
Expand Down
26 changes: 12 additions & 14 deletions omod/src/main/resources/webModuleApplicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,21 @@
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>

<context:component-scan base-package="org.openmrs.module.fhirExtension" />
<bean id="taskDao" class="org.openmrs.module.fhirExtension.dao.impl.TaskDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="taskRequestedPeriodDao" class="org.openmrs.module.fhirExtension.dao.impl.TaskRequestedPeriodDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="taskServiceTarget" class="org.openmrs.module.fhirExtension.service.impl.TaskServiceImpl">
<property name="visitService" ref="visitService"/>
<property name="fhirTaskDao" ref="fhirTaskDaoImpl"/>
<property name="taskDao">
<bean class="org.openmrs.module.fhirExtension.dao.impl.TaskDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</property>
<property name="taskRequestedPeriodDao">
<bean class="org.openmrs.module.fhirExtension.dao.impl.TaskRequestedPeriodDaoImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</property>
<property name="taskDao" ref="taskDao"/>
<property name="taskRequestedPeriodDao" ref="taskRequestedPeriodDao"/>
</bean>
<bean id="taskService"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
Expand Down

0 comments on commit bb14f56

Please sign in to comment.