ssh中使用spring线程池
方法/步骤
1
配置spring.xml文件注入taskExecutorService使用线程池(在execute时,记得将里面引用的类实例化一次,并且里面的参数要是final的)
2
要是在配置spring线程池的时候,Exception in thread 'pool-1-thread-1' java.lang.NullPointerException出现这样的错误,就肯定是是引用的类,没有实例化
配置spring.xml文件注入taskExecutorService使用线程池(在execute时,记得将里面引用的类实例化一次,并且里面的参数要是final的)
要是在配置spring线程池的时候,Exception in thread 'pool-1-thread-1' java.lang.NullPointerException出现这样的错误,就肯定是是引用的类,没有实例化