@ -20,18 +20,25 @@ package cn.hippo4j.config.springboot1x.starter.web;
import cn.hippo4j.adapter.web.AbstractWebThreadPoolService ;
import cn.hippo4j.adapter.web.AbstractWebThreadPoolService ;
import cn.hippo4j.adapter.web.IWebThreadPoolHandlerSupport ;
import cn.hippo4j.adapter.web.IWebThreadPoolHandlerSupport ;
import cn.hippo4j.common.config.ApplicationContextHolder ;
import cn.hippo4j.common.config.ApplicationContextHolder ;
import lombok.extern.slf4j.Slf4j ;
import org.springframework.boot.context.embedded.EmbeddedServletContainer ;
import org.springframework.boot.context.embedded.EmbeddedServletContainer ;
import org.springframework.boot.context.embedded.EmbeddedWebApplicationContext ;
import org.springframework.boot.context.embedded.EmbeddedWebApplicationContext ;
import org.springframework.util.ReflectionUtils ;
import java.lang.reflect.Field ;
/ * *
/ * *
* Abstract class for adapting WebThreadPoolService to Spring 1. x version .
* Abstract class for adapting WebThreadPoolService to Spring 1. x version .
* /
* /
@Slf4j
public abstract class AbstractWebThreadPoolService1x extends AbstractWebThreadPoolService {
public abstract class AbstractWebThreadPoolService1x extends AbstractWebThreadPoolService {
public AbstractWebThreadPoolService1x ( IWebThreadPoolHandlerSupport support ) {
public AbstractWebThreadPoolService1x ( IWebThreadPoolHandlerSupport support ) {
super ( support ) ;
super ( support ) ;
}
}
private static final String STARTED_FIELD_NAME = "started" ;
/ * *
/ * *
* Get the embedded Servlet container from the Spring application context .
* Get the embedded Servlet container from the Spring application context .
* /
* /
@ -46,4 +53,5 @@ public abstract class AbstractWebThreadPoolService1x extends AbstractWebThreadPo
public Integer getPort ( ) {
public Integer getPort ( ) {
return getContainer ( ) . getPort ( ) ;
return getContainer ( ) . getPort ( ) ;
}
}
}
}