add:新增手持接口
This commit is contained in:
@@ -2,8 +2,13 @@ package org.nl;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
@@ -14,8 +19,41 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
public class ApplicationTest {
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(ApplicationTest.class);
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
System.out.println(userService.list());
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
System.out.println("请输入第一个数:");
|
||||
int a = scanner.nextInt();
|
||||
System.out.println("请输入第一个数:");
|
||||
int b = scanner.nextInt();
|
||||
System.out.println("请输入第一个数:");
|
||||
int c = scanner.nextInt();
|
||||
//求最小值
|
||||
int min = (((a < b) ? a : b) < c) ?((a < b) ? a : b):c;
|
||||
//求最大值
|
||||
int max = (((a > b) ? a : b) > c) ?((a > b) ? a : b):c;
|
||||
//求中间值
|
||||
int mid = a + b + c - max - min;
|
||||
//排序
|
||||
System.out.println("最小值为:" + min + "中间值为:" + mid + "最大值为:" + max);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@Scheduled(cron = "0/5 * * * * ?")
|
||||
void testOrderTask() {
|
||||
logger.info(Thread.currentThread().getName() + "===task run");
|
||||
}
|
||||
|
||||
|
||||
@org.testng.annotations.Test
|
||||
void demo1() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user