(1)、引入POM依赖项
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency>
(2)、在Test目录编写测试类,举个栗子
@SpringBootTest public class createOrderRetail_Gelishi { @Autowired private IBillsEcJmsService ecJmsService; @Autowired private IBillsJmsService jmsService; @Autowired private ISystemParamsService systemParamsService; @Autowired private IECBillsSubmitService submitService; @Autowired @Qualifier("RestTemplateNoLoadBalanced") private RestTemplate restTemplate; @Test public void twoTest() { // 单据编号 String retailBillsId = ""; String billsOutsideId = ""; String platformOrderId = ""; // 订单冲单 createRetailByTest_retail(retailBillsId); }
然后通过idea执行此方法。
public class test { public static void main(String[] args) { &...
Java5 引入了一种主要用于数组的增强型 for 循环,类似js中的for inpublic class Member { public static void main(String[]&...
在java中字符串属于对象,刚开始我就疑惑为什么int char等类型都是小写,结果String是大写,java太反人类,后来才知道String是对象。(1).java创建字符串String text = "net"; String tex...
java stringBuffer(1).stringBuffer和stringBuilder区别stringBuffer是线程安全的,stringBuilder速度更快(2).简单的stringBuffer例子StringBuffer sBuffer = new&nb...
(1).java获取当前日期时间Date date = new Date(); System.out.println(date.toString());输出Fri Jul 02 10:29:55 CST 2021(2).java获取时间戳秒/毫秒D...
System.out.println("当前时间戳(秒): " + System.currentTimeMillis()/1000); System.out.println("当前时间戳(毫秒): " +&nb...