- 浏览: 494909 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (563)
- 工作经验 (12)
- 数据库 (13)
- Servlet (10)
- Struts2 (1)
- Spring (25)
- Eclipse (5)
- Hibernate (5)
- Eclips (8)
- HTTP (7)
- J2EE (21)
- EHcache (1)
- HTML (11)
- 工具插件使用 (20)
- JPA (2)
- 杂谈 (17)
- 数据结构与算法 (3)
- Cloud Foundry (1)
- 安全 (10)
- J2SE (57)
- SQL (9)
- DB2 (6)
- 操作系统 (2)
- 设计模式 (1)
- 版本代码管理工具 (13)
- 面试 (10)
- 代码规范 (3)
- Tomcat (12)
- Ajax (5)
- 异常总结 (11)
- REST (2)
- 云 (2)
- RMI (3)
- SOA (1)
- Oracle (12)
- Javascript (20)
- jquery (7)
- JSP自定义标签 (2)
- 电脑知识 (5)
- 浏览器 (3)
- 正则表达式 (3)
- 建站解决问题 (38)
- 数据库设计 (3)
- git (16)
- log4j (1)
- 每天100行代码 (1)
- socket (0)
- java设计模式 耿祥义著 (0)
- Maven (14)
- ibatis (7)
- bug整理 (2)
- 邮件服务器 (8)
- Linux (32)
- TCP/IP协议 (5)
- java多线程并发 (7)
- IO (1)
- 网页小工具 (2)
- Flash (2)
- 爬虫 (1)
- CSS (6)
- JSON (1)
- 触发器 (1)
- java并发 (12)
- ajaxfileupload (1)
- js验证 (1)
- discuz (2)
- Mysql (14)
- jvm (2)
- MyBatis (10)
- POI (1)
- 金融 (1)
- VMWare (0)
- Redis (4)
- 性能测试 (2)
- PostgreSQL (1)
- 分布式 (2)
- Easy UI (1)
- C (1)
- 加密 (6)
- Node.js (1)
- 事务 (2)
- zookeeper (3)
- Spring MVC (2)
- 动态代理 (3)
- 日志 (2)
- 微信公众号 (2)
- IDEA (1)
- 保存他人遇到的问题 (1)
- webservice (11)
- memcached (3)
- nginx (6)
- 抓包 (1)
- java规范 (1)
- dubbo (3)
- xwiki (1)
- quartz (2)
- 数字证书 (1)
- spi (1)
- 学习编程 (6)
- dom4j (1)
- 计算机系统知识 (2)
- JAVA系统知识 (1)
- rpcf (1)
- 单元测试 (2)
- php (1)
- 内存泄漏cpu100%outofmemery (5)
- zero_copy (2)
- mac (3)
- hive (3)
- 分享资料整理 (0)
- 计算机网络 (1)
- 编写操作系统 (1)
- springboot (1)
最新评论
-
masuweng:
亦论一次OutOfMemoryError的定位与解错 -
变脸小伙:
引用[color=red][/color]百度推广中运用的技术 ...
Spring 3 mvc中返回pdf,json,xml等不同的view -
Vanillva:
不同之处是什么??
Mybatis中的like查询 -
thrillerzw:
转了。做个有理想的程序员
有理想的程序员必须知道的15件事 -
liujunhui1988:
觉得很有概括力
15 个必须知道的 Java 面试问题(2年工作经验)
源:http://blog.csdn.net/chszs/article/details/8219189
评:
作者:chszs,转载需注明。
作者博客主页:http://blog.csdn.net/chszs
本文提供了三个Spring多线程开发的例子,由浅入深,由于例子一目了然,所以并未做过多的解释。诸位一看便知。
前提条件:
1)在Eclipse创建一个Java项目,我取名为SpringThreadDemo。
2)项目所需的JAR包如图所示:
下面开始。
注:项目源码已经托管到GitHub,地址:https://github.com/chszs/SpringThreadDemo
例子1:Spring结合Java线程。
通过继承Thread创建一个简单的Java线程,然后使用@Component让Spring容器管理此线程,Bean的范围必须是prototype,因此每个请求都会返回一个新实例,运行每个单独的线程。
PrintThread.java
[java] view plaincopyprint?
package com.chszs.thread;
import org.springframework.stereotype.Component;
import org.springframework.context.annotation.Scope;
@Component
@Scope("prototype")
public class PrintThread extends Thread{
@Override
public void run(){
System.out.println(getName() + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(getName() + " is running again.");
}
}
AppConfig.java
[java] view plaincopyprint?
package com.chszs.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan(basePackages="com.chszs.thread")
public class AppConfig {
}
App.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.chszs.config.AppConfig;
import com.chszs.thread.PrintThread;
public class App {
public static void main(String[] args){
ApplicationContext ctx =
new AnnotationConfigApplicationContext(AppConfig.class);
PrintThread printThread1 = (PrintThread)ctx.getBean("printThread");
printThread1.setName("Thread 1");
PrintThread printThread2 = (PrintThread)ctx.getBean("printThread");
printThread2.setName("Thread 2");
PrintThread printThread3 = (PrintThread)ctx.getBean("printThread");
printThread3.setName("Thread 3");
PrintThread printThread4 = (PrintThread)ctx.getBean("printThread");
printThread4.setName("Thread 4");
PrintThread printThread5 = (PrintThread)ctx.getBean("printThread");
printThread5.setName("Thread 5");
printThread1.start();
printThread2.start();
printThread3.start();
printThread4.start();
printThread5.start();
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Thread 4 is running.
Thread 5 is running.
Thread 3 is running.
Thread 2 is running again.
Thread 1 is running again.
Thread 5 is running again.
Thread 4 is running again.
Thread 3 is running again.
例子2:Spring线程池结合非Spring托管Bean。
使用Spring的ThreadPoolTaskExecutor类创建一个线程池。执行线程无需受Spring容器的管理。
PrintTask.java
[java] view plaincopyprint?
package com.chszs.thread;
public class PrintTask implements Runnable{
String name;
public PrintTask(String name){
this.name = name;
}
@Override
public void run() {
System.out.println(name + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(name + " is running again.");
}
}
Spring-Config.xml
[html] view plaincopyprint?
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<bean id="taskExecutor"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="5" />
<property name="maxPoolSize" value="10" />
<property name="WaitForTasksToCompleteOnShutdown" value="true" />
</bean>
</beans>
注意这个Spring配置文件的位置,如图所示:
App1.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.chszs.thread.PrintTask;
public class App1 {
public static void main(String[] args) {
ApplicationContext ctx =
new ClassPathXmlApplicationContext("resources/Spring-Config.xml");
ThreadPoolTaskExecutor taskExecutor =
(ThreadPoolTaskExecutor)ctx.getBean("taskExecutor");
taskExecutor.execute(new PrintTask("Thread 1"));
taskExecutor.execute(new PrintTask("Thread 2"));
taskExecutor.execute(new PrintTask("Thread 3"));
taskExecutor.execute(new PrintTask("Thread 4"));
taskExecutor.execute(new PrintTask("Thread 5"));
// 检查活动的线程,如果活动线程数为0则关闭线程池
for(;;){
int count = taskExecutor.getActiveCount();
System.out.println("Active Threads : " + count);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
e.printStackTrace();
}
if(count==0){
taskExecutor.shutdown();
break;
}
}
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Thread 3 is running.
Thread 4 is running.
Active Threads : 4
Thread 5 is running.
Active Threads : 5
Active Threads : 5
Active Threads : 5
Active Threads : 5
Active Threads : 5
Thread 4 is running again.
Thread 2 is running again.
Thread 3 is running again.
Thread 1 is running again.
Thread 5 is running again.
Active Threads : 0
作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs
例子3:Spring线程池结合Spring托管Bean。
本例仍然使用ThreadPoolTaskExecutor类,并使用@Component注释声明Spring的托管Bean。
下面的例子PrintTask2是Spring的托管Bean,使用@Autowired注释简化代码。
PrintTask2.java
[java] view plaincopyprint?
package com.chszs.thread;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component
@Scope("prototype")
public class PrintTask2 implements Runnable {
String name;
public void setName(String name) {
this.name = name;
}
@Override
public void run(){
System.out.println(name + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(name + " is running again.");
}
}
AppConfig.java
[java] view plaincopyprint?
package com.chszs.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
@ComponentScan(basePackages="com.chszs.thread")
public class AppConfig {
@Bean
public ThreadPoolTaskExecutor taskExecutor(){
ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
pool.setCorePoolSize(5);
pool.setMaxPoolSize(10);
pool.setWaitForTasksToCompleteOnShutdown(true);
return pool;
}
}
App2.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.chszs.config.AppConfig;
import com.chszs.thread.PrintTask2;
public class App2 {
public static void main(String[] args) {
ApplicationContext ctx =
new AnnotationConfigApplicationContext(AppConfig.class);
ThreadPoolTaskExecutor taskExecutor =
(ThreadPoolTaskExecutor)ctx.getBean("taskExecutor");
PrintTask2 printTask1 = (PrintTask2)ctx.getBean("printTask2");
printTask1.setName("Thread 1");
taskExecutor.execute(printTask1);
PrintTask2 printTask2 = (PrintTask2)ctx.getBean("printTask2");
printTask2.setName("Thread 2");
taskExecutor.execute(printTask2);
PrintTask2 printTask3 = (PrintTask2)ctx.getBean("printTask2");
printTask3.setName("Thread 3");
taskExecutor.execute(printTask3);
for(;;){
int count = taskExecutor.getActiveCount();
System.out.println("Active Threads : " + count);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
e.printStackTrace();
}
if(count==0){
taskExecutor.shutdown();
break;
}
}
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Active Threads : 2
Thread 3 is running.
Active Threads : 3
Active Threads : 3
Active Threads : 3
Active Threads : 3
Thread 1 is running again.
Thread 2 is running again.
Thread 3 is running again.
Active Threads : 1
Active Threads : 0
从这三个简单的实例中,你是不是发现了Spring框架在多线程方面的强大之处!!
评:
作者:chszs,转载需注明。
作者博客主页:http://blog.csdn.net/chszs
本文提供了三个Spring多线程开发的例子,由浅入深,由于例子一目了然,所以并未做过多的解释。诸位一看便知。
前提条件:
1)在Eclipse创建一个Java项目,我取名为SpringThreadDemo。
2)项目所需的JAR包如图所示:
下面开始。
注:项目源码已经托管到GitHub,地址:https://github.com/chszs/SpringThreadDemo
例子1:Spring结合Java线程。
通过继承Thread创建一个简单的Java线程,然后使用@Component让Spring容器管理此线程,Bean的范围必须是prototype,因此每个请求都会返回一个新实例,运行每个单独的线程。
PrintThread.java
[java] view plaincopyprint?
package com.chszs.thread;
import org.springframework.stereotype.Component;
import org.springframework.context.annotation.Scope;
@Component
@Scope("prototype")
public class PrintThread extends Thread{
@Override
public void run(){
System.out.println(getName() + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(getName() + " is running again.");
}
}
AppConfig.java
[java] view plaincopyprint?
package com.chszs.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan(basePackages="com.chszs.thread")
public class AppConfig {
}
App.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.chszs.config.AppConfig;
import com.chszs.thread.PrintThread;
public class App {
public static void main(String[] args){
ApplicationContext ctx =
new AnnotationConfigApplicationContext(AppConfig.class);
PrintThread printThread1 = (PrintThread)ctx.getBean("printThread");
printThread1.setName("Thread 1");
PrintThread printThread2 = (PrintThread)ctx.getBean("printThread");
printThread2.setName("Thread 2");
PrintThread printThread3 = (PrintThread)ctx.getBean("printThread");
printThread3.setName("Thread 3");
PrintThread printThread4 = (PrintThread)ctx.getBean("printThread");
printThread4.setName("Thread 4");
PrintThread printThread5 = (PrintThread)ctx.getBean("printThread");
printThread5.setName("Thread 5");
printThread1.start();
printThread2.start();
printThread3.start();
printThread4.start();
printThread5.start();
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Thread 4 is running.
Thread 5 is running.
Thread 3 is running.
Thread 2 is running again.
Thread 1 is running again.
Thread 5 is running again.
Thread 4 is running again.
Thread 3 is running again.
例子2:Spring线程池结合非Spring托管Bean。
使用Spring的ThreadPoolTaskExecutor类创建一个线程池。执行线程无需受Spring容器的管理。
PrintTask.java
[java] view plaincopyprint?
package com.chszs.thread;
public class PrintTask implements Runnable{
String name;
public PrintTask(String name){
this.name = name;
}
@Override
public void run() {
System.out.println(name + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(name + " is running again.");
}
}
Spring-Config.xml
[html] view plaincopyprint?
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<bean id="taskExecutor"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="5" />
<property name="maxPoolSize" value="10" />
<property name="WaitForTasksToCompleteOnShutdown" value="true" />
</bean>
</beans>
注意这个Spring配置文件的位置,如图所示:
App1.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.chszs.thread.PrintTask;
public class App1 {
public static void main(String[] args) {
ApplicationContext ctx =
new ClassPathXmlApplicationContext("resources/Spring-Config.xml");
ThreadPoolTaskExecutor taskExecutor =
(ThreadPoolTaskExecutor)ctx.getBean("taskExecutor");
taskExecutor.execute(new PrintTask("Thread 1"));
taskExecutor.execute(new PrintTask("Thread 2"));
taskExecutor.execute(new PrintTask("Thread 3"));
taskExecutor.execute(new PrintTask("Thread 4"));
taskExecutor.execute(new PrintTask("Thread 5"));
// 检查活动的线程,如果活动线程数为0则关闭线程池
for(;;){
int count = taskExecutor.getActiveCount();
System.out.println("Active Threads : " + count);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
e.printStackTrace();
}
if(count==0){
taskExecutor.shutdown();
break;
}
}
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Thread 3 is running.
Thread 4 is running.
Active Threads : 4
Thread 5 is running.
Active Threads : 5
Active Threads : 5
Active Threads : 5
Active Threads : 5
Active Threads : 5
Thread 4 is running again.
Thread 2 is running again.
Thread 3 is running again.
Thread 1 is running again.
Thread 5 is running again.
Active Threads : 0
作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs
例子3:Spring线程池结合Spring托管Bean。
本例仍然使用ThreadPoolTaskExecutor类,并使用@Component注释声明Spring的托管Bean。
下面的例子PrintTask2是Spring的托管Bean,使用@Autowired注释简化代码。
PrintTask2.java
[java] view plaincopyprint?
package com.chszs.thread;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component
@Scope("prototype")
public class PrintTask2 implements Runnable {
String name;
public void setName(String name) {
this.name = name;
}
@Override
public void run(){
System.out.println(name + " is running.");
try{
Thread.sleep(5000);
}catch(InterruptedException e){
e.printStackTrace();
}
System.out.println(name + " is running again.");
}
}
AppConfig.java
[java] view plaincopyprint?
package com.chszs.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@Configuration
@ComponentScan(basePackages="com.chszs.thread")
public class AppConfig {
@Bean
public ThreadPoolTaskExecutor taskExecutor(){
ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
pool.setCorePoolSize(5);
pool.setMaxPoolSize(10);
pool.setWaitForTasksToCompleteOnShutdown(true);
return pool;
}
}
App2.java
[java] view plaincopyprint?
package com.chszs;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import com.chszs.config.AppConfig;
import com.chszs.thread.PrintTask2;
public class App2 {
public static void main(String[] args) {
ApplicationContext ctx =
new AnnotationConfigApplicationContext(AppConfig.class);
ThreadPoolTaskExecutor taskExecutor =
(ThreadPoolTaskExecutor)ctx.getBean("taskExecutor");
PrintTask2 printTask1 = (PrintTask2)ctx.getBean("printTask2");
printTask1.setName("Thread 1");
taskExecutor.execute(printTask1);
PrintTask2 printTask2 = (PrintTask2)ctx.getBean("printTask2");
printTask2.setName("Thread 2");
taskExecutor.execute(printTask2);
PrintTask2 printTask3 = (PrintTask2)ctx.getBean("printTask2");
printTask3.setName("Thread 3");
taskExecutor.execute(printTask3);
for(;;){
int count = taskExecutor.getActiveCount();
System.out.println("Active Threads : " + count);
try{
Thread.sleep(1000);
}catch(InterruptedException e){
e.printStackTrace();
}
if(count==0){
taskExecutor.shutdown();
break;
}
}
}
}
输出:
Thread 1 is running.
Thread 2 is running.
Active Threads : 2
Thread 3 is running.
Active Threads : 3
Active Threads : 3
Active Threads : 3
Active Threads : 3
Thread 1 is running again.
Thread 2 is running again.
Thread 3 is running again.
Active Threads : 1
Active Threads : 0
从这三个简单的实例中,你是不是发现了Spring框架在多线程方面的强大之处!!
发表评论
-
使用Spring+Junit+Mockito做代码自测
2019-05-29 15:27 455源:https://blog.csdn.net/z19917 ... -
BeanCopier系列之一:特性测试
2018-06-12 12:15 400源:http://czj4451.iteye.com/ ... -
Lombok 之 ToString
2018-03-20 19:35 593源:http://himichaelchu.iteye.com ... -
extends和super的区别
2018-01-14 19:05 536源:http://bbs.csdn.net/topics/38 ... -
NullPointerException丢失异常堆栈信息
2017-09-25 11:23 968源:http://blog.csdn.net/taotao4/ ... -
double转BigDecimal,数变大
2017-09-09 14:02 569源:http://blog.csdn.net/linbrain ... -
在同一个类中调用另一个方法没有触发 Spring AOP 的问题
2017-08-24 17:22 542源:https://segmentfault.com/a/11 ... -
CopyOnWriteArrayList类set方法疑惑?
2016-09-28 15:36 605源:http://ifeve.com/copyonwritea ... -
Spring Transaction属性之Propagation
2016-08-10 17:09 516源:http://blog.csdn.net/kiwi_cod ... -
循环依赖检测方法 spring源码方法
2016-07-06 18:58 1113场景:checkForAliasCircle(name, al ... -
JAVA实现SFTP实例
2016-04-20 19:10 456源:http://www.cnblogs.com/chen19 ... -
Oracle模糊查询之(4.采用全文索引解决模糊查询,给出具体步骤)采用全文索引解决模糊查询速度慢的问题[主文]
2016-03-24 16:16 818源:http://blog.csdn.net/haiross/ ... -
理解和正确使用Java中的断言(assert)
2016-03-24 15:55 1028源:http://blog.csdn.net/leic ... -
Spring的Quartz定时器同一时刻重复执行二次的问题解决
2016-03-11 18:27 943源:http://www.linuxidc.com/Linux ... -
string stringbuffer stringbuilder区别
2016-03-07 15:39 423string 是不可变类,内部数据结构为final char数 ... -
spring factory-method
2016-03-01 11:22 460源:http://blog.sina.com.cn/s/blo ... -
spring中lazy-init详解
2016-02-29 17:01 747源:http://blog.csdn.net/fhx0 ... -
自旋锁、排队自旋锁、MCS锁、CLH锁
2016-02-19 17:08 477源:http://coderbee.net/index.php ... -
Spring Refresh Application Context
2015-12-13 14:48 805源:http://techdive.in/spring/spr ... -
Axis1.x WebService开发指南—目录索引
2015-11-30 15:54 598源:http://www.cnblogs.com/hoojo/ ...
相关推荐
springmvc+spring线程池处理http并发请求数据同步控制问题
线程池例子线程池例子线程池例子线程池例子
ActiveMQ与Spring线程池整合的一个实例。 lib库没有上传。 对于实例的讲解,在竹子的论坛有我对这个实例的帖子(http://www.java2000.net/viewthread.jsp?tid=1167) lib中包含: apache-activemq-4.1.1.jar ...
NULL 博文链接:https://hoochiang.iteye.com/blog/2249733
数据库连接是一种关键的有限的昂贵的资源,这一点在多用户网页应用程序中体现的尤为突出。对数据库连接的管理能显著影响到整个应用的伸缩性和健壮性,影响到程序的性能指标。
Spring3开发实战
Spring中的同步执行器 1. SyncTaskExecutor:同步可以用SyncTaskExecutor,但这个可以说不算一个线程池,因为还在原线程执行。这个类没有实现异步调用,只是一个同步操作。 2.也可以用ThreadPoolTaskExecutor结合...
《Vue Spring Boot前后端分离开发实战》源码 Vue+Spring Boot前后端分离开发实战教学课件(PPT)
Spring 线程池 demo
1.精通Spring 4.x 企业应用开发实战精通Spring 4.x 企业应用开发实战精通Spring 4.x 企业应用开发实战精通Spring 4.x 企业应用开发实战精通Spring 4.x 企业应用开发实战精通Spring 4.x 企业应用开发实战精通Spring 4...
比较实用的springMvc+spring+Mybatis 实战案例
Spring+Boot实战 Spring+Boot实战 Spring+Boot实战 Spring+Boot实战
Spring应用开发实战,光盘中附录B,包含Web Service WS的详细讲解。
spring-boot实战PDF 完整版和随书源码.7z spring-boot实战PDF 完整版和随书源码.7z
最代码,http://www.zuidaima.com/share/1724478138158080.htm 的代码及例子
NULL 博文链接:https://bijian1013.iteye.com/blog/2368708
本书是在《精通Spring 3.x――企业应用开发详解》的基础上,历时一年的重大调整改版而成的,延续了上一版本“追求深度,注重原理,不停留在技术表面”的写作风格,力求使读者在熟练使用Spring的各项功能的同时透彻...
Spring Boot Vue前后端分离开发实战.pdf 上手简单,文档讲述清晰,实在好用。