2018年10月26日

Spring bean

摘要: Spring中的bean默认都是单例的 一共有5种作用域:singleton、prototype、request、session和global session 设置方式只需要在形如:<bean id="XXX" class="com.mori.XXX" scope="singleton" /> 1、 阅读全文

posted @ 2018-10-26 17:48 植物大戰僵尸 阅读(184) 评论(0) 推荐(0) 编辑

多线程打印

摘要: public class Main { public static void main(String[] args){ ExecutorService pool = Executors.newFixedThreadPool(100); TestThread t = new TestThread(); for(int i = 0;i<100;... 阅读全文

posted @ 2018-10-26 17:39 植物大戰僵尸 阅读(161) 评论(0) 推荐(0) 编辑

导航