相对于上述麦克道威尔的建议,改进之处在于init():
@PostConstruct
public void init() {
try {
InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/META-INF/MANIFEST.MF");
manifest = new Manifest();
manifest.read(is);
} catch (IOException ioe) {
logger.error("Unable to read the Manifest file from classpath.", ioe);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2440 次 |
| 最近记录: |