Last active
May 7, 2016 23:45
-
-
Save bytestree/9bb94e8678f39e741998602b4cc8d7eb to your computer and use it in GitHub Desktop.
Generic DAO in Hibernate - Client Application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refer Generic DAO in Hibernate for complete example