Skip to content

Commit f8b8f60

Browse files
author
Murali Reddy
committed
Inject GslbServiceProvider using @Inject fails in oss build, as it requires an
implemenation by default to autowire but only implementation avaialable is in nonoss plugin. So using autowired required=false for injecting GslbServiceProvider that will work with both oss and non-oss builds.
1 parent d437cb6 commit f8b8f60

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎server/src/org/apache/cloudstack/region/gslb/GlobalLoadBalancingRulesServiceImpl.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.apache.cloudstack.region.Region;
4545
import org.apache.cloudstack.region.dao.RegionDao;
4646
import org.apache.log4j.Logger;
47+
import org.springframework.beans.factory.annotation.Autowired;
4748
import org.springframework.stereotype.Component;
4849

4950
import javax.ejb.Local;
@@ -79,8 +80,8 @@ public class GlobalLoadBalancingRulesServiceImpl implements GlobalLoadBalancingR
7980
IPAddressDao _ipAddressDao;
8081
@Inject
8182
AgentManager _agentMgr;
82-
83-
protected GslbServiceProvider _gslbProvider = null;
83+
@Autowired(required=false)
84+
protected GslbServiceProvider _gslbProvider;
8485

8586

8687
@Override

0 commit comments

Comments
 (0)