mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
添加 modul-info.java 剩余extra模块
This commit is contained in:
@@ -44,6 +44,13 @@
|
||||
<jakarta.servlet-api.version>6.1.0</jakarta.servlet-api.version>
|
||||
<jakarta.xml.soap-api.version>3.0.2</jakarta.xml.soap-api.version>
|
||||
<saaj-impl.version>3.0.4</saaj-impl.version>
|
||||
|
||||
<slf4j.version>2.0.9</slf4j.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<log4j2.version>2.20.0</log4j2.version>
|
||||
<tinylog.version>1.3.6</tinylog.version>
|
||||
<tinylog2.version>2.7.0</tinylog2.version>
|
||||
<commons-logging.version>1.3.4</commons-logging.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -135,6 +142,12 @@
|
||||
<artifactId>smart-http-server</artifactId>
|
||||
<version>${smartboot.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.smartboot.socket</groupId>
|
||||
<artifactId>aio-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- 仅用于测试 -->
|
||||
<dependency>
|
||||
@@ -155,5 +168,48 @@
|
||||
<version>1.7.36</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${log4j2.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tinylog</groupId>
|
||||
<artifactId>tinylog</artifactId>
|
||||
<version>${tinylog.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.tinylog</groupId>
|
||||
<artifactId>tinylog-api</artifactId>
|
||||
<version>${tinylog2.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>${commons-logging.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@@ -21,10 +21,10 @@ import cn.hutool.v7.http.HttpException;
|
||||
import cn.hutool.v7.http.server.ServerConfig;
|
||||
import cn.hutool.v7.http.server.engine.AbstractServerEngine;
|
||||
import org.smartboot.http.server.*;
|
||||
import org.smartboot.http.server.impl.Request;
|
||||
import org.smartboot.socket.extension.plugins.SslPlugin;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* smart-http-server引擎
|
||||
@@ -79,13 +79,16 @@ public class SmartHttpServerEngine extends AbstractServerEngine {
|
||||
// SSL
|
||||
final SSLContext sslContext = config.getSslContext();
|
||||
if(null != sslContext){
|
||||
final SslPlugin<Request> sslPlugin;
|
||||
try {
|
||||
sslPlugin = new SslPlugin<>(() -> sslContext);
|
||||
// 使用反射创建SslPlugin
|
||||
Class<?> sslPluginClass = Class.forName("org.smartboot.socket.extension.plugins.SslPlugin");
|
||||
Object sslPlugin = sslPluginClass.getConstructor(Supplier.class).newInstance((Supplier<SSLContext>) () -> sslContext);
|
||||
// 使用反射调用addPlugin方法
|
||||
Method addPlugin = configuration.getClass().getMethod("addPlugin", Object.class);
|
||||
addPlugin.invoke(configuration, sslPlugin);
|
||||
} catch (final Exception e) {
|
||||
throw new HttpException(e);
|
||||
}
|
||||
configuration.addPlugin(sslPlugin);
|
||||
}
|
||||
|
||||
// 选项
|
||||
|
@@ -19,6 +19,10 @@
|
||||
* @author choweli
|
||||
*/
|
||||
module hutool.http {
|
||||
exports cn.hutool.v7.http.meta;
|
||||
exports cn.hutool.v7.http.client;
|
||||
exports cn.hutool.v7.http;
|
||||
|
||||
requires jdk.httpserver;
|
||||
requires hutool.log;
|
||||
requires org.apache.httpcomponents.httpclient;
|
||||
@@ -36,6 +40,11 @@ module hutool.http {
|
||||
requires org.apache.tomcat.embed.core;
|
||||
|
||||
requires aio.pro;
|
||||
// requires aio.core;
|
||||
|
||||
opens cn.hutool.v7.http.client.engine;
|
||||
opens cn.hutool.v7.http.client.engine.httpclient5;
|
||||
opens cn.hutool.v7.http.client.engine.httpclient4;
|
||||
opens cn.hutool.v7.http.client.engine.okhttp;
|
||||
opens cn.hutool.v7.http.client.engine.jdk;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user