码迷,mamicode.com
首页 > 编程语言 > 详细

spring boot 测试类

时间:2018-11-02 11:09:09      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:oid   junit4   public   spring   with   json.js   ott   nbsp   nal   

 

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 测试类

标签:oid   junit4   public   spring   with   json.js   ott   nbsp   nal   

原文地址:https://www.cnblogs.com/maohuidong/p/9894828.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!