java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed

在使用springmvc上傳excel文件時,報這個錯誤。 是因爲在上傳時,調用的後臺插入方法起名字的時候是importCJ.do ,但是applicationContext.xml文件裏邊配置的事務其中沒有配置import開頭的方法,所以執行importCJ.do(插入)會被按照最後的那個 * 的只讀的配置,就會報如上錯誤。 解決辦法就是  在xml中加上這個開頭的事務配置: <tx:metho
相關文章
相關標籤/搜索