项目代码
能够正常断点到service代码
pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
BizTest
package com.xx.xx.test;
import com.xx.xx.orm.vo.req.stat.StatReqVo;
import com.xx.xx.service.stat.StatService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Map;
@RunWith(SpringRunner.class)
@SpringBootTest
public class StatServiceTest {
@Autowired
private StatService statService;
@Test
public void test() {
String start = "2023-11-01 00:00:00";
String end = "2023-11-30 23:59:59";
StatReqVo statReqVo = new StatReqVo();
statReqVo.setStart(start);
statReqVo.setEnd(end);
statReqVo.setIsRealApp(false);
Map<String, String> result = statService.statResult(statReqVo);
System.out.println("========= result ==========");
System.out.println(result);
}
}