make it the central place for hibernate&spring
change the code of using basic auth.
Merge pull request #8 from ebf/xiaodong

Xiaodong