原创 SpEL表達式讀取properties配置文件

1. 將properties文件中的內容加載到一個bean中 <bean id="configProperties" class="org.springframework.beans.factory.config.Prop

原创 javase訪問控制權限

java訪問權限修飾符 public protected 不寫 private  (不寫默認爲包訪問或稱爲friendly) 修飾符權限是針對別的類的不是針對自己的 //外層類的修飾符只有兩個public和不寫(包內訪問) =======

原创 java併發模型圖

下圖可以說明併發模塊之間的關係

原创 A bug in IDEA when use spring boot annotation @ConfigurationProperties

I commit the issue to spring boot on github and get the answer immediately Spring Boot ISSUES #20885 This is a bu

原创 【面試篇】爲什麼重寫equals方法,還必須要重寫hashcode方法

# 轉載鏈接在此,感謝這位博主 爲什麼? 是爲了提高效率,採取重寫hashcode方法,先進行hashcode比較,如果不同,那麼就沒必要在進行equals的比較了,這樣就大大減少了equals比較的次數,這對比需要比較的數量很大

原创 spring boot load the property files by four ways

URL Original Answer By default ,SpringApplication loads properties from application.properties files in the follo

原创 談java協變返回類型

用一句話說就是 A繼承B並重寫B的方法,A所重寫的方法的返回值本來必須和B中被重寫方法保持一樣,但是現在可以返回B返回值的子類 舉例說明 假設有A、B、C、D四個類 B繼承A          D繼承C 如果A中有個方法如下 A: pub

原创 SAOPvsRESTvsJSON

1. SAOP VS REST VS JSON SAOP and REST makes it possible to transfer data from an application to other applicati