我正在尝试运行我的项目的jar文件.我正在研究intelliJ并使用工件来生成jar文件.但每次我试图运行我的jar文件时它给我异常.
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
at java.util.jar.JarVerifier.update(JarVerifier.java:228)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.misc.JarIndex.getJarIndex(JarIndex.java:137)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:839)
at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:831)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:830)
at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:803)
at sun.misc.URLClassPath$3.run(URLClassPath.java:530)
at sun.misc.URLClassPath$3.run(URLClassPath.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:519)
at sun.misc.URLClassPath.getLoader(URLClassPath.java:492)
at sun.misc.URLClassPath.getNextLoader(URLClassPath.java:457)
at sun.misc.URLClassPath.getResource(URLClassPath.java:211)
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Error: A JNI error has occurred, please check your installation and try again …Run Code Online (Sandbox Code Playgroud) 在我的项目中,我得到了一个我正在我的collectionview上加载的数组
var dataSource = ["@", "@", "1", "2", "3", "4", "5", "6", "7", "8" , "9", "10", "@", "@"]
Run Code Online (Sandbox Code Playgroud)
对于字符串"@"我想隐藏该特定单元格.所以最初我试图使用indexpath,然后尝试检查我的数组位置是否得到值"@".但我无法正确隐藏它,因为其他一些单元格会在滚动时被更改
这就是我在我的cellForItemAt上所做的:
if dataSource[indexPath.row] == "@" {
cell.contentView.isHidden = true
cell.layer.borderColor = UIColor.white.cgColor
}
Run Code Online (Sandbox Code Playgroud)
事情被认为是水平滚动,这是我的sizeForItemAt:
func collectionView(_ collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: (self.numberCollectionView?.bounds.size.width)!/5 - 3, height: (self.numberCollectionView?.bounds.size.width)!/5 - 3 )
}
Run Code Online (Sandbox Code Playgroud) 我已将 Spring Boot 更新为2.5.2从2.1.8.RELEASE. 在此之前,活性和就绪性探测都很好。现在,在更新 Spring Boot 后,我更新了我的应用程序属性文件:
management.endpoints.web.exposure.include=*
management.endpoints.jmx.exposure.include=health,info
management.endpoint.metrics.enabled=true
management.endpoint.prometheus.enabled=true
management.metrics.enable.*=true
management.metrics.enable.all=true
management.metrics.export.prometheus.enabled=true
management.metrics.use-global-registry=true
management.endpoint.health.probes.enabled=true
management.health.livenessstate.enabled=true
management.health.readinessstate.enabled=true
management.endpoint.health.show-details=always
Run Code Online (Sandbox Code Playgroud)
我已分别向某些文档添加了最后 4 行。
在本地启动项目并从浏览器检查后:
http://localhost:8090/actuator/health/liveness给出{"status":"UP"}
但
http://localhost:8090/actuator/health/readiness给出{"status":"OUT_OF_SERVICE"}的是 503 状态。
{
"status": "OUT_OF_SERVICE",
"components": {
"diskSpace": {
"status": "UP",
"details": {
"total": 499963174912,
"free": 326313852928,
"threshold": 10485760,
"exists": true
}
},
"livenessState": {
"status": "UP"
},
"ping": {
"status": "UP"
},
"readinessState": {
"status": "OUT_OF_SERVICE"
}
},
"groups": [
"liveness",
"readiness"
] …Run Code Online (Sandbox Code Playgroud) 我正在使用自定义titleView并将其分配给navigationItem titleView.在iOS 11之前它一直运行良好.由于更新它的位置错误地放在中心位置,因为它原来是在更左边.除此之外,用户交互无效.
titleView = Bundle.main.loadNibNamed("SomeNib", owner: self, options: nil)?.first as? SomeNib
navigationItem.titleView = titleView
Run Code Online (Sandbox Code Playgroud)
titleView只是一个通常的笔尖.
然后启用互动:
if let titleView = self.navigationItem.titleView {
let tap = UITapGestureRecognizer(target: self, action: #selector(onTitleViewTap))
titleView.addGestureRecognizer(tap)
titleView.isUserInteractionEnabled = true
}
Run Code Online (Sandbox Code Playgroud) 我以这种方式采用mRGBA下的当前帧:
mRgba = inputFrame.rgba();
Run Code Online (Sandbox Code Playgroud)
然后创建一个矩形对象,它取当前相机框架的高度和宽度
rect = new Rect();
rect.width = mRgba.width();
rect.height = mRgba.height();
Run Code Online (Sandbox Code Playgroud)
它需要整个框架的空间,但当我试图收缩这个矩形时,它在一侧收缩(不是我需要的整体)
所以我试图找到矩形中心,然后尝试根据该中心和预定义的大小创建另一个矩形
int x = (int) (rect.tl().x + rect.br().x)/2;
int y = (int) (rect.tl().y + rect.br().y)/2;
Rect rect1 = new Rect(x,y,280,280);
Imgproc.rectangle(mRgba, rect1.tl(), rect1.br(), new Scalar(255, 0, 0), 2, 8, 0);
Run Code Online (Sandbox Code Playgroud)
但它不在中心!! 我不确定矩形对象采取的参数我没有找到opencv的文件非常有用.那么如何克服这种情况我希望矩形正好位于相机框架的中心.
ios ×2
swift3 ×2
android ×1
ios11 ×1
java ×1
kubernetes ×1
maven ×1
opencv ×1
spring-boot ×1
swift ×1