Comments (5)
你具体有什么需求啊?
from solon.
from solon.
因为我用那个hot dev,自动重启后,因为我这个端口已经绑定了,所以启动不了了
from solon.
没事了
public class DestroyPlugin implements Plugin {
private List<Runnable> destroyMethod = new ArrayList<>();
@Override
public void start(final SolonApp app) {
Aop.context().beanExtractorAdd(Destroy.class, (be, method, anno) -> {
if (method.getParameters().length > 0) {
throw new IllegalArgumentException(lang.format("@Destroy 注解不支持参数注入: {}", method.toString()));
}
destroyMethod.add(() -> {
try {
method.invoke(be.get());
} catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
});
});
}
@Override
public void prestop() throws Throwable {
destroyMethod.forEach(Runnable::run);
}
}
from solon.
你强。。。我把你这个代码,转到内核里。
from solon.
Related Issues (20)
- 关于打包时出现的中文乱码问题 HOT 4
- @Async注解,支持指定线程池 HOT 6
- org.noear.solon.core.util.ClassUtil::loadClass 异常捕获新增NoClassDefFoundError捕获 HOT 1
- Com1、Com2 为 Windows 保留文件名,使用该命名会导致 Windows 下文件不可操作 HOT 2
- 任务发放:为 solon.boot.jdkhttp, jlhttp, smarthttp 定义统一的文件处理接口并优化 HOT 2
- 任务发放:优化 solon.boot.jetty 的文件上传,支持磁盘方案 HOT 2
- 任务发放:优化 solon.boot.undertow 的文件上传 HOT 1
- 支持使用命令行设置 构建 native image args HOT 4
- 测试用例建议使用h2数据库 HOT 1
- 测试模块支持断言native metadata HOT 1
- 任务发放:分离 websocket 和 socketd 的接口。用户层面更清爽 HOT 1
- 任务发放:添加 openapi3 的文档适配
- 建议将官方文档放到 git 上维护 HOT 3
- 希望文档增加gradle相关的配置,感谢 HOT 2
- A new RCE vulnerability HOT 3
- org.noear.solon.net.websocket.WebSocket 无法获取唯一识别的一个key HOT 5
- solon-openapi2-knife4j HOT 8
- BUG: java.lang.NoClassDefFoundError: org/noear/socketd/utils/Utils HOT 3
- Auth 中 exclude的参数疑问 HOT 11
- Idea中测试时,日志输出混合问题 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solon.