Public JDBC method, if you want to save data, no longer write service, and must be with save* update* method name is controlled by things, Ajax back to JSON control, login interceptors, user system I did not establish, individual needs different,
git address
http://git.oschina.net/osguy/webdream/tree/master
Using the struts2.3* spring 3.* hibernate4* Specific do not remember, one weeks late to write, hope to everyone helpful, code hosted on Oschina git above,
Hibernate Paging Query Simple
New NULL ); " SELECT * from ST_YZMXB "," SELECT COUNT (0) from St_yzmxb ", STYZMXB. class);
Here's how to play Ajax JSON
Page is the object of paging.
NULL ; Try { = json.tojsonstring (page); Catch (Exception e) { e.printstacktrace (); } System.out.println (Reult); Createjsondata (Reult); return AJAX;
Hibernate save
@Override publicvoid SAVEAA () { testdao.saveaa (); STYZMXB SS1=new styzmxb (); Ss1.setbz1 ("3333"); Commonhibernatedaoutils.save (SS1); }
In summary database query I am crazy turn, now is based on MySQL, used on Oracle, just need to convert the database dialect to be able to
Support paging query, things management.
Built-in SSH framework