(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) { &...
public class test { public static void main(String[] args) { &...
java限制1个方法同一时间只能被一个线程访问public synchronized void setOrderPay(){ }加上synchronized 修饰符即可...
(1).java获取当前日期时间Date date = new Date(); System.out.println(date.toString());输出Fri Jul 02 10:29:55 CST 2021(2).java获取时间戳秒/毫秒D...
java正则表达式的捕获组捕获组可以将匹配到的结果根据正则中的括号进行分组,这里变量我加了$符,php转java的坏习惯,懒得改了,能跑就行// 匹配字符串 String $line = "gaojiufeng 1994! ok?...
java匹配一个字符串在另外一个字符串中出现的次数,java正则start,java正则end// 正则 String pattern = "\\bgao\\b"; // 字符串 String content ...