use of com.icthh.xm.ms.entity.config.ApplicationProperties in project xm-ms-entity by xm-online.
the class XmEntitySpecServiceUnitTest method init.
@Before
@SneakyThrows
public void init() {
TenantContext tenantContext = mock(TenantContext.class);
when(tenantContext.getTenantKey()).thenReturn(Optional.of(TenantKey.valueOf(TENANT)));
tenantContextHolder = mock(TenantContextHolder.class);
when(tenantContextHolder.getContext()).thenReturn(tenantContext);
ApplicationProperties ap = new ApplicationProperties();
ap.setSpecificationPathPattern(URL);
xmEntitySpecService = createXmEntitySpecService(ap, tenantContextHolder);
}
use of com.icthh.xm.ms.entity.config.ApplicationProperties in project xm-ms-entity by xm-online.
the class AvatarUrlListener method getPrefix.
private String getPrefix() {
if (prefix == null) {
ApplicationContext ctx = ApplicationContextHolder.getInstance().getApplicationContext();
ApplicationProperties applicationProperties = ctx.getBean("applicationProperties", ApplicationProperties.class);
prefix = String.format(applicationProperties.getAmazon().getAws().getTemplate(), applicationProperties.getAmazon().getS3().getBucket());
}
return prefix;
}
Aggregations