10 |
11 | , 您好!
12 |
13 |
14 | 您正在注册牛客网, 这是一封激活邮件, 请在1分钟内点击
15 | 此链接,
16 | 激活您的牛客账号!
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/main/resources/templates/mail/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 | , 您好!
12 |
13 |
14 | 您正在找回牛客账号的密码, 本次操作的验证码为 ,
15 | 有效时间5分钟, 请您及时进行操作!
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/test/java/com/zcx/community/BlockingQueueTests.java:
--------------------------------------------------------------------------------
1 | package com.zcx.community;
2 |
3 | import org.junit.runner.RunWith;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 | import org.springframework.test.context.junit4.SpringRunner;
6 |
7 | import java.util.Random;
8 | import java.util.concurrent.ArrayBlockingQueue;
9 | import java.util.concurrent.BlockingQueue;
10 |
11 | @SpringBootTest
12 | @RunWith(SpringRunner.class)
13 | public class BlockingQueueTests {
14 |
15 | public static void main(String[] args) {
16 | BlockingQueue queue = new ArrayBlockingQueue(10);
17 | new Thread(new Producer(queue)).start();
18 |
19 | new Thread(new Consumer(queue)).start();
20 | new Thread(new Consumer(queue)).start();
21 | new Thread(new Consumer(queue)).start();
22 | }
23 |
24 | }
25 |
26 | class Producer implements Runnable {
27 |
28 | private BlockingQueue