use ConnectionManagement middleware to close database connect automatically
Merge pull request #213 from tsechingho/master

use ConnectionManagement middleware to close database connect