|
| 1 | +<!-- |
| 2 | + Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + or more contributor license agreements. See the NOTICE file |
| 4 | + distributed with this work for additional information |
| 5 | + regarding copyright ownership. The ASF licenses this file |
| 6 | + to you under the Apache License, Version 2.0 (the |
| 7 | + "License"); you may not use this file except in compliance |
| 8 | + with the License. You may obtain a copy of the License at |
| 9 | + |
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + |
| 12 | + Unless required by applicable law or agreed to in writing, |
| 13 | + software distributed under the License is distributed on an |
| 14 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + KIND, either express or implied. See the License for the |
| 16 | + specific language governing permissions and limitations |
| 17 | + under the License. |
| 18 | +--> |
| 19 | +<beans xmlns="http://www.springframework.org/schema/beans" |
| 20 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 21 | + xmlns:context="http://www.springframework.org/schema/context" |
| 22 | + xmlns:tx="http://www.springframework.org/schema/tx" |
| 23 | + xmlns:aop="http://www.springframework.org/schema/aop" |
| 24 | + xsi:schemaLocation="http://www.springframework.org/schema/beans |
| 25 | + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
| 26 | + http://www.springframework.org/schema/tx |
| 27 | + http://www.springframework.org/schema/tx/spring-tx-3.0.xsd |
| 28 | + http://www.springframework.org/schema/aop |
| 29 | + http://www.springframework.org/schema/aop/spring-aop-3.0.xsd |
| 30 | + http://www.springframework.org/schema/context |
| 31 | + http://www.springframework.org/schema/context/spring-context-3.0.xsd"> |
| 32 | + |
| 33 | + <context:annotation-config /> |
| 34 | + <context:component-scan base-package="com.cloud.usage" /> |
| 35 | + |
| 36 | + <!-- |
| 37 | + @DB support |
| 38 | + --> |
| 39 | + <aop:config proxy-target-class="true"> |
| 40 | + <aop:aspect id="dbContextBuilder" ref="transactionContextBuilder"> |
| 41 | + <aop:pointcut id="captureAnyMethod" |
| 42 | + expression="execution(* *(..))" |
| 43 | + /> |
| 44 | + <aop:around pointcut-ref="captureAnyMethod" method="AroundAnyMethod"/> |
| 45 | + </aop:aspect> |
| 46 | + |
| 47 | + </aop:config> |
| 48 | + |
| 49 | + <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" /> |
| 50 | + <bean id="ComponentContext" class="com.cloud.utils.component.ComponentContext" /> |
| 51 | + <bean id="UsageServerConfig" class="com.cloud.usage.UsageServerComponentConfig" /> |
| 52 | + |
| 53 | +</beans> |
0 commit comments