• Post Reply Bookmark Topic Watch Topic
  • New Topic

Anotation instead hbm file  RSS feed

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we use annotation for instead hbm file is is ok to use bean class with main method and inside main method saving bean object?
 
sam liya
Ranch Hand
Posts: 1273
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding Records URL

You can put a main method anywhere, but you probably want the code that runs your application outside of any POJO if you're going to production. For testing and tutorials it's just fine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!