1. 程式人生 > >spring boot 測試類

spring boot 測試類

not factory slf4 framework wire factor contex clas ring

import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

@SpringBootTest
@RunWith(SpringRunner.class)
public class UserAddressTest {
private static final Logger LOG = LoggerFactory.getLogger(UserAddressTest.class);

//@Autowired
//private IUserAddressService addressService;


@Test
public void findAddress() {
// String userCode = "aa3ff3af-7ad2-4957-af6d-8822bd53b026";
// Result result = addressService.selectUserAddress(userCode);
// LOG.info("返回的結果是:{}",result);
// LOG.info("結果數據格式化後是:{}",JSON.toJSONString(result,SerializerFeature.PrettyFormat,SerializerFeature.WriteMapNullValue));
}
}

spring boot 測試類