Advertisement
kyla03

webModuleApplicationContext.xml

May 4th, 2021
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.86 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!-- Beans to add to the current Application context definition -->
  4.  
  5. <beans xmlns="http://www.springframework.org/schema/beans"
  6. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7. xmlns:p="http://www.springframework.org/schema/p"
  8. xmlns:context="http://www.springframework.org/schema/context"
  9. xmlns:jee="http://www.springframework.org/schema/jee"
  10. xmlns:tx="http://www.springframework.org/schema/tx"
  11. xmlns:aop="http://www.springframework.org/schema/aop"
  12. xmlns:util="http://www.springframework.org/schema/util"
  13. xsi:schemaLocation="http://www.springframework.org/schema/beans
  14. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  15. http://www.springframework.org/schema/context
  16. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  17. http://www.springframework.org/schema/jee
  18. http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
  19. http://www.springframework.org/schema/tx
  20. http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  21. http://www.springframework.org/schema/aop
  22. http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  23. http://www.springframework.org/schema/util
  24. http://www.springframework.org/schema/util/spring-util-3.0.xsd">
  25.  
  26. <context:component-scan base-package="org.openmrs.module.fdahplat" />
  27.  
  28. <!-- Wraps FdahplatService methods in DB transactions and OpenMRS interceptors,
  29. which set audit info like dateCreated, changedBy, etc.-->
  30. <bean id="fdahplat.FdahplatService"
  31. class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  32. <property name="transactionManager">
  33. <ref bean="transactionManager" />
  34. </property>
  35. <property name="target">
  36. <bean class="org.openmrs.module.fdahplat.api.impl.FdahplatServiceImpl">
  37. <property name="dao" ref="fdahplat.FdahplatDao" />
  38. </bean>
  39. </property>
  40. <property name="preInterceptors">
  41. <ref bean="serviceInterceptors" />
  42. </property>
  43. <property name="transactionAttributeSource">
  44. <ref bean="transactionAttributeSource" />
  45. </property>
  46. </bean>
  47.  
  48. <!-- Adds FdahplatService to OpenMRS context so it can be accessed
  49. calling Context.getService(FdahplatService.class) -->
  50. <bean parent="serviceContext">
  51. <property name="moduleService">
  52. <list>
  53. <value>org.openmrs.module.fdahplat.api.FdahplatService</value>
  54. <ref bean="fdahplat.FdahplatService" />
  55. </list>
  56. </property>
  57. </bean>
  58.  
  59. <bean class="org.openmrs.ui.framework.StandardModuleUiConfiguration">
  60. <property name="moduleId" value="${project.parent.artifactId}"/>
  61. </bean>
  62.  
  63. </beans>
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement