浏览代码

[update] message:1.修改项目配置

kelei 11 月之前
父节点
当前提交
a13219753c

+ 2 - 28
admin/pom.xml

@@ -32,37 +32,11 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>easyexcel</artifactId>
-            <version>3.1.1</version>
         </dependency>
 
         <dependency>
-            <groupId>net.sf.jasperreports</groupId>
-            <artifactId>jasperreports</artifactId>
-            <version>6.17.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>net.sf.jasperreports</groupId>
-            <artifactId>jasperreports-fonts</artifactId>
-            <version>6.0.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.groovy</groupId>
-            <artifactId>groovy-all</artifactId>
-            <version>2.4.11</version>
-        </dependency>
-        <!-- 解决中文字体显示问题 -->
-        <dependency>
-            <groupId>cn.lesper</groupId>
-            <artifactId>iTextAsian</artifactId>
-            <version>3.0</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.zxing</groupId>
-            <artifactId>core</artifactId>
-            <version>3.5.0</version>
+            <groupId>cn.dev33</groupId>
+            <artifactId>sa-token-spring-boot-starter</artifactId>
         </dependency>
 
     </dependencies>

+ 1 - 0
admin/src/main/java/com/flyer/foster/AdminApplication.java

@@ -1,5 +1,6 @@
 package com.flyer.foster;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 

+ 34 - 0
admin/src/main/java/com/flyer/foster/config/MybatisPlusConfig.java

@@ -0,0 +1,34 @@
+package com.flyer.foster.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * MybatisPlusConfig
+ *
+ * @author kelei
+ * @since 2022/3/25/15:53
+ */
+@Configuration
+@MapperScan("com.flyer.foster.mapper")
+@EnableTransactionManagement
+public class MybatisPlusConfig {
+    /**
+     * 乐观锁插件
+     *
+     * @return
+     */
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
+        mybatisPlusInterceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
+        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return mybatisPlusInterceptor;
+    }
+}

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/MenuController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/menu")
+@RequestMapping("/menu")
 public class MenuController {
 
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/RoleController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/role")
+@RequestMapping("/role")
 public class RoleController {
 
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/RoleMenuController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/role-menu")
+@RequestMapping("/role-menu")
 public class RoleMenuController {
 
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/TenantController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/tenant")
+@RequestMapping("/tenant")
 public class TenantController {
 
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/UserController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/user")
+@RequestMapping("/user")
 public class UserController {
 
 }

+ 1 - 1
admin/src/main/java/com/flyer/foster/controller/UserRoleController.java

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
  * @since 2024-05-06
  */
 @RestController
-@RequestMapping("/foster/user-role")
+@RequestMapping("/user-role")
 public class UserRoleController {
 
 }

+ 18 - 0
admin/src/main/resources/application-dev.yml

@@ -0,0 +1,18 @@
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://118.195.172.253:3306/foster?serverTimezone=GMT%2B8&characterEncoding=utf-8
+    username: kelei
+    password: hx31Qk$Y6!cq$Mr^
+  redis:
+    database: 1
+    host: 192.168.0.204
+    lettuce:
+      pool:
+        max-active: 20
+        max-wait: -1
+    password: jiaguty
+mybatis-plus:
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

+ 28 - 0
admin/src/main/resources/application.yml

@@ -0,0 +1,28 @@
+server:
+  port: 9091
+spring:
+  profiles:
+    active: dev
+  servlet:
+    multipart:
+      max-file-size: 100MB #限制文件上传大小为100M
+      max-request-size: 100MB #限制请求大小100M
+  mvc:
+    async:
+      request-timeout: 60000
+
+sa-token:
+  # token 名称(同时也是 cookie 名称)
+  token-name: satoken
+  # token 有效期(单位:秒) 默认30天,-1 代表永久有效
+  timeout: 2592000
+  # token 最低活跃频率(单位:秒),如果 token 超过此时间没有访问系统就会被冻结,默认-1 代表不限制,永不冻结
+  active-timeout: -1
+  # 是否允许同一账号多地同时登录 (为 true 时允许一起登录, 为 false 时新登录挤掉旧登录)
+  is-concurrent: true
+  # 在多人登录同一账号时,是否共用一个 token (为 true 时所有登录共用一个 token, 为 false 时每次登录新建一个 token)
+  is-share: true
+  # token 风格(默认可取值:uuid、simple-uuid、random-32、random-64、random-128、tik)
+  token-style: uuid
+  # 是否输出操作日志
+  is-log: true

+ 14 - 0
pom.xml

@@ -32,6 +32,8 @@
         <dysmsapi.version>1.1.0</dysmsapi.version>
         <hutool.version>5.7.20</hutool.version>
         <hutool.pinyin.version>2.0.3.RELEASE</hutool.pinyin.version>
+        <satoken.version>1.37.0</satoken.version>
+        <easyexcel.version>3.1.1</easyexcel.version>
     </properties>
 
     <dependencyManagement>
@@ -92,6 +94,18 @@
                 <artifactId>TinyPinyin</artifactId>
                 <version>${hutool.pinyin.version}</version>
             </dependency>
+
+            <dependency>
+                <groupId>cn.dev33</groupId>
+                <artifactId>sa-token-spring-boot-starter</artifactId>
+                <version>${satoken.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>easyexcel</artifactId>
+                <version>${easyexcel.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>