Spring Expression Language

載入IP參數, 轉成List

ip.list=192.168.56.101,192.168.56.102

@Value("#{'${ip.list}'==''?null:'${ip.list}'.split(',')}") 空參數值→轉成Null
or
@Value("#{'${ip.list}'==''?T(java.util.Collections).emptyList():'${ip.list}'.split(',')}") 空參數值→轉成Empty List
private List<String> ipList;

Continue reading Spring Expression Language

Advertisements

Spring 3.0.5 + Struts 1.2.2 + Weblogic 10.3.6 APIs Conflict (ClassNotFoundException: org.hibernate.hql.ast.HqlToken)

Environment:

Sprint 3.0.5

Struts 1.2.2

Weblogic 10.3.6

Continue reading Spring 3.0.5 + Struts 1.2.2 + Weblogic 10.3.6 APIs Conflict (ClassNotFoundException: org.hibernate.hql.ast.HqlToken)