parent
77323b098e
commit
c342609bce
@ -1,13 +1,38 @@
|
|||||||
package com.baiyee.adcallback;
|
package com.baiyee.adcallback;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import cn.hutool.json.JSONUtil;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
public class AdCallbackApplicationTests {
|
||||||
class AdCallbackApplicationTests {
|
static class User{
|
||||||
|
private String name;
|
||||||
|
private Integer age;
|
||||||
|
|
||||||
@Test
|
public String getName() {
|
||||||
void contextLoads() {
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAge() {
|
||||||
|
return age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAge(Integer age) {
|
||||||
|
this.age = age;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
User user = new User();
|
||||||
|
user.setName("123");
|
||||||
|
user.setAge(0);
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(JSONUtil.toJsonStr(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue