Skip to content

Instantly share code, notes, and snippets.

@bytestree
Last active May 7, 2016 23:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytestree/9bb94e8678f39e741998602b4cc8d7eb to your computer and use it in GitHub Desktop.
Save bytestree/9bb94e8678f39e741998602b4cc8d7eb to your computer and use it in GitHub Desktop.
Generic DAO in Hibernate - Client Application
package com.bytestree;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.bytestree.config.AppConfiguration;
public class TestApplication {
public static void main(String[] args) {
// Load the Spring context and beans
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfiguration.class);
MyApplication app = context.getBean(MyApplication.class);
app.performDbTasks();
context.close();
}
}
@bytestree
Copy link
Author

Refer Generic DAO in Hibernate for complete example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment