public DataSourceCompositeResolver(final DataSourceResolver[] dataSourceResolvers)
{
this.dataSourceResolvers = new DataSourceResolver[dataSourceResolvers.length];
System.arraycopy(dataSourceResolvers, 0, this.dataSourceResolvers, 0, dataSourceResolvers.length);
}
var ioc={
emailAuthenticator : {
type : "org.apache.commons.mail.DefaultAuthenticator",
args : [{java:"$conf.get('mail.UserName')"}, {java:"$conf.get('mail.Password')"}]
},
dataSourceClassPathResolver : {
type : "org.apache.commons.mail.resolver.DataSourceClassPathResolver"
},
dataSourceFileResolver : {
type : "org.apache.commons.mail.resolver.DataSourceFileResolver"
},
dataSourceUrlResolver : {
type : "org.apache.commons.mail.resolver.DataSourceUrlResolver",
args : "http://"
},
dataSourceCompositeResolver : {
type : "org.apache.commons.mail.resolver.DataSourceCompositeResolver",
args : [{refer: "dataSourceClassPathResolver"}, {refer: "dataSourceFileResolver"}, {refer: "dataSourceUrlResolver"}]
},
htmlEmail : {
type : "com.bsc.app.web.commons.services.email.ImageHtmlEmail",
singleton : false,
fields : {
hostName : {java:"$conf.get('mail.HostName')"},
smtpPort : {java:"$conf.get('mail.SmtpPort')"},
authenticator : {refer:"emailAuthenticator"},
SSLOnConnect : {java:"$conf.get('mail.SSLOnConnect')"},
from : {java:"$conf.get('mail.From')"},
smtpSocketFactoryFallback : {java:"$conf.get('mail.SmtpSocketFactoryFallback')"},
smtpStartTlsEnable : {java:"$conf.get('mail.SmtpStartTlsEnable')"},
debug : {java:"$conf.get('mail.debug')"},
dataSourceResolver : {refer: "dataSourceCompositeResolver"}
}
}
};