Spring MVC, Hibernate, MySQL output tables,charts -
i have project includes spring mvc, hibernate, mysql.
i need:
- display data tables in mysql.
- output statistics in charts mysql.
what use these tasks?
if want display data db,kindly follow these steps
controller.java
@requestmapping(value = "/getdata", method = requestmethod.get) @responsebody public list<user> getdata(httpsession session) { list<user> userlist = userservice.getdata(); return userlist; }
service.java
public list<user> getdata() { return this.userdao.getdata(); }
userdao.java
public list<user> getdata() { session session = getsession(); list<user> userlist = session.createquery(" query fetch db").list(); system.out.println(userlist); return userlist; }
this sample code.which might you. if struck anywhere can let know
happy coding...!!!
Comments
Post a Comment