fix
This commit is contained in:
parent
ae72769741
commit
10d3438252
@ -29,6 +29,7 @@ import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
import org.bouncycastle.crypto.digests.SM3Digest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@ -40,6 +41,7 @@ public class ResourcePackageServiceImpl implements ResourcePackageService {
|
||||
private final MqReplayContextBuilder mqReplayContextBuilder;
|
||||
private final ObjectMapper objectMapper;
|
||||
|
||||
@Autowired
|
||||
public ResourcePackageServiceImpl(
|
||||
ResourceBackupProperties resourceBackupProperties,
|
||||
ResourceEnvelopeCryptoService resourceEnvelopeCryptoService,
|
||||
|
||||
@ -221,9 +221,9 @@ tms:
|
||||
internal-token: ${TMS_INTERNAL_TOKEN:change-me-internal-token}
|
||||
internal-auth:
|
||||
# 是否启用 /api/** 的内部登录鉴权;开发联调时可临时关闭。
|
||||
enabled: ${TMS_SECURITY_INTERNAL_AUTH_ENABLED:true}
|
||||
enabled: ${TMS_SECURITY_INTERNAL_AUTH_ENABLED:false}
|
||||
# 关闭内部鉴权后,注入请求上下文的调试角色。
|
||||
debug-role-code: ${TMS_SECURITY_INTERNAL_AUTH_DEBUG_ROLE_CODE:SUPER_ADMIN}
|
||||
debug-role-code: ${TMS_SECURITY_INTERNAL_AUTH_DEBUG_ROLE_CODE:OPS_ADMIN}
|
||||
# 关闭内部鉴权后,注入请求上下文的调试认证等级。
|
||||
debug-auth-level: ${TMS_SECURITY_INTERNAL_AUTH_DEBUG_AUTH_LEVEL:FULL}
|
||||
# 关闭内部鉴权后,注入请求上下文的调试 session token。
|
||||
|
||||
@ -15,6 +15,7 @@ import java.nio.file.Path;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipFile;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
@ -26,6 +27,15 @@ class ResourcePackageServiceTest {
|
||||
@TempDir
|
||||
Path tempDir;
|
||||
|
||||
@Test
|
||||
void shouldDeclareSpringInjectionConstructorWhenMultipleConstructorsExist() {
|
||||
long autowiredConstructors = java.util.Arrays.stream(ResourcePackageServiceImpl.class.getConstructors())
|
||||
.filter(constructor -> constructor.isAnnotationPresent(Autowired.class))
|
||||
.count();
|
||||
|
||||
Assertions.assertEquals(1, autowiredConstructors);
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldWriteManifestEnvelopeAndCiphertextIntoBackupPackage() throws Exception {
|
||||
ResourceBackupProperties properties = new ResourceBackupProperties();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user