parent
016ab5a301
commit
333f676257
File diff suppressed because one or more lines are too long
@ -0,0 +1,50 @@ |
|||||||
|
package common; |
||||||
|
|
||||||
|
import com.CWebApplication; |
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.hai.common.utils.HttpsUtils; |
||||||
|
import com.hai.service.HighDiscountAgentCodeService; |
||||||
|
import com.hai.service.HighDiscountUserRelService; |
||||||
|
import com.hai.service.HighUserService; |
||||||
|
import org.junit.Test; |
||||||
|
import org.junit.runner.RunWith; |
||||||
|
import org.springframework.boot.test.context.SpringBootTest; |
||||||
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
||||||
|
import org.springframework.test.context.web.WebAppConfiguration; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @ClassName RegionTest |
||||||
|
* @Description: TODO () |
||||||
|
* @Author 胡锐 |
||||||
|
* @Date 2020/12/29 |
||||||
|
**/ |
||||||
|
public class test1 implements Runnable { |
||||||
|
/* |
||||||
|
|
||||||
|
public static void main(String[] args) { |
||||||
|
// 获取当前正在执行线程的引用,当前正在执行的线程是主线程,也就是获取主线程的引用
|
||||||
|
Runnable target; |
||||||
|
System.out.println("主线程的编号是:" + thread.getId() + ", 名称是:" + thread.getName()); |
||||||
|
thread.setName("order1"); |
||||||
|
|
||||||
|
for (int i = 0; i <= 100; i++) { |
||||||
|
Thread thread = new Thread(); |
||||||
|
} |
||||||
|
} |
||||||
|
*/ |
||||||
|
|
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
Thread t1 = Thread.currentThread(); |
||||||
|
System.out.println("子线程的编号是:" + t1.getId() + ", 名称是:" + t1.getName()); // 14 guanyu
|
||||||
|
t1.setName("zhangfei"); |
||||||
|
System.out.println("修改后子线程的编号是:" + t1.getId() + ", 名称是:" + t1.getName()); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue