prop값 획득시 ClassCastException관련 수정
This commit is contained in:
+15
-1
@@ -802,7 +802,21 @@ public class HttpClient5AdapterServiceRest extends HttpClient5AdapterServiceSupp
|
|||||||
*/
|
*/
|
||||||
private void assignRequestKJHeaders(HttpUriRequestBase method, Properties prop, Properties tempProp) {
|
private void assignRequestKJHeaders(HttpUriRequestBase method, Properties prop, Properties tempProp) {
|
||||||
|
|
||||||
Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
//weblogic 에서는 tempProp.get 이 property로 return 해어 아래처럼 수정함. ClassCastException 발생함.
|
||||||
|
//Properties inboundHeaders = (Properties) tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
||||||
|
Properties inboundHeaders = null;
|
||||||
|
try {
|
||||||
|
Object headerObj = tempProp.get(HttpAdapterServiceKey.INBOUND_HEADER);
|
||||||
|
if (headerObj instanceof Properties) { //tomcat
|
||||||
|
inboundHeaders = (Properties) headerObj;
|
||||||
|
} else if (headerObj instanceof String) { //weblogic
|
||||||
|
inboundHeaders = new Properties();
|
||||||
|
inboundHeaders.load(new StringReader((String) headerObj));
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
String authorization = inboundHeaders.getProperty("authorization");
|
String authorization = inboundHeaders.getProperty("authorization");
|
||||||
String jwtToken = "";
|
String jwtToken = "";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user