不要直接重用DB Connection

Connection每次用时最好重新建一下,用完之后销毁

否则,很容易导致死锁

除非你用了数据库连接池(连接池保证睡眠中的Connection是“干净”的)

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.