Bladeren bron

move package

4228306 6 jaren geleden
bovenliggende
commit
de19b65c54

+ 64 - 0
log/logback-info-%d{yyyy-MM-dd}.log

@@ -310,3 +310,67 @@ Error starting ApplicationContext. To display the conditions report re-run your
 2019-08-31 15:34:46.060 logback [main] INFO  o.s.b.w.e.u.UndertowServletWebServer - Undertow started on port(s) 8085 (http) with context path ''
 2019-08-31 15:34:46.063 logback [main] INFO  edu.math.diagnosis.BootApplication - Started BootApplication in 10.178 seconds (JVM running for 10.607)
 2019-08-31 15:34:46.137 logback [main] INFO  o.h.h.i.QueryTranslatorFactoryInitiator - HHH000397: Using ASTQueryTranslatorFactory
+2019-08-31 16:03:39.013 logback [main] INFO  edu.math.diagnosis.BootApplication - Starting BootApplication on bogon with PID 9008 (started by feick in /Users/feick/OneDrive - m.scnu.edu.cn/Workspace/IdeaProjects/diagnosis)
+2019-08-31 16:03:39.016 logback [main] INFO  edu.math.diagnosis.BootApplication - The following profiles are active: dev
+2019-08-31 16:03:40.364 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
+2019-08-31 16:03:40.365 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-08-31 16:03:40.580 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 208ms. Found 13 repository interfaces.
+2019-08-31 16:03:41.190 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$196ae186] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.230 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$b218a9c0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.237 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.240 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@45545e7a' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.244 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$d6ed4c72] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.249 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.297 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.redis-org.springframework.boot.autoconfigure.data.redis.RedisProperties' of type [org.springframework.boot.autoconfigure.data.redis.RedisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.304 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration' of type [org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$$EnhancerBySpringCGLIB$$2e849fd0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.522 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'lettuceClientResources' of type [io.lettuce.core.resource.DefaultClientResources] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.612 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConnectionFactory' of type [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.616 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [edu.math.diagnosis.config.RedisConfig$$EnhancerBySpringCGLIB$$88858f47] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 16:03:41.928 logback [main] INFO  io.undertow.servlet - Initializing Spring embedded WebApplicationContext
+2019-08-31 16:03:41.928 logback [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2858 ms
+2019-08-31 16:03:42.664 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
+2019-08-31 16:03:43.230 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
+2019-08-31 16:03:43.293 logback [main] INFO  o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2019-08-31 16:03:43.359 logback [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final}
+2019-08-31 16:03:43.360 logback [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
+2019-08-31 16:03:43.510 logback [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
+2019-08-31 16:03:43.664 logback [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
+2019-08-31 16:03:45.022 logback [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
+2019-08-31 16:03:45.787 logback [main] INFO  e.math.diagnosis.word.FormulaService - loading OMML2MML.XSL
+2019-08-31 16:03:46.074 logback [main] INFO  e.math.diagnosis.word.FormulaService - load OMML2MML.XSL finish
+2019-08-31 16:03:46.161 logback [main] INFO  edu.math.diagnosis.word.ExcelUtils - docpath: /Users/feick/OneDrive%20-%20m.scnu.edu.cn/Workspace/IdeaProjects/diagnosis/target/classes/doc/ 
+2019-08-31 16:03:46.593 logback [main] INFO  o.s.b.a.e.web.EndpointLinksResolver - Exposing 17 endpoint(s) beneath base path '/actuator'
+2019-08-31 16:03:46.874 logback [main] INFO  io.lettuce.core.EpollProvider - Starting without optional epoll library
+2019-08-31 16:03:46.876 logback [main] INFO  io.lettuce.core.KqueueProvider - Starting without optional kqueue library
+2019-08-31 16:03:47.123 logback [main] INFO  s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/resources/**'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/static/**'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**.js'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/upload/**'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.js'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/lang/*.json'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.css'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.map'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.png'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.jpg'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/open/**'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/v2/api-docs'], []
+2019-08-31 16:03:47.256 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/ui'], []
+2019-08-31 16:03:47.257 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources'], []
+2019-08-31 16:03:47.257 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/security'], []
+2019-08-31 16:03:47.257 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-ui.html'], []
+2019-08-31 16:03:47.304 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@4c954b79, org.springframework.security.web.context.SecurityContextPersistenceFilter@2ca3a203, org.springframework.security.web.header.HeaderWriterFilter@69a14512, org.springframework.security.web.authentication.logout.LogoutFilter@6ee34fe4, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@4843b35f, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@c105912, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1464a177, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4b38d912, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@58338338, org.springframework.security.web.session.SessionManagementFilter@2cbc0224, org.springframework.security.web.access.ExceptionTranslationFilter@63f08f9f, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@59eff566]
+2019-08-31 16:03:47.621 logback [main] INFO  o.s.b.a.w.s.WelcomePageHandlerMapping - Adding welcome page: class path resource [static/index.html]
+2019-08-31 16:03:48.018 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed
+2019-08-31 16:03:48.043 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
+2019-08-31 16:03:48.082 logback [main] INFO  s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references
+2019-08-31 16:03:48.283 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingGET_1
+2019-08-31 16:03:48.366 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: testUsingGET_1
+2019-08-31 16:03:48.907 logback [main] INFO  o.s.s.a.ScheduledAnnotationBeanPostProcessor - No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
+2019-08-31 16:03:48.928 logback [main] INFO  org.xnio - XNIO version 3.3.8.Final
+2019-08-31 16:03:48.937 logback [main] INFO  org.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final
+2019-08-31 16:03:48.996 logback [main] INFO  o.s.b.w.e.u.UndertowServletWebServer - Undertow started on port(s) 8085 (http) with context path ''
+2019-08-31 16:03:48.999 logback [main] INFO  edu.math.diagnosis.BootApplication - Started BootApplication in 10.579 seconds (JVM running for 11.015)
+2019-08-31 16:03:49.075 logback [main] INFO  o.h.h.i.QueryTranslatorFactoryInitiator - HHH000397: Using ASTQueryTranslatorFactory

+ 2 - 0
log/logback-warn-%d{yyyy-MM-dd}.log

@@ -10,3 +10,5 @@
 2019-08-31 15:25:36.366 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
 2019-08-31 15:34:39.213 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
 2019-08-31 15:34:43.517 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
+2019-08-31 16:03:41.904 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
+2019-08-31 16:03:46.445 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

+ 1 - 1
src/main/java/edu/math/diagnosis/controller/FileController.java

@@ -2,7 +2,7 @@ package edu.math.diagnosis.controller;
 
 import edu.math.diagnosis.model.ResponseMessage;
 import edu.math.diagnosis.service.FileService;
-import edu.math.diagnosis.util.aliyun.OSSUtil;
+import edu.math.diagnosis.util.OSSUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;

+ 1 - 1
src/main/java/edu/math/diagnosis/service/AliyunFileService.java

@@ -1,6 +1,6 @@
 package edu.math.diagnosis.service;
 
-import edu.math.diagnosis.util.aliyun.OSSUtil;
+import edu.math.diagnosis.util.OSSUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;

+ 1 - 1
src/main/java/edu/math/diagnosis/util/aliyun/OSSUtil.java → src/main/java/edu/math/diagnosis/util/OSSUtil.java

@@ -1,4 +1,4 @@
-package edu.math.diagnosis.util.aliyun;
+package edu.math.diagnosis.util;
 
 import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.model.PutObjectResult;

+ 10 - 9
src/main/java/edu/math/diagnosis/util/aliyun/SignatureUtils.java → src/main/java/edu/math/diagnosis/util/SignatureUtil.java

@@ -1,4 +1,4 @@
-package edu.math.diagnosis.util.aliyun;
+package edu.math.diagnosis.util;
 
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang3.StringUtils;
@@ -11,12 +11,13 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.TreeMap;
 
 
-public class SignatureUtils {
+public class SignatureUtil {
 
     private final static String CHARSET_UTF8 = "utf8";
     private final static String ALGORITHM = "UTF-8";
@@ -45,7 +46,7 @@ public class SignatureUtils {
         byte[] signBytes = hmacSHA1Signature(accessKeySecret + "&", signString);
         String signature = newStringByBase64(signBytes);
         System.out.println("signature---" + signature);
-        if ("POST".equals(method))
+        if ("POST".equals(method) || StringUtils.isBlank(signature))
             return signature;
         return URLEncoder.encode(signature, "UTF-8");
 
@@ -53,8 +54,7 @@ public class SignatureUtils {
 
     public static String generateSignString(String httpMethod, Map<String, String> parameter)
             throws IOException {
-        TreeMap<String, String> sortParameter = new TreeMap<String, String>();
-        sortParameter.putAll(parameter);
+        TreeMap<String, String> sortParameter = new TreeMap<>(parameter);
 
         String canonicalizedQueryString = generateQueryString(sortParameter, true);
         if (null == httpMethod) {
@@ -90,6 +90,7 @@ public class SignatureUtils {
             return value == null ? null : URLEncoder.encode(value, CHARSET_UTF8)
                     .replace("+", "%20").replace("*", "%2A").replace("%7E", "~");
         } catch (Exception e) {
+            e.printStackTrace();
         }
         return "";
     }
@@ -103,9 +104,9 @@ public class SignatureUtils {
             return null;
         }
         Mac mac = Mac.getInstance("HmacSHA1");
-        SecretKeySpec keySpec = new SecretKeySpec(secret.getBytes(CHARSET_UTF8), ALGORITHM);
+        SecretKeySpec keySpec = new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), ALGORITHM);
         mac.init(keySpec);
-        return mac.doFinal(baseString.getBytes(CHARSET_UTF8));
+        return mac.doFinal(baseString.getBytes(StandardCharsets.UTF_8));
     }
 
     public static String newStringByBase64(byte[] bytes)
@@ -114,7 +115,7 @@ public class SignatureUtils {
             return null;
         }
 
-        return new String(Base64.encodeBase64(bytes, false), CHARSET_UTF8);
+        return new String(Base64.encodeBase64(bytes, false), StandardCharsets.UTF_8);
     }
 
     public static void main(String[] args) {
@@ -125,7 +126,7 @@ public class SignatureUtils {
         String SignatureVersion = "1.0";
         String Action = "DescribeCdnService";
 
-        Map<String, String> param = new HashMap<String, String>();
+        Map<String, String> param = new HashMap<>();
         param.put("AccessKeyId", app_key);
         param.put("Format", Format);
         param.put("Version", Version);