shuhao 5 days ago
parent
commit
917bb2141e

+ 0 - 1
src/main/java/com/xiesx/fastboot/core/jpa/JpaPlusRepository.java

@@ -2,7 +2,6 @@ package com.xiesx.fastboot.core.jpa;
 
 import java.util.List;
 
-import com.xiesx.fastboot.core.jpa.annotation.TargetDataSource;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.domain.Sort;

+ 1 - 2
src/main/java/com/xiesx/fastboot/core/jpa/JpaPlusRepositoryExecutor.java

@@ -49,8 +49,7 @@ public class JpaPlusRepositoryExecutor<T, ID> extends SimpleJpaRepository<T, ID>
         this.jpaQueryFactory = new JPAQueryFactory(entityManager);
         this.path = SimpleEntityPathResolver.INSTANCE.createPath(domainClass);
         this.querydsl = new Querydsl(entityManager, new PathBuilder<T>(path.getType(), path.getMetadata()));
-        this.jpaPredicateExecutor =
-                new QuerydslJpaPredicateExecutor<>(JpaEntityInformationSupport.getEntityInformation(domainClass, entityManager),
+        this.jpaPredicateExecutor = new QuerydslJpaPredicateExecutor<>(JpaEntityInformationSupport.getEntityInformation(domainClass, entityManager),
                         entityManager, SimpleEntityPathResolver.INSTANCE, getRepositoryMethodMetadata());
     }
 

+ 5 - 3
src/main/java/com/xiesx/fastboot/core/token/handle/TokenInterceptorHandler.java

@@ -134,15 +134,17 @@ public class TokenInterceptorHandler implements HandlerInterceptor {
             BufferedReader streamReader = new BufferedReader( new InputStreamReader(request.getInputStream(), "UTF-8"));
             StringBuilder responseStrBuilder = new StringBuilder();
             String inputStr;
-            while ((inputStr = streamReader.readLine()) != null)
+            while ((inputStr = streamReader.readLine()) != null){
                 responseStrBuilder.append(inputStr);
+            }
 
             JSONObject jsonObject = JSONObject.parseObject(responseStrBuilder.toString());
             Set<String> keySet = jsonObject.keySet();
             for(String k : keySet){
 
-                if(!k.equals(key))
-                request.setAttribute(k, jsonObject.get(k));
+                if(!k.equals(key)){
+                    request.setAttribute(k, jsonObject.get(k));
+                }
 
             }
             return jsonObject.get(key);

+ 0 - 3
src/main/java/com/xiesx/fastboot/utils/ArrayUtils.java

@@ -12,7 +12,6 @@ public class ArrayUtils {
     /**
      * list转str[]
      *
-     * @param str
      * @return
      */
     public static String[] listToArray(List<String> list) {
@@ -53,7 +52,6 @@ public class ArrayUtils {
     /**
      * list转str
      *
-     * @param str
      * @return
      */
     public static String joinTolist(List<String> list) {
@@ -63,7 +61,6 @@ public class ArrayUtils {
     /**
      * list转str
      *
-     * @param str
      * @param separator
      * @return
      */

+ 6 - 1
src/main/resources/application.yml

@@ -1,4 +1,9 @@
-
+spring:
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/xxxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
+    username: xxx
+    password: xxx
 
 logging:
   config: classpath:log4j2.xml