小编hor*_*eds的帖子

RestSharp:无法加载文件或程序集“System.Text.Json,版本=7.0.0.0”

我在 Visual Studio 中有一个 C#(Azure 函数应用程序)项目。.Net 6.0

我将 RestSharp 更新到版本 110.2.0,现在出现此错误:

[2023-04-29T21:34:10.399Z] Executed 'RequestItemsPage' (Failed, Id=8eefbb7c-3bc0-44db-81e4-14c56096fc81, Duration=63ms)
[2023-04-29T21:34:10.401Z] System.Private.CoreLib: Exception while executing function: RequestItemsPage. System.Private.CoreLib: Exception has been thrown by the target of an invocation. RestSharp: Could not load file or assembly 'System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
[2023-04-29T21:34:10.408Z] eb4802876b9e44839f63422be68619dc: Function 'RequestItemsPage (Activity)' failed with an error. Reason: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
[2023-04-29T21:34:10.411Z]  ---> System.IO.FileNotFoundException: Could not load …
Run Code Online (Sandbox Code Playgroud)

.net c# restsharp azure-functions

9
推荐指数
2
解决办法
5555
查看次数

Systemd,节外赋值。忽略

systemd我看到Apache ActiveMQ Artemis出现以下许多错误。

Sep 25 04:41:17 server systemd[1]: /etc/systemd/system/artemis.service:1: Assignment outside of section. Ignoring.
Sep 25 04:41:17 server systemd[1]: /etc/systemd/system/artemis.service:2: Assignment outside of section. Ignoring.
Run Code Online (Sandbox Code Playgroud)

我从这里获取了一些有用的建议,但据我所知该文件没问题。

> file artemis.service
artemis.service: ASCII text
Run Code Online (Sandbox Code Playgroud)

所以我认为文件格式是正确的,并且我没有看到任何额外的字符:

> cat -A artemis.service
Description=Apache ActiveMQ Artemis$
After=network.target$
[Service]$
Type=simple$
User=activemq$
Group=activemq$
ExecStart=/var/lib/broker-HA/bin/artemis run$
#ExecStop=/var/lib/broker-HA/bin/artemis stop$
UMask=0007$
RestartSec=10$
Restart=always$
[Install]$
WantedBy=multi-user.target$
Run Code Online (Sandbox Code Playgroud)

可能是什么原因造成的?

systemd activemq-artemis

4
推荐指数
1
解决办法
2万
查看次数

如何使用Gradle,PyramidIO添加外部库,Java Spring MVC框架

我在将一个外部库PyramidIO添加到Java Spring MVC程序时遇到了麻烦.这是我使用这些的第一个项目.

PyramidIO的GitHub页面显示了如何使用Maven通过存储库添加它.我正在使用Gradle,这就是我所做的:

gradle.build

dependencies {
    compile('org.springframework.boot:spring-boot-starter-thymeleaf')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('gov.nist.isg:pyramidio')
    compile ('org.webjars:jquery:2.1.4')
    testCompile('org.springframework.boot:spring-boot-starter-test') 
}
Run Code Online (Sandbox Code Playgroud)

我不确定这是否有效,因为我无法弄清楚如何在项目中导入它.我试过几个陈述.这就是我现在拥有的:

import gov.nist.isg.pyramido.*;

我不是使用存储库的忠实粉丝,因为有时我在没有互联网连接的情况下工作.我想简单地为PyramidIO添加.jar,但我在GitHub下载中找不到它,我不知道如何正确地将它编译成.jar.

我该如何将这个库加入我的项目?

java spring gradle

2
推荐指数
1
解决办法
3469
查看次数