細節問題與知識,細節問題知識一、tomcat7中cookie寫入中文引發的異常問題及解決問題:Cookie cookie = new Cookie("cookieName", "Cookie值");resp.addCookie(cookie);目標URL訪問此方法時,會拋出異常:java.lang.IllegalArgumentException: Control character in cookie value or
JAVA基礎之基礎資料型別 (Elementary Data Type),java資料類型 基礎資料型別 (Elementary Data Type):一、數值型1)整數:1、byte一個位元組,8位,取值範圍0~255,用於存放位元據。2、short兩個位元組,16位,取值範圍是在-32768~32767之間。3、int四個位元組,32位,取值範圍為-2147483648~2147483648之間4、long八個位元組,64位,取值範圍為 -9,223,372,036,854,775
Java並發編程總結5——ThreadPoolExecutor,java並發編程實戰一、ThreadPoolExecutor介紹在jdk1.8中,建構函式有4個。以ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory,
HTTP Cookie/Session,httpcookiesession一、HTTP協議HTTP協議是一個無狀態協議,伺服器無法判斷若干個請求是否來自同一個瀏覽器,無法與瀏覽器進行會話。二、HTTP會話控制:CookieCookie技術是使用在瀏覽器端的一種緩衝技術,在瀏覽器第一次向伺服器發出請求,在伺服器端會建立Cookie對象,並以索引值對的形式在回應標頭中返回。下一次向伺服器發送請求時,會在要求標頭中將Cookie資訊攜帶。1.Cookie的建立與返回在伺服器端通過 new
解決PKIX(PKIX path building failed) 問題 unable to find valid certification path to requested target,certification最近在寫java的一個服務,需要給遠程伺服器發送post請求,認證方式為Basic Authentication,在請求過程中出現了 PKIX path building failed:
Spring AOP 開發中遇到問題:Caused by: java.lang.IllegalArgumentException: warning no match for this type name: com.xxx.collector.service.impl.XxxServiceImpl [Xlint:invalidAbsoluteTypeName],webcollector在網上找了很多,都不是我想要的,後來發現是我在springaop註解的時候 寫錯了類名導致的這個問題1
Java enum,javaenum 1 /** 2 * Created by Edward on 2016/6/30. 3 */ 4 public class TestEnum { 5 6 //方法一 7 public enum SexEnum{ 8 MALE,FEMALE; 9 }10 11 //方法二12 public enum SexEnum1{13 MALE(1),14