如何CLASSPATH在运行时获取所有可用类的列表?
在Eclipse IDE中,您可以通过按Ctrl+ Shift+ 来完成此操作T.
Java中是否有任何方法可以完成它?
在我的应用程序中,当用户登录系统时,系统会从DB读取一些设置并将其存储在用户的会话中.系统通过使用EclipseLink(JPA 2.0)的JPA查询执行此操作.
当我在DB中更改某些设置并再次登录时,查询将返回先前的结果.似乎EclipseLink正在缓存结果.
我用它来纠正这种行为,但它不起作用:
query.setHint(QueryHints.cache_usage,cacheUsage.no_cache);
Run Code Online (Sandbox Code Playgroud) 我实现了一个简单的Web服务,Web服务的方法签名是:
public OperationResult createUser(int systemId, int refId, String name,
String password, int planId, BigDecimal amount)
Run Code Online (Sandbox Code Playgroud)
OperationResult类如下:
public class OperationResult implements Serializable {
private static final long serialVersionUID = 1L;
int resultType;
String result;
public OperationResult(int resultType, String result) {
super();
this.resultType = resultType;
this.result = result;
}
public int getResultType() {
return resultType;
}
public void setResultType(int resultType) {
this.resultType = resultType;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
} …Run Code Online (Sandbox Code Playgroud)