原创 SpringMVC與Shiro的最簡單整合(不包含權限管理)
1.Maven 引入依賴 配置Spirng Maven Dependency 配置Shiro Maven Dependency <dependency> <groupId>org.springframework</groupI
原创 React基於fetch的表單提交
在用fetch進行表單提交時,參照https://github.com/github/fetch的用法 let data = new FormData(document.getElementById('login-form'))
原创 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userServic
在Spring與Hibernate聯合使用時,使用Spring容器注入bean時,報注入bean錯誤,原因是Spring爲我們引入了組件自動掃描機制,他在類路徑下尋找標註了上述註解的類,並把這些類納入進spring容器中管理 而錯誤操作是
原创 String類中的intern
從JDK 1.7後,HotSpot 將常量池從永久代移到了元空間,正因爲如此,JDK 1.7 後的intern方法在實現上發生了比較大的改變,JDK 1.7後,intern方法還是會先去查詢常量池中是否有已經存在,如果存在,則返回常量池中
原创 Integer 中的緩存類IntegerCache
Cache爲[-128,127],IntegerCache有一個靜態的Integer數組,在類加載時就將-128 到 127 的Integer對象創建了,並保存在cache數組中,一旦程序調用valueOf 方法,如果取的值是在-128
原创 Can't connect to Mysql server on xxx (10038)
情景:連接地址爲公司服務器IP地址,以前在本機上測試的時候只安裝了一個mysql服務,所以經常採用的有兩種方式啓動mysql。 1.運行-services.msc 找到默認的mysql服務-啓動2. net start mysql(默認
原创 Druid連接池
1.配置數據源 <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
原创 web.xml is missing and is set to true
Eclipse中在maven構建部署項目時,pom.xml一直報web.xml is missing and <failOnMissingWebXml> is set to true 。 這句話的大致意思是沒有找到web.xml, 解決方
原创 Swt Jface TreeViewer Selection
在使用TreeViewer 構建一個文件瀏覽器時,有個需求是當在某種情況下selection是不需要選中的,當時立馬想到的是treeViewer.s
原创 com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException
在啓動Tomcat項目時,控制檯報錯:nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字節的
原创 Sublime Text3常用使用技巧
1.Ctrl + `控制檯;安裝Package Control import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.insta
原创 eclipse 導入maven項目:Missing artifact jdk.tools:jdk.tools:jar:1.7
在pom.xml中加入tools.jar依賴 <dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> <
原创 oracle常用命令
Oracle 導出完整數據庫 cmd下輸入: exp user/[email protected]:1521/orcl file=d:\file.dmp full=y exp 用戶名/密碼@實例
原创 String類中的HashCode
String類是使用它的 value值作爲參數然後進行運算得出hashcode的 換句話說,只要值相同的String不管是不是一個對象,hash值全
原创 Git常用操作與常見錯誤
1.$ git push origin master 報錯 failed to push some refs to 'git解決方法:$ git pull --rebase origin master 2.在執行$ git pull