請教:既然spring mvc 默認是單例模式,那麼在高併發多線程環境下service和controller加上synchronized

既然spring mvc 默認是單例模式,那麼在高併發多線程環境下service和controller加上synchronized還有必要嗎? 在service和controller加上synchronized有啥不一樣?總感受反正兩次不一樣的request,controller的實例是不一樣的,因此在controller中加入synchronized是沒有必要的java 只須要對能被多個線程訪問
相關文章
相關標籤/搜索