Spring MVC, Hibernate, MySQL output tables,charts -


i have project includes spring mvc, hibernate, mysql.

i need:

  1. display data tables in mysql.
  2. 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

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -