| 12345678910111213141516171819202122232425262728293031323334353637 |
- package com.gyee.ghost;/*
- @author 谢生杰
- @date 2022/8/3-17:10
- */
- import com.gyee.common.util.DateUtils;
- import com.gyee.ghost.service.RealtimeService;
- import com.gyee.ghost.service.auto.GhostService;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
- import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
- import javax.annotation.Resource;
- @SpringBootTest
- @RunWith(SpringRunner.class)
- @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
- public class GhostTest {
- @Resource
- private GhostService ghostService;
- @Resource
- private RealtimeService realtimeService;
- @Test
- public void test1(){
- String yesterday = DateUtils.getYesterdayStr("yyyy-MM-dd");
- try {
- realtimeService.saveWindturbineStatus2();
- // realtimeService.saveWindstationStatus(yesterday,yesterday);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
|