2b1d5ef3bdba5c4e5819f62db33e100f263186f2
[sdc.git] / catalog-be / src / main / resources / application-context.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
3   xmlns:aop="http://www.springframework.org/schema/aop"
4   xsi:schemaLocation="
5         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
6         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
7         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
8
9   <context:annotation-config />
10   <aop:aspectj-autoproxy proxy-target-class="true" />
11
12   <context:component-scan
13           base-package= "org.openecomp.sdc.be.components.health,
14                          org.openecomp.sdc.be.servlets,
15                          org.openecomp.sdc.be.externalapi.servlet,
16                          org.openecomp.sdc.be.components.scheduledtasks,
17                          org.openecomp.sdc.be.facade.operations,
18                          org.openecomp.sdc.be.components.kafka,
19                          org.openecomp.sdc.be.components.impl">
20   </context:component-scan>
21
22   <bean class="org.openecomp.sdc.be.dao.config.DAOSpringConfig"/>
23   <bean class="org.openecomp.sdc.be.config.CatalogModelSpringConfig"/>
24   <bean class="org.openecomp.sdc.be.components.distribution.engine.config.DistributionEngineSpringConfig"/>
25   <bean class="org.openecomp.sdc.config.CatalogBESpringConfig"/>
26   <bean class="org.openecomp.sdc.config.MicrometerSpringConfig"/>
27   <bean class="org.openecomp.sdc.be.components.kafka.KafkaHandler"/>
28
29   <aop:config>
30     <aop:aspect id="lockAspect" ref="componentLockAspect">
31       <aop:pointcut id="lockingTransaction" expression="@annotation(org.openecomp.sdc.be.components.impl.lock.LockingTransactional) and args(componentId, componentType,..)"/>
32       <aop:around method="lock" arg-names="proceedingJoinPoint,componentId,componentType" pointcut-ref="lockingTransaction"/>
33     </aop:aspect>
34     <aop:aspect id="roleAuthorizationAspect" ref="roleAuthorizationHandler">
35       <aop:pointcut id="roleAuthorize" expression="@annotation(permissions)"/>
36       <aop:before method="authorizeRole" arg-names="joinPoint, permissions" pointcut-ref="roleAuthorize"/>
37     </aop:aspect>
38   </aop:config>
39
40 </beans>