Use Hibernate framework to operate pojo instance, bye bye SQL strings :)

This commit is contained in:
Sola
2015-12-05 01:34:13 +08:00
parent 8d9b8da42f
commit 60b4d9e23e
23 changed files with 494 additions and 334 deletions

View File

@@ -0,0 +1,20 @@
package love.sola.netsupport.wechat;
import org.junit.Test;
import java.util.Date;
/**
* ***********************************************
* Created by Sola on 2015/12/3.
* Don't modify this source without my agreement
* ***********************************************
*/
public class TestDate {
@Test
public void test() {
System.out.println(new Date());
}
}

View File

@@ -1,25 +0,0 @@
package love.sola.netsupport.wechat;
import com.google.gson.Gson;
import love.sola.netsupport.config.Settings;
/**
* ***********************************************
* Created by Sola on 2015/11/26.
* Don't modify this source without my agreement
* ***********************************************
*/
public class TestGson {
// @Test
public void testGson() {
Gson gson = new Gson();
Settings settings = new Settings();
settings.Wechat_AppId = "*";
settings.Wechat_Secret = "*";
settings.Wechat_Token = "*";
settings.Wechat_AesKey = "*";
System.out.println(gson.toJson(settings));
}
}

View File

@@ -18,4 +18,11 @@ public class TestMessageFormat {
System.out.println(format.format(new Object[]{"wechatid"}));
}
@Test
public void testJsonp() {
String jsonp = "...{0}...";
MessageFormat format = new MessageFormat(jsonp);
System.out.println(format.format(new Object[]{"{SomeData}"}));
}
}