https://blog.csdn.net/z69183787/article/details/81117525

DefaultParameterNameDiscoverer().getParameterNames(real_bean_type.methods.first())

一些方法

加载的所有的Jar包

(Thread.currentThread().contextClassLoader as Launcher.AppClassLoader).urLs

获取类所在的Jar包

ComponentScan::class.java.protectionDomain.codeSource.location.file

启动参数

-Xmx 是VM参数 , 写到 jar 后面.
-jar 后面 两个减号是 jar 参数. 不能断.

限制线程数量:

java -Dloader.path=jar -Dfile.encoding=utf-8 -Xmx250m -jar xxx.jar --server.undertow.io-threads=16 --server.undertow.worker-threads=32 --server.dbIp=localhost

动态化注解配置.

@Configuration
@EnableScheduling
@ConditionalOnProperty(prefix = "scheduling", name="enabled", havingValue="true", matchIfMissing = true)
public class SchedulerConfig {

}

这样就让定时任务实现参数化.

相关文章:

  • 2022-01-02
  • 2021-08-29
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-05-18
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-04-12
  • 2021-12-15
  • 2021-08-28
  • 2021-06-23
相关资源
相似解决方案