diff --git a/README.md b/README.md index 0be6dcce..31b97022 100644 --- a/README.md +++ b/README.md @@ -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得贡献) | diff --git a/generator-web/pom.xml b/generator-web/pom.xml index 050e1c5c..c03aca64 100644 --- a/generator-web/pom.xml +++ b/generator-web/pom.xml @@ -7,7 +7,7 @@ com.softdev.system SpringBootCodeGenerator - 3.0 + 2023 generator-web @@ -42,7 +42,11 @@ junit --> - + + org.springframework.boot + spring-boot-autoconfigure + + diff --git a/generator-web/src/main/java/com/softdev/system/generator/config/GlobalDefaultExceptionHandler.java b/generator-web/src/main/java/com/softdev/system/generator/config/GlobalDefaultExceptionHandler.java index b265b7e1..837df06b 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/config/GlobalDefaultExceptionHandler.java +++ b/generator-web/src/main/java/com/softdev/system/generator/config/GlobalDefaultExceptionHandler.java @@ -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 diff --git a/generator-web/src/main/java/com/softdev/system/generator/config/WebMvcConfig.java b/generator-web/src/main/java/com/softdev/system/generator/config/WebMvcConfig.java index 4c9c5f1c..f7a573c6 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/config/WebMvcConfig.java +++ b/generator-web/src/main/java/com/softdev/system/generator/config/WebMvcConfig.java @@ -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; @@ -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; diff --git a/generator-web/src/main/java/com/softdev/system/generator/config/XssFilter.java b/generator-web/src/main/java/com/softdev/system/generator/config/XssFilter.java index e6399704..5689832e 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/config/XssFilter.java +++ b/generator-web/src/main/java/com/softdev/system/generator/config/XssFilter.java @@ -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; /** @@ -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); } diff --git a/generator-web/src/main/java/com/softdev/system/generator/config/XssHttpServletRequestWrapper.java b/generator-web/src/main/java/com/softdev/system/generator/config/XssHttpServletRequestWrapper.java index 8f89874f..9cbe5a35 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/config/XssHttpServletRequestWrapper.java +++ b/generator-web/src/main/java/com/softdev/system/generator/config/XssHttpServletRequestWrapper.java @@ -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; diff --git a/generator-web/src/main/java/com/softdev/system/generator/entity/ReturnT.java b/generator-web/src/main/java/com/softdev/system/generator/entity/ReturnT.java index 8d00dd38..5b8b3c62 100644 --- a/generator-web/src/main/java/com/softdev/system/generator/entity/ReturnT.java +++ b/generator-web/src/main/java/com/softdev/system/generator/entity/ReturnT.java @@ -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; @@ -11,6 +11,7 @@ * * @author zhengkai.blog.csdn.net */ +@EqualsAndHashCode(callSuper = true) @Data public class ReturnT extends HashMap { private static final long serialVersionUID = 1L; diff --git a/generator-web/src/main/resources/application-bejson.yml b/generator-web/src/main/resources/application-bejson.yml index b80cdf37..0042c8df 100644 --- a/generator-web/src/main/resources/application-bejson.yml +++ b/generator-web/src/main/resources/application-bejson.yml @@ -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在线代码生成 diff --git a/generator-web/src/main/resources/application-dev.yml b/generator-web/src/main/resources/application-dev.yml index fd3546a9..b152d729 100644 --- a/generator-web/src/main/resources/application-dev.yml +++ b/generator-web/src/main/resources/application-dev.yml @@ -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代码生成平台 diff --git a/generator-web/src/main/resources/application-devtools.yml b/generator-web/src/main/resources/application-devtools.yml index 381032e4..a3101628 100644 --- a/generator-web/src/main/resources/application-devtools.yml +++ b/generator-web/src/main/resources/application-devtools.yml @@ -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在线代码生成 diff --git a/pom.xml b/pom.xml index 32fa8c9c..926d3dac 100644 --- a/pom.xml +++ b/pom.xml @@ -5,13 +5,13 @@ com.softdev.system SpringBootCodeGenerator - 3.0 + 2023 pom org.springframework.boot spring-boot-starter-parent - 2.6.3 + 3.0.8 @@ -23,7 +23,7 @@ UTF-8 - 1.8 + 11 @@ -49,9 +49,16 @@ com.alibaba fastjson - 1.2.83 + 2.0.34 + + + jakarta.servlet + jakarta.servlet-api + 6.0.0 + provided + org.springframework.boot