mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 03:52:50 +08:00
升级springboot3
This commit is contained in:
parent
77f77fd407
commit
756311e123
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "d95a58e77d314370862ffc4cdfdb8283",
|
"groupId" : "d95a58e77d314370862ffc4cdfdb8283",
|
||||||
"name" : "列表",
|
"name" : "列表",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1680332611352,
|
"updateTime" : 1692848227765,
|
||||||
"lock" : null,
|
"lock" : null,
|
||||||
"createBy" : null,
|
"createBy" : null,
|
||||||
"updateBy" : null,
|
"updateBy" : null,
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"requestBody" : "",
|
"requestBody" : "",
|
||||||
"headers" : [ ],
|
"headers" : [ ],
|
||||||
"paths" : [ ],
|
"paths" : [ ],
|
||||||
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [\"cb63a01c-63d7-4722-a2c4-48fffa4b3502\", \"876dd178-0065-42d5-989a-a6ef460113b1\"],\n \"timestamp\": 1647396771372,\n \"executeTime\": 11\n}",
|
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [\n \"0bde782e-fb15-4aaa-9795-406f644a513d\",\n \"08d818e1-62bb-426e-9eba-c88458c40e55\"\n ],\n \"timestamp\": 1692848223759,\n \"executeTime\": 10\n}",
|
||||||
"description" : null,
|
"description" : null,
|
||||||
"requestBodyDefinition" : null,
|
"requestBodyDefinition" : null,
|
||||||
"responseBodyDefinition" : {
|
"responseBodyDefinition" : {
|
||||||
@ -119,8 +119,7 @@
|
|||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import cn.dev33.satoken.stp.StpUtil
|
import cn.dev33.satoken.stp.StpUtil
|
||||||
var tokens = StpUtil.searchTokenValue("", -1, 0).map(it => it.replace('token:login:token:', ''))
|
var tokens = StpUtil.searchTokenValue("", 0, -1, true).map(it => it.replace('token:login:token:', ''))
|
||||||
|
|
||||||
return db.page("""
|
return db.page("""
|
||||||
select
|
select
|
||||||
su.id,
|
su.id,
|
||||||
|
@ -1,94 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.ssssssss</groupId>
|
|
||||||
<artifactId>magic-boot-parent</artifactId>
|
|
||||||
<version>0.0.2</version>
|
|
||||||
</parent>
|
|
||||||
<groupId>org.ssssssss</groupId>
|
|
||||||
<artifactId>magic-boot</artifactId>
|
|
||||||
<version>0.0.2</version>
|
|
||||||
<name>magic-boot</name>
|
|
||||||
<description>magic-boot</description>
|
|
||||||
<properties>
|
|
||||||
<java.version>17</java.version>
|
|
||||||
<magic-api.version>2.1.0</magic-api.version>
|
|
||||||
<druid.version>1.2.16</druid.version>
|
|
||||||
<hutool-all.version>5.8.15</hutool-all.version>
|
|
||||||
<sa-token.version>1.34.0</sa-token.version>
|
|
||||||
<poi.version>4.1.2</poi.version>
|
|
||||||
<mysql.connector.version>8.0.32</mysql.connector.version>
|
|
||||||
<aliyun-core.version>4.6.0</aliyun-core.version>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ssssssss</groupId>
|
|
||||||
<artifactId>magic-api-spring-boot-starter</artifactId>
|
|
||||||
<version>${magic-api.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
|
||||||
<version>${mysql.connector.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>druid-spring-boot-starter</artifactId>
|
|
||||||
<version>${druid.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-all</artifactId>
|
|
||||||
<version>${hutool-all.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.dev33</groupId>
|
|
||||||
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
|
||||||
<version>${sa-token.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ssssssss</groupId>
|
|
||||||
<artifactId>magic-api-plugin-task</artifactId>
|
|
||||||
<version>${magic-api.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.ssssssss</groupId>
|
|
||||||
<artifactId>magic-api-plugin-component</artifactId>
|
|
||||||
<version>${magic-api.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.poi</groupId>
|
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
<version>${poi.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.aliyun</groupId>
|
|
||||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
|
||||||
<version>${aliyun-core.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<finalName>magic-boot</finalName>
|
|
||||||
<mainClass>org.ssssssss.magicboot.MagicBootApplication</mainClass>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
|
94
pom.xml
94
pom.xml
@ -1,24 +1,98 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<packaging>pom</packaging>
|
|
||||||
<modules>
|
|
||||||
<module>magic-boot</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>3.0.4</version>
|
<version>3.1.2</version>
|
||||||
<relativePath/>
|
<relativePath/>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.ssssssss</groupId>
|
<groupId>org.ssssssss</groupId>
|
||||||
<artifactId>magic-boot-parent</artifactId>
|
<artifactId>magic-boot</artifactId>
|
||||||
<version>0.0.2</version>
|
<version>0.0.2</version>
|
||||||
<name>magic-boot-parent</name>
|
<name>magic-boot</name>
|
||||||
<description>magic-boot-parent</description>
|
<description>magic-boot</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
<magic-api.version>2.1.1</magic-api.version>
|
||||||
|
<druid.version>1.2.16</druid.version>
|
||||||
|
<hutool-all.version>5.8.15</hutool-all.version>
|
||||||
|
<sa-token.version>1.35.0.RC</sa-token.version>
|
||||||
|
<poi.version>4.1.2</poi.version>
|
||||||
|
<mysql.connector.version>8.0.32</mysql.connector.version>
|
||||||
|
<aliyun-core.version>4.6.0</aliyun-core.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ssssssss</groupId>
|
||||||
|
<artifactId>magic-api-spring-boot-starter</artifactId>
|
||||||
|
<version>${magic-api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>${mysql.connector.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>${druid.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>${hutool-all.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.dev33</groupId>
|
||||||
|
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
||||||
|
<version>${sa-token.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ssssssss</groupId>
|
||||||
|
<artifactId>magic-api-plugin-task</artifactId>
|
||||||
|
<version>${magic-api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ssssssss</groupId>
|
||||||
|
<artifactId>magic-api-plugin-component</artifactId>
|
||||||
|
<version>${magic-api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
<version>${poi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||||
|
<version>${aliyun-core.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>magic-boot</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.2.1.RELEASE</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>org.ssssssss.magicboot.MagicBootApplication</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
package org.ssssssss.magicboot.configuration;
|
package org.ssssssss.magicboot.configuration;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor;
|
|
||||||
import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer;
|
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
import org.ssssssss.magicboot.model.Global;
|
import org.ssssssss.magicboot.model.Global;
|
||||||
|
|
||||||
import java.util.concurrent.Executors;
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class WebConfiguration implements WebMvcConfigurer {
|
public class WebConfiguration implements WebMvcConfigurer {
|
||||||
|
|
@ -1,5 +1,8 @@
|
|||||||
package org.ssssssss.magicboot.extension;
|
package org.ssssssss.magicboot.extension;
|
||||||
|
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
@ -10,9 +13,6 @@ import org.ssssssss.magicapi.modules.servlet.ResponseModule;
|
|||||||
import org.ssssssss.script.annotation.Comment;
|
import org.ssssssss.script.annotation.Comment;
|
||||||
import org.ssssssss.script.functions.ExtensionMethod;
|
import org.ssssssss.script.functions.ExtensionMethod;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@Component
|
@Component
|
@ -3,7 +3,6 @@ package org.ssssssss.magicboot.utils;
|
|||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
import org.ssssssss.magicboot.model.Global;
|
|
||||||
|
|
||||||
|
|
||||||
public class WebUtils {
|
public class WebUtils {
|
11
src/main/resources/application-dev.yml
Normal file
11
src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
server:
|
||||||
|
port: 8089
|
||||||
|
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
username: root
|
||||||
|
password: 123456789
|
||||||
|
|
||||||
|
upload:
|
||||||
|
dir: /Users/lvjinze/mb/
|
Loading…
Reference in New Issue
Block a user