Skip to content

Commit

Permalink
Merge pull request #139 from moshowgame/support_springboot3
Browse files Browse the repository at this point in the history
Support springboot3
  • Loading branch information
moshowgame authored Jul 10, 2023
2 parents 8f4e09d + fc27133 commit 17d668a
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 20 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Thanks for `JetBrains` providing us the `Licenses for Open Source Development`
# Update Logs
| 更新日期 | 更新内容 |
|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 2023.07.11 | 安全更新,正式支持SpringBoot3,javax升级到jakarta。 |
| 2023.01.02 | 新增TkMybatis模板(感谢@sgj666的建议)。 |
| 2023.01.01 | 新增GCP BigQuery/Dataflow JJS/QlikSense BI模板。 |
| 2022.09.28 | MySQL to Java type conversion 数据库类型转换优化(感谢@jadelike得贡献) |
Expand Down
8 changes: 6 additions & 2 deletions generator-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.softdev.system</groupId>
<artifactId>SpringBootCodeGenerator</artifactId>
<version>3.0</version>
<version>2023</version>
</parent>

<artifactId>generator-web</artifactId>
Expand Down Expand Up @@ -42,7 +42,11 @@
<artifactId>junit</artifactId>
</dependency>-->

</dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>


<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;

/**
* @author zhengkai.blog.csdn.net
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import jakarta.servlet.DispatcherType;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -11,7 +12,6 @@
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.DispatcherType;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.softdev.system.generator.config;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletRequest;

import java.io.IOException;

/**
Expand All @@ -18,8 +19,8 @@ public void init(FilterConfig config) throws ServletException {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(
(HttpServletRequest) request);

XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest)request);
chain.doFilter(xssRequest, response);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.softdev.system.generator.config;

import jakarta.servlet.ReadListener;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequestWrapper;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.LinkedHashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.softdev.system.generator.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -11,6 +11,7 @@
*
* @author zhengkai.blog.csdn.net
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ReturnT extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
Expand Down
2 changes: 1 addition & 1 deletion generator-web/src/main/resources/application-bejson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spring:
#mvc:
# static-path-pattern: /statics/**
OEM:
version: 2023.1
version: 2023.7
header: SQL转Java JPA、MYBATIS实现类代码生成平台
keywords: sql转实体类,sql转DAO,SQL转service,SQL转JPA实现,SQL转MYBATIS实现
title: JAVA在线代码生成
Expand Down
2 changes: 1 addition & 1 deletion generator-web/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spring:
#mvc:
# static-path-pattern: /statics/**
OEM:
version: 2023.1
version: 2023.7
header: SQL转Java JPA、MYBATIS实现类代码生成平台
keywords: sql转实体类,sql转DAO,SQL转service,SQL转JPA实现,SQL转MYBATIS实现
title: JAVA代码生成平台
Expand Down
2 changes: 1 addition & 1 deletion generator-web/src/main/resources/application-devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spring:
#mvc:
# static-path-pattern: /statics/**
OEM:
version: 2023.1
version: 2023.7
header: SQL转Java JPA、MYBATIS实现类代码生成平台
keywords: sql转实体类,sql转DAO,SQL转service,SQL转JPA实现,SQL转MYBATIS实现
title: JAVA在线代码生成
Expand Down
15 changes: 11 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

<groupId>com.softdev.system</groupId>
<artifactId>SpringBootCodeGenerator</artifactId>
<version>3.0</version>
<version>2023</version>
<packaging>pom</packaging>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.3</version>
<version>3.0.8</version>
</parent>

<modules>
Expand All @@ -23,7 +23,7 @@
<!-- 指定编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 指定jdk版本 -->
<java.version>1.8</java.version>
<java.version>11</java.version>
</properties>

<dependencies>
Expand All @@ -49,9 +49,16 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
<version>2.0.34</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api -->
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<!-- 支持 @ConfigurationProperties 注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down

0 comments on commit 17d668a

Please sign in to comment.