Skip to content

Commit 1e7cf19

Browse files
committed
feat: 升级支持spring-boot3
1 parent db29b04 commit 1e7cf19

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.yeauty</groupId>
88
<artifactId>netty-websocket-spring-boot-starter</artifactId>
9-
<version>0.12.0</version>
9+
<version>0.13.0</version>
1010

1111
<name>netty-websocket-spring-boot-starter</name>
1212
<description>
@@ -37,7 +37,7 @@
3737

3838
<properties>
3939
<netty.version>4.1.67.Final</netty.version>
40-
<spring-boot.version>2.0.0.RELEASE</spring-boot.version>
40+
<spring-boot.version>3.3.5</spring-boot.version>
4141
</properties>
4242

4343
<dependencies>

src/main/java/org/yeauty/pojo/PojoMethodMapping.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
66
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
77
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
8+
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
89
import org.springframework.beans.factory.support.AbstractBeanFactory;
910
import org.springframework.context.ApplicationContext;
1011
import org.springframework.core.DefaultParameterNameDiscoverer;
@@ -246,8 +247,8 @@ private boolean isOverridenWithoutAnnotation(Method[] methods, Method superclazz
246247

247248
Object getEndpointInstance() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
248249
Object implement = pojoClazz.getDeclaredConstructor().newInstance();
249-
AutowiredAnnotationBeanPostProcessor postProcessor = applicationContext.getBean(AutowiredAnnotationBeanPostProcessor.class);
250-
postProcessor.postProcessPropertyValues(null, null, implement, null);
250+
AutowireCapableBeanFactory beanFactory = applicationContext.getAutowireCapableBeanFactory();
251+
beanFactory.autowireBean(implement);
251252
return implement;
252253
}
253254

0 commit comments

Comments
 (0)