package com.mes; import com.mes.md.mapper.AccountMapper; import com.mes.md.service.AccountService; import lombok.extern.slf4j.Slf4j; 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; /** * @Author : yanzhixin * @Date: 2024/3/27 16:37 * @Description: */ @Slf4j @RunWith(SpringRunner.class) @SpringBootTest(classes = DeviceInteractionModuleApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class DeviceInteractionModuleApplicationTest { @Autowired AccountMapper AccountMapper; @Autowired AccountService accountService; @Test public void testFindPath() { //String url = getClass().getResource("").getPath(); //log.info("完整路径:{}", Arrays.asList(url)); log.info("完整路径"); } @Test public void testFindAccount() { Map Account=accountService.selectAccount("admin","12345"); if(Account.isEmpty()){ System.out.println("成功"); } log.info("{}",Account); } }