升级springboot版本
This commit is contained in:
parent
cca2980efa
commit
0cc583b910
8
pom.xml
8
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<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.1.5</version>
|
<version>3.3.2</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.lion</groupId>
|
<groupId>com.lion</groupId>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.8.20</version>
|
<version>5.8.26</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -89,7 +89,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.21</version>
|
<version>1.26.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -101,7 +101,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
<version>4.1.101.Final</version>
|
<version>4.1.105.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -38,6 +38,7 @@ import org.springframework.beans.factory.aot.BeanRegistrationExcludeFilter;
|
|||||||
import org.springframework.beans.factory.config.BeanDefinition;
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
|
import org.springframework.beans.factory.config.ConstructorArgumentValues;
|
||||||
import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
|
import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
|
||||||
import org.springframework.beans.factory.support.RegisteredBean;
|
import org.springframework.beans.factory.support.RegisteredBean;
|
||||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||||
@ -201,8 +202,7 @@ public class MyBatisNativeConfiguration {
|
|||||||
} else {
|
} else {
|
||||||
result = (Class<?>) src;
|
result = (Class<?>) src;
|
||||||
}
|
}
|
||||||
} else if (src instanceof ParameterizedType) {
|
} else if (src instanceof ParameterizedType parameterizedType) {
|
||||||
ParameterizedType parameterizedType = (ParameterizedType) src;
|
|
||||||
int index = (parameterizedType.getRawType() instanceof Class
|
int index = (parameterizedType.getRawType() instanceof Class
|
||||||
&& Map.class.isAssignableFrom((Class<?>) parameterizedType.getRawType())
|
&& Map.class.isAssignableFrom((Class<?>) parameterizedType.getRawType())
|
||||||
&& parameterizedType.getActualTypeArguments().length > 1) ? 1 : 0;
|
&& parameterizedType.getActualTypeArguments().length > 1) ? 1 : 0;
|
||||||
@ -246,8 +246,10 @@ public class MyBatisNativeConfiguration {
|
|||||||
Class<?> mapperInterface = getMapperInterface(beanDefinition);
|
Class<?> mapperInterface = getMapperInterface(beanDefinition);
|
||||||
if (mapperInterface != null) {
|
if (mapperInterface != null) {
|
||||||
// Exposes a generic type information to context for prevent early initializing
|
// Exposes a generic type information to context for prevent early initializing
|
||||||
beanDefinition
|
ConstructorArgumentValues constructorArgumentValues = new ConstructorArgumentValues();
|
||||||
.setTargetType(ResolvableType.forClassWithGenerics(beanDefinition.getBeanClass(), mapperInterface));
|
constructorArgumentValues.addGenericArgumentValue(mapperInterface);
|
||||||
|
beanDefinition.setConstructorArgumentValues(constructorArgumentValues);
|
||||||
|
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(beanDefinition.getBeanClass(), mapperInterface));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,6 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
|
||||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||||
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
|
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
|
||||||
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
||||||
@ -321,7 +320,7 @@ public class PersonalServiceImpl{
|
|||||||
Files.walkFileTree(dirPath, new SimpleFileVisitor<>() {
|
Files.walkFileTree(dirPath, new SimpleFileVisitor<>() {
|
||||||
@Override
|
@Override
|
||||||
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
|
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
|
||||||
ArchiveEntry entry = new TarArchiveEntry(dir.toFile(), dirPath.relativize(dir).toString());
|
TarArchiveEntry entry = new TarArchiveEntry(dir.toFile(), dirPath.relativize(dir).toString());
|
||||||
aos.putArchiveEntry(entry);
|
aos.putArchiveEntry(entry);
|
||||||
aos.closeArchiveEntry();
|
aos.closeArchiveEntry();
|
||||||
return super.preVisitDirectory(dir, attrs);
|
return super.preVisitDirectory(dir, attrs);
|
||||||
@ -329,7 +328,7 @@ public class PersonalServiceImpl{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||||
ArchiveEntry entry = new TarArchiveEntry(file.toFile(), dirPath.relativize(file).toString());
|
TarArchiveEntry entry = new TarArchiveEntry(file.toFile(), dirPath.relativize(file).toString());
|
||||||
aos.putArchiveEntry(entry);
|
aos.putArchiveEntry(entry);
|
||||||
IOUtils.copy(Files.newInputStream(file.toFile().toPath()), aos);
|
IOUtils.copy(Files.newInputStream(file.toFile().toPath()), aos);
|
||||||
aos.closeArchiveEntry();
|
aos.closeArchiveEntry();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user