- docker container prune : 仅删除停止运行的容器。
- docker rm -f $(docker ps -aq) : 删除所有容器(包括停止的、正在运行的)。
- docker container rm -f $(docker container ls -aq) : 同上。
TM1中,有几个设置可以限制ExecuteJavaS调用的Java程序,包括以下几项:
最大Java进程数 在TM1的配置文件(tm1s.cfg)中,可以设置最大Java进程数(MaxJavaProcess)。这个设置限制了同时运行的Java进程数量。如果ExecuteJavaS调用的Java程序数量超过了最大进程数,那么后续的调用将被阻塞,直到有Java进程结束。
最大Java线程数 在TM1的配置文件(tm1s.cfg)中,可以设置最大Java线程数(MaxJavaThread)。这个设置限制了单个Java进程中的最大线程数量。如果ExecuteJavaS调用的Java程序中创建了过多的线程,那么将无法创建新的线程,直到一些线程结束。
Java安全设置 在TM1的配置文件(tm1s.cfg)中,可以配置Java安全设置(JavaSecurityEnabled),启用或禁用Java安全管理器。如果Java安全管理器被启用,那么ExecuteJavaS调用的Java程序需要遵循Java安全策略,包括限制Java程序对操作系统和文件系统的访问等。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void stream(){ | |
List<String> myList = | |
Arrays.asList("a1", "a2", "b1", "c2", "c1"); | |
//查找第一个符合条件的 | |
myList | |
.stream() | |
.filter(x -> x.getClass().equals(StringHttpMessageConverter.class)) | |
.findFirst() | |
.orElse(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 打包时排除yml文件 --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<excludes> | |
<exclude>**/*.yml</exclude> | |
</excludes> | |
</configuration> | |
</plugin> |
NewerOlder