切换到jackson #10

Merged
xiaohai2271 merged 33 commits from feature-trans2jackson into dev 2020-08-15 16:05:40 +08:00
3 changed files with 3 additions and 9 deletions
Showing only changes of commit a7f947a017 - Show all commits

View File

@@ -76,14 +76,6 @@
<scope>compile</scope>
</dependency>
<!--Json-->
<!-- <dependency>-->
<!-- <groupId>net.sf.json-lib</groupId>-->
<!-- <artifactId>json-lib</artifactId>-->
<!-- <version>2.4</version>-->
<!-- <classifier>jdk15</classifier>-->
<!-- </dependency>-->
<!-- 七牛云SDK -->
<dependency>
<groupId>com.qiniu</groupId>

View File

@@ -283,6 +283,7 @@ public class BaseTest {
protected void mockInjectInstance(Object service, String mailFiledName, Object impl) {
Field field;
try {
assertNotNull(service);
field = service.getClass().getDeclaredField(mailFiledName);
field.setAccessible(true);
field.set(service, impl);

View File

@@ -48,6 +48,7 @@ public class UserControllerTest extends BaseTest {
};
private static final TypeReference<?> USER_MODEL_LIST_TYPE = new TypeReference<Response<List<Map<String, Object>>>>() {
};
@Autowired
UserService userService;
@@ -90,7 +91,7 @@ public class UserControllerTest extends BaseTest {
@Test
public void getUserInfo() throws Exception {
getMockData(get("/user/userInfo"), userLogin()).andDo(result -> {
getMockData(get("/user/userInfo"), adminLogin()).andDo(result -> {
Response<UserModel> response = getResponse(result, USER_MODEL_TYPE);
assertEquals(SUCCESS.getCode(), response.getCode());
UserModel u = response.getResult();