shjung 1 жил өмнө
parent
commit
b2c7938ded
26 өөрчлөгдсөн 26 нэмэгдсэн , 1974 устгасан
  1. 0 1925
      App_Data/mip_data/mip/logs/mip_sdk.miplog
  2. BIN
      App_Data/mip_data/mip/mip.policies.sqlite3
  3. BIN
      App_Data/mip_data/mip/telemetry-shm
  4. BIN
      App_Data/mip_data/mip/telemetry-wal
  5. 1 1
      app-install/AipGateway.API.Service.xml
  6. BIN
      app-install/AipGateway.API.exe
  7. 0 2
      app-install/AipGateway.API.jsmooth
  8. 1 1
      conf/AipGatewayApi.pid
  9. 1 0
      conf/application.yml
  10. 1 1
      src/main/java/com/aip/gateway/api/AipGatewayApiApplication.java
  11. 0 1
      src/main/java/com/aip/gateway/api/LicenseManager.java
  12. 0 2
      src/main/java/com/aip/gateway/api/aip/AuthDelegateImpl.java
  13. 0 2
      src/main/java/com/aip/gateway/api/aip/TokenCacheAspect.java
  14. 0 1
      src/main/java/com/aip/gateway/api/aip/manager/AbstractManager.java
  15. 0 1
      src/main/java/com/aip/gateway/api/aip/manager/AipFileManagerBase.java
  16. 0 1
      src/main/java/com/aip/gateway/api/aip/manager/FileManager.java
  17. 3 3
      src/main/java/com/aip/gateway/api/aop/LoggingAspect.java
  18. 0 2
      src/main/java/com/aip/gateway/api/config/ApplicationConfig.java
  19. 0 3
      src/main/java/com/aip/gateway/api/config/DatabaseConfig.java
  20. 0 1
      src/main/java/com/aip/gateway/api/config/ThreadPoolInitializer.java
  21. 1 4
      src/main/java/com/aip/gateway/api/interceptor/AipApiControllerInterceptor.java
  22. 0 1
      src/main/java/com/aip/gateway/api/process/DbmsDataProcess.java
  23. 2 5
      src/main/java/com/aip/gateway/api/service/impl/AbstractAipService.java
  24. 0 1
      src/main/java/com/aip/gateway/api/service/impl/ApiFileService.java
  25. 4 4
      src/main/resources/application.yml
  26. 12 12
      src/main/resources/mybatis/mapper/BaseDbMapper.xml

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 1925
App_Data/mip_data/mip/logs/mip_sdk.miplog


BIN
App_Data/mip_data/mip/mip.policies.sqlite3


BIN
App_Data/mip_data/mip/telemetry-shm


BIN
App_Data/mip_data/mip/telemetry-wal


+ 1 - 1
app-install/AipGateway.API.Service.xml

@@ -1,6 +1,6 @@
 <service>
   <id>AIP API Gateway Server</id>
-  <name>Azure Information Protection API Gateway Service</name>
+  <name>AIP API Gateway Service</name>
   <description>Azure Information Protection API Gateway Service</description>
   <executable>%BASE%\AipGateway.API.exe</executable>
 

BIN
app-install/AipGateway.API.exe


+ 0 - 2
app-install/AipGateway.API.jsmooth

@@ -6,7 +6,6 @@
 <JVMSearchPath>registry</JVMSearchPath>
 <JVMSearchPath>exepath</JVMSearchPath>
 <JVMSearchPath>jview</JVMSearchPath>
-<arguments></arguments>
 <bundledJVMPath>jre</bundledJVMPath>
 <currentDirectory>${EXECUTABLEPATH}</currentDirectory>
 <embeddedJar>true</embeddedJar>
@@ -21,7 +20,6 @@
 <skeletonName>Console Wrapper</skeletonName>
 <skeletonProperties>
 <key>Message</key>
-<value></value>
 </skeletonProperties>
 <skeletonProperties>
 <key>PressKey</key>

+ 1 - 1
conf/AipGatewayApi.pid

@@ -1 +1 @@
-6552
+5068

+ 1 - 0
conf/application.yml

@@ -1,5 +1,6 @@
 application:
   name: AIP Gateway API Server
+  aip-server-id: 0
 
 server:
   port: 5050

+ 1 - 1
src/main/java/com/aip/gateway/api/AipGatewayApiApplication.java

@@ -41,7 +41,7 @@ public class AipGatewayApiApplication implements CommandLineRunner, ApplicationL
 		File file1 = new File("./conf/" + applicationName + ".pid");
 		if (file1.exists()) {
 			System.out.println(System.getProperty("Program Already Running....."));
-			log.error("Program Already Running.....");
+			log.warn("Program Already Running.....");
 		}
 
 		SpringApplication application = new SpringApplicationBuilder()

+ 0 - 1
src/main/java/com/aip/gateway/api/LicenseManager.java

@@ -113,7 +113,6 @@ public class LicenseManager {
     }
 
     private static boolean errorLicenseItemValue(String orgValue, String curValue, int errorCode) {
-        //log.error("License value error: {}, {}, {}", orgValue, curValue, errorCode);
         log.error("License value error: {}, {}", curValue, errorCode);
         return false;
     }

+ 0 - 2
src/main/java/com/aip/gateway/api/aip/AuthDelegateImpl.java

@@ -81,8 +81,6 @@ public class AuthDelegateImpl implements IAuthDelegate {
     }
     private String AcquireTokenByCertificate(Identity identity, String authority, String resource, String claims)
     {
-        ////ddddddddddddddddddddddddddddddddd: https://login.windows.net/common, https://syncservice.o365syncservice.com/
-        //log.error("ddddddddddddddddddddddddddddddddd: {}, {}", authority, resource);
         // AuthenticationResult result;
         // var authorityUri = new Uri(authority);
         // authority = $"https://{authorityUri.Host}/{_aipConfig.TenantId}";

+ 0 - 2
src/main/java/com/aip/gateway/api/aip/TokenCacheAspect.java

@@ -28,10 +28,8 @@ public class TokenCacheAspect implements ITokenCacheAccessAspect {
     }
 
     private static String readDataFromFile(String resource) {
-        log.error("Resource: {}", resource);
         try {
             URL path = TokenCacheAspect.class.getResource(resource);
-            log.error("Resource: {}", path);
             return new String(
                     Files.readAllBytes(Path.of(resource)));
 //            return new String(

+ 0 - 1
src/main/java/com/aip/gateway/api/aip/manager/AbstractManager.java

@@ -21,7 +21,6 @@ abstract class AbstractManager {
         else {
             lastErrMsg = errMsg1 + "\r\n" + errMsg2;
         }
-        log.error("AbstractManager::setError ==> {}, {}", errNo, lastErrMsg);
     }
 
     abstract public boolean createProfile(MipContext mipContext);

+ 0 - 1
src/main/java/com/aip/gateway/api/aip/manager/AipFileManagerBase.java

@@ -64,7 +64,6 @@ public class AipFileManagerBase {
         else {
             lastErrMsg = errMsg1 + "\r\n" + errMsg2;
         }
-        log.error("AipFileManager::setError ==> {}, {}", errNo, lastErrMsg);
     }
 
     protected boolean checkLoading() {

+ 0 - 1
src/main/java/com/aip/gateway/api/aip/manager/FileManager.java

@@ -131,7 +131,6 @@ public class FileManager extends AbstractManager {
         IFileHandler handler = createFileHandler(fileStream, outputFileName);
         if (handler == null) {
             //AipFileUtils.delete(outputFileName);
-            log.error("getFileInfo.createFileHandler failed: {}", lastErrMsg);
             return null;
         }
         AipFileInfo result = getFileInfo(handler);

+ 3 - 3
src/main/java/com/aip/gateway/api/aop/LoggingAspect.java

@@ -15,8 +15,8 @@ public class LoggingAspect {
     @Around("execution( public * com.aip.gateway.api.controller..*.*(..) )")
     public Object loadingElapsedTime(ProceedingJoinPoint joinPoint) throws Throwable {
 
-        String proceedName = String.format("%50s", joinPoint.getTarget().getClass().getSimpleName() + "." + joinPoint.getSignature().getName());
-        log.info("[LOADING...] {}: START.", proceedName);
+        String proceedName = String.format("%s", joinPoint.getTarget().getClass().getSimpleName() + "." + joinPoint.getSignature().getName());
+        log.info("[API] {}: START.", proceedName);
         StopWatch stopWatch = new StopWatch();
         stopWatch.start(proceedName);
 
@@ -24,7 +24,7 @@ public class LoggingAspect {
 
         stopWatch.stop();
         //if (stopWatch.getTotalTimeMillis() > 1000) {
-            log.warn("[API-RESULT] {}: ..END. {} ms. Completed.", proceedName, stopWatch.getTotalTimeMillis());
+            log.warn("[API] {}: ..END. {} ms. Completed.", proceedName, stopWatch.getTotalTimeMillis());
         //}
 
         return proceed;

+ 0 - 2
src/main/java/com/aip/gateway/api/config/ApplicationConfig.java

@@ -30,7 +30,6 @@ public class ApplicationConfig {
         this.startSchedule = false;
         this.availableProcessors  = Runtime.getRuntime().availableProcessors() * 2;
         this.bootingDateTime = SysUtils.getSysTimeStr();
-        //log.info("{}", this);
     }
 
     public boolean makeDirectory(String path, String desc) {
@@ -39,7 +38,6 @@ public class ApplicationConfig {
         if (!folder.exists()) {
             try {
                 result = folder.mkdir(); //폴더 생성.
-                //log.info("{}, ({}) created.", folder.getAbsolutePath(), desc);
             }
             catch(Exception e) {
                 log.error("{}, ({}) create failed. {}.", folder.getAbsolutePath(), desc, e.getMessage());

+ 0 - 3
src/main/java/com/aip/gateway/api/config/DatabaseConfig.java

@@ -35,8 +35,6 @@ public class DatabaseConfig {
         if (this.mapperLocations.trim().isEmpty()) {
             this.mapperLocations = "classpath:mybatis/mapper/**/*.xml";
         }
-        //log.info("mapperLocations: {}", this.mapperLocations);
-        //log.info("{}", this);
     }
 
     @Primary
@@ -51,7 +49,6 @@ public class DatabaseConfig {
     @Bean(name="sqlSessionFactory")
     public SqlSessionFactory sqlSessionFactoryBean(@Autowired @Qualifier("dataSource") DataSource dataSource, ApplicationContext applicationContext)
             throws Exception {
-        //log.info("mapperLocations: {}", this.mapperLocations);
         SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
         factoryBean.setDataSource(dataSource);
         factoryBean.setMapperLocations(applicationContext.getResources(this.mapperLocations));

+ 0 - 1
src/main/java/com/aip/gateway/api/config/ThreadPoolInitializer.java

@@ -33,7 +33,6 @@ public class ThreadPoolInitializer extends AsyncConfigurerSupport {
         if (this.dbms <= 0) {
             this.dbms = maxCore;
         }
-        //log.info("{}", this);
     }
 
     public ThreadPoolTaskExecutor getDefaultExecutor(int poolSize) {

+ 1 - 4
src/main/java/com/aip/gateway/api/interceptor/AipApiControllerInterceptor.java

@@ -36,7 +36,7 @@ public class AipApiControllerInterceptor implements HandlerInterceptor {
         try {
             return new String(contentAsByteArray, response.getCharacterEncoding());
         } catch (UnsupportedEncodingException e) {
-            log.error("getResponseBody UnsupportedEncodingException: {}", e.getMessage());
+            log.error("exception: getResponseBody UnsupportedEncodingException: {}", e.getMessage());
             return "";
         }
     }
@@ -48,14 +48,12 @@ public class AipApiControllerInterceptor implements HandlerInterceptor {
         request.setAttribute(GlobalConstants.API_GUID, apiGuid);
         request.setAttribute(GlobalConstants.API_START_TM, LocalDateTime.now());
         request.setAttribute(GlobalConstants.API_START_MILLISECONDS, System.currentTimeMillis());
-        //log.error("AipApiControllerInterceptor: preHandle ==> {}, {}", request.getRequestURI(), apiGuid);
         return true;
     }
 
     @Override
     public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
         // 요청 처리 후 실행되는 로직 (필요한 경우 사용)
-        //log.error("AipApiControllerInterceptor: postHandle ==> {}", request);
     }
 
     @Override
@@ -66,7 +64,6 @@ public class AipApiControllerInterceptor implements HandlerInterceptor {
         int errorCode = 0;
         String errorMessage = "";
         int responseStatusCode = response.getStatus();
-        //log.error("responseStatusCode: {}, {}", responseStatusCode, HttpStatus.OK.value());
         if (responseStatusCode != HttpStatus.OK.value()) {
             errorCode = GlobalConstants.getAttributeInt(request, GlobalConstants.API_RESULT_CODE);
             errorMessage = GlobalConstants.getAttributeStr(request, GlobalConstants.API_RESULT_MESSAGE);

+ 0 - 1
src/main/java/com/aip/gateway/api/process/DbmsDataProcess.java

@@ -34,7 +34,6 @@ public class DbmsDataProcess {
         ThreadPoolInitializer poolInitializer = (ThreadPoolInitializer) AppUtils.getBean(ThreadPoolInitializer.class);
         int executePool = Math.max(this.maxCore, poolInitializer.getWork());
         for (int ii = 0; ii < executePool; ii++) {
-            //log.info("DbmsDataProcess.Task: {}", ii);
             this.taskExecutor.execute(() -> {
                 boolean isRunning = true;
                 while (isRunning) {

+ 2 - 5
src/main/java/com/aip/gateway/api/service/impl/AbstractAipService.java

@@ -72,11 +72,11 @@ abstract class AbstractAipService {
 
     protected ResponseFile responseFileException(Exception exception, String displayFileName) {
         log.error("responseFileException: {}", exception.getMessage());
-        return new ResponseFile(109, "작업 중에 시스템 오류가 발생했습니다.", displayFileName);
+        return new ResponseFile(109, "파일 작업 중에 시스템 오류가 발생했습니다.", displayFileName);
     }
     protected ResponseStream responseStreamException(Exception exception, String displayFileName) {
         log.error("responseFileException: {}", exception.getMessage());
-        return new ResponseStream(109, "작업 중에 시스템 오류가 발생했습니다.", displayFileName);
+        return new ResponseStream(109, "파일 스트림 작업 중에 시스템 오류가 발생했습니다.", displayFileName);
     }
 
     private ResponseBase responseBase(SetFileInfo fileInfo, String displayFileName, String actualFileName) {
@@ -118,7 +118,6 @@ abstract class AbstractAipService {
     }
 
     protected ResponseInfo responseGetFileInfo(AipFileInfo fileInfo, String displayFileName) {
-        //log.error("{}", fileInfo);
         boolean isLabled = false;
         boolean isProtected = false;
         Date creationTime = TimeUtils.getCurrentDate();
@@ -183,14 +182,12 @@ abstract class AbstractAipService {
             return result;
         }
 
-        //String saveFileName = AipFileUtils.getFileNameWithoutExtension(dispFileName) + AipFileUtils.getExtension(dispFileName);
         String saveFileName = apiGuid + AipFileUtils.getExtension(dispFileName);
         Path fileStorageLocation = Paths.get(this.repo.getSettings().getSourceFileDir()) .toAbsolutePath().normalize();
 
         result.setDispFileName(dispFileName);
         result.setSaveFileName(saveFileName);
 
-        //log.error("{}, {}", dispFileName, saveFileName);
         Path targetLocation = fileStorageLocation.resolve(saveFileName);
         try {
             Files.copy(file.getInputStream(), targetLocation, StandardCopyOption.REPLACE_EXISTING);

+ 0 - 1
src/main/java/com/aip/gateway/api/service/impl/ApiFileService.java

@@ -137,7 +137,6 @@ public class ApiFileService extends AbstractAipService implements IApiFileServic
             return new ResponseFile(result.getErrorCode(), result.getErrorMessage(), result.getDispFileName());
         }
 
-        //log.error("{}, {}", result.getDispFileName(), result.getSaveFileName());
         RequestFileSet req = new RequestFileSet(baseReq.getApiKey(), baseReq.getEmail(), baseReq.getApiGuid(), "",
                 result.getDispFileName(), result.getSaveFileName(), this.repo.getSettings().getSetLabelId(), "SetEncryptFile");
         ResponseFile response = setLabel(req);

+ 4 - 4
src/main/resources/application.yml

@@ -1,8 +1,11 @@
+application:
+  name: AIP Gateway API Server
+  aip-server-id: 0
+
 spring:
   application:
     name: AipGateway.API
   main:
-    #web-application-type: none
     log-startup-info: true
     banner-mode: off
   mvc:
@@ -22,9 +25,6 @@ spring:
   datasource:
     hikari:
       driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-      #driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
-      #encrypt=false;
-      #jdbc-url: jdbc:log4jdbc:sqlserver://115.91.94.42:11433;databasename=aipdb;MultipleActiveResultSets=true;TrustServerCertificate=True;
       jdbc-url: jdbc:sqlserver://115.91.94.42:11433;DatabaseName=aipdb;MultipleActiveResultSets=true;TrustServerCertificate=True;
       username: ENC(04uwvbkIP0s=)
       password: ENC(04uwvbkIP0s=)

+ 12 - 12
src/main/resources/mybatis/mapper/BaseDbMapper.xml

@@ -3,6 +3,18 @@
 
 <mapper namespace="com.aip.gateway.api.dao.mapper.BaseDbMapper">
 
+    <select id="selectAipConfig" parameterType="java.util.HashMap" resultType="com.aip.gateway.api.entity.TbAipConfig" fetchSize="100">
+    <![CDATA[
+        SELECT A.Id as id,
+               A.AipServerId as aipServerId,
+               A.ConfigKey as configKey,
+               A.ConfigValue as configValue,
+               A.CreatedAt as createdAt
+        FROM TB_AIP_CONFIG A
+        WHERE A.AipServerId = convert(int, #{AIP_SERVER_ID})
+        ]]>
+    </select>
+
     <select id="selectLinkedApiKeys" resultType="com.aip.gateway.api.entity.TbLinkedApiKey" fetchSize="100">
     <![CDATA[
         SELECT A.Id as apiKeyId,
@@ -166,18 +178,6 @@
         ]]>
     </update>
 
-    <select id="selectAipConfig" parameterType="java.util.HashMap" resultType="com.aip.gateway.api.entity.TbAipConfig" fetchSize="100">
-    <![CDATA[
-        SELECT A.Id as id,
-               A.AipServerId as aipServerId,
-               A.ConfigKey as configKey,
-               A.ConfigValue as configValue,
-               A.CreatedAt as createdAt
-        FROM TB_AIP_CONFIG A
-        WHERE A.AipServerId = convert(int, #{AIP_SERVER_ID})
-        ]]>
-    </select>
-
 
     <insert id="insertAipCallLog" parameterType="com.aip.gateway.api.entity.TbAipCallLog">
     <![CDATA[

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно