2
我意识到我没有使用setQueryTimeOut
方法为JDBCTemplate
设置超时时间。我的代码在生产中,因为我希望解决方案能够从某些配置中设置超时而不是重新编译代码。有没有办法通过说数据源配置或Java以外的任何其他属性来设置查询超时。使用配置设置连接超时
我通过接受的解决方案尝试了这个post。没有为我工作。我得到org.springframework.beans.NotWritablePropertyException: Invalid property 'connectionProperties' of bean class