circleci-2.0 相关问题


UPS OAuth 2.0 RESTful API 集成

我正在尝试集成 UPS 使用 OAuth 2.0 的新 RESTful API,这是我第一次这样做。使用客户端 ID 和客户端密钥,我可以获得访问令牌。并获得 API 服务...


Vue 2.0 + webpack 使用 npm 包中的组件

我正在尝试使用 webpack 和 Vue 2.0 设置一个项目,但在我的项目中使用 npm 包(如 vue-parallax)中的组件时遇到了一些麻烦。 我安装了该软件包并且一切...


Tomcat 在从 Google OAuth 2.0 API 重定向后创建一个新会话。为什么?

我正在 Tomcat 中实现 Google 的 OpenID Connect (OAuth 2.0)。 第一步是 创建防伪状态令牌 我这样做了,并认为我可以将其存储为 Tomcat 中的属性


是否可以使用 gnuplot 以这种格式绘制一系列矩阵

我的代码当前创建一个输出,如下所示(使用示例数字) 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 0.0 0.0 2.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0....


有没有办法在 Vuetify 2.0 中拥有 2 个以上(深色和浅色)主题?

Vuetify 2.0 提供了一个相对简单的选项来在应用程序中切换两种颜色主题。然而,在当前的项目中,需要添加第三个主题(深色、浅色和特殊 - “高对比度”模式......


登录使用 OAuth 2.0 协议的 MercadoLibre API 时如何解决“code_verifier 是必需参数”错误

我有 Mercado Libre API 的 Auth python 代码: url = 'https://api.mercadolibre.com/oauth/token' 有效负载 = {'grant_type': '授权代码', 'client_id':app_id, '


如何在net-core 2.0中手动解析JSON字符串

我有一个具有以下结构的json字符串 { “资源”:“用户”, “方法”:“创建”, “字段”:{ “姓名”:“约翰”, “姓氏:“史密斯”, “电子邮件”:“john@gmail....


从 net core 2.1 迁移到 net core 7 的问题

将我的entityframeworkcore从2.0迁移到7.0后。我的自定义代码中出现错误。你能帮忙解决这个问题吗 公共静态任务 SingleOrDefaultById(此 DbSe...


令牌无效(Google 登录 api)OAuth 2.0 - Spring Boot

我被卡住了。我不知道如何解决这个错误: [invalid_id_token] 尝试解码 Jwt 时发生错误:ID 令牌包含无效声明:{iat=date...} 此消息确实...


如何在 Google Cloud Console 中添加 Google Keep API 范围?

我尝试使用 OAuth 2.0 连接到 Google Keep API,但无法在 Google Cloud Console 中添加所需的范围。我已在“库”部分启用了 Google Keep API,但是当...


为 Google Cloud OAuth 凭证生成新的 SHA-1?

我有一个 Firebase 项目,使用位于 ~/.android/debug.keystore 的 Android 调试 SHA-1 进行身份验证。我删除了该项目,并在尝试创建 OAuth 2.0 凭证后意识到......


在 DWL 2.0/Mule4 中将“2024-01-10T10:50:16.901-0500”时间戳转换为“2024-01-10T10:50:16.901Z”

我在Mule4中有一个变量定义为receiptDateTime,它具有以下值: 输出应用程序/json --- vars.receiptDateTime vars.receiptDateTime 当前的输出格式是“...


尝试以编程方式在 ListView 中将项目居中

我希望在 QML ListView 中居中显示项目,因此我在 ListView 中添加了以下代码: 导入QtQuick 2.0 导入Qt多媒体5.5 导入 QtQuick.Controls 1.3 导入 QtQuick.Ex...


AWS Sagemaker 培训 - 容器参数 - Boto3 API

需要有关使用 Boto3 API 为 Sagemaker 训练作业传递命令行参数的指导。请找到我的 docker 文件 来自 public.ecr.aws/ubuntu/ubuntu:22.04 标签版本=“2.0” 运行应用程序...


KIC 3.0.x 的多个 Kong 入口控制器

最新的 Kong Ingress 控制器刚刚问世,我正在尝试去做。但由于需要使用多个入口控制器,我目前仍坚持使用它。虽然 KIC 2.0.x 有


分配给用户的所有拉取请求的 Bitbucket 端点?

使用 Bitbucket REST API,我正在寻找一种方法来获取分配给用户的所有拉取请求。到目前为止这个端点:https://api.bitbucket.org/2.0/repositories/{workspace}/{repository_na...


VS2017:为什么razor项目仍然引用MVC?

我对 ASP.NET Core 2.0 的 MVC 和 razor 项目非常困惑。 在 Visual Studio 2017 中我执行以下操作: 新项目 Web ASP.NET Core 应用程序 (C#) Web 应用程序(不是 Web 应用程序 MV...


如何使用 OAuth 2.0 客户端凭证流和带有 .net core 的 JWT 证书连接到 Oracle Netsuite

我正在尝试使用 Netsuite Rest api。以下是我采取的步骤。 https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_162730264820.html 在 Netsui 中创建了集成记录...


为什么 Razor Pages 项目仍然引用/依赖 MVC?

我对 ASP.NET Core 2.0 的 MVC 和 Razor Pages 项目非常困惑。 在 Visual Studio 2017 中我执行以下操作: 新项目 Web ASP.NET Core 应用程序 (C#) 网络应用程序(不是网络应用程序...


为什么 Razor Pages 项目仍然引用/依赖 MVC?

我对 ASP.NET Core 2.0 的 MVC 和 Razor Pages 项目非常困惑。 在 Visual Studio 2017 中我执行以下操作: 新项目 Web ASP.NET Core 应用程序 (C#) 网络应用程序(不是网络应用程序...


如何在不指定类的情况下使用 MongoDB C# 驱动程序

我正在使用 MongoDB c# 驱动程序 2.0。我试图在不指定类型或类的情况下获取集合。观察: 使用系统; 使用 System.Collections.Generic; 使用 System.Linq; 使用系统文本; ...


如何使用 Dataweave 将 JSON 转换为 BLOB?

我需要将传入的 JSON 对象转换为 BLOB 以将其插入到 oracle DB 中? 我怎样才能做到这一点?我已尝试使用以下代码,但它抛出无效的列类型 %dw 2.0 从 dw 导入 *...


从 Spock 1.3 (groovy 2.4) 迁移到 2.x (groovy 4.0) Spy 不再适用于需要参数的构造函数

在 Spockframework 1.3 中,以下内容适用于间谍,然后间谍对象创建一个闭包 MyClass 是闭包的委托。在 Spock 2.0 中,闭包不会将 MyClass 设置为其委托。 安装...


Doctrine 2.2+ 想要重新创建我的所有表,因为它试图使用错误的 postgres 架构

我在 symfony 2.0 项目上将原则从 2.1 更新到 2.2。 但现在每次我尝试执行 php app/console 学说:schema:update 学说都想重新创建我的所有架构,并且我有以下内容...


Doctrine 2.2+ 想要重新创建我的所有表,因为它试图使用错误的 postgres 架构

我在 symfony 2.0 项目上将原则从 2.1 更新到 2.2。 但现在每次我尝试执行 php app/console 学说:schema:update 学说都想重新创建我的所有架构,并且我有以下内容...


错误消息“您无法登录此应用程序,因为它不符合 Google 的确保应用程序安全的 OAuth 2.0 政策”

我正在开发一个基于网络的应用程序,它允许我信任的员工编辑我的 YouTube 频道的标题、描述、标签等。在尝试“选择加入”我自己的应用程序时...


Velocity 在 Spring Boot 中找不到模板资源

我使用 Velocity 模板引擎在我的 Spring boot 应用程序中使用电子邮件模板发送电子邮件实用程序。 当前的代码如下所示。 pom.xml: 我正在使用 Velocity 模板引擎在我的 Spring boot 应用程序中使用电子邮件模板发送电子邮件实用程序。 当前代码如下所示。 pom.xml: <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> <version>1.7</version> </dependency> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-tools</artifactId> <version>2.0</version> </dependency> 速度引擎 bean 配置: @Configuration public class VelocityConfig { @Bean public VelocityEngine velocityEngine() { VelocityEngine ve = new VelocityEngine(); ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath"); ve.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName()); ve.init(); return ve; } } 电子邮件模板放置在 src/main/resources/email-templates/summary-email.vm <!DOCTYPE html> <head> <title>Summary</title> </head> <body> <h1>Claims Summary</h1> </body> </html> 放置在以下目录中: src ├── main │ ├── java │ │ └── com │ │ └── packageNameioot │ │ └── SpringBootApplication.java │ ├── resources │ │ ├── email-templates │ │ │ └── summary-email.vm │ │ └── application.properties 使用模板发送电子邮件的服务类: @Slf4j @Service @RequiredArgsConstructor public class EmailSummaryService { private final EmailConnector connector; private final VelocityEngine velocityEngine; public Mono<Void> sendFinanceClaimsRunEmailSummary(FinancePeriodRunEntity periodRunEntity, int successCount, int errorCount) { EmailDto emailDto = EmailDto.builder() .recipients(Set.of("[email protected]")) .subject("Claims summary") .body(createEmailBody()) .html(true) .build(); return connector.submitEmailRequest(emailDto); } private String createEmailBody() { VelocityContext context = new VelocityContext(); Template template = velocityEngine.getTemplate("email-templates/summary-email.vm"); StringWriter writer = new StringWriter(); template.merge(context, writer); return writer.toString(); } } 但是Velocity无法定位模板,出现以下错误。 ERROR velocity:96 - ResourceManager : unable to find resource 'email-templates/summary-email.vm' in any resource loader. org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'email-templates/summary-email.vm' 属性应该这样设置: VelocityEngine ve = new VelocityEngine(); ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath"); ve.setProperty("resource.loader.classpath.class", ClasspathResourceLoader.class.getName()); 根据 Apache Velocity Engine 文档。


Struts 2 与 Apache Shiro 集成时如何显示结果页面

使用: struts2 2.5.10, 春天 4.x, struts2-spring-插件2.5.10, 希罗1.4.0, Shiro-Spring 1.4.0。 网络.xml: 使用: struts2 2.5.10, 春季 4.x, struts2-spring-插件2.5.10, 四郎1.4.0, shiro-spring 1.4.0. web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <display-name>Archetype Created Web Application</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:beans.xml</param-value> </context-param> <filter> <filter-name>shiroFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> <init-param> <param-name>targetFilterLifecycle</param-name> <param-value>true</param-value> </init-param> </filter> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <!-- shiro filter mapping has to be first --> <filter-mapping> <filter-name>shiroFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> beanx.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd "> <bean name="loginAction" class="example.shiro.action.LoginAction" > </bean> <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean"> <property name="securityManager" ref="securityManager" /> <property name="loginUrl" value="/login.jsp" /> <property name="filterChainDefinitions"> <value> /login.jsp = authc /logout = logout /* = authc </value> </property> </bean> <bean id="iniRealm" class="org.apache.shiro.realm.text.IniRealm"> <property name="resourcePath" value="classpath:shiro.ini" /> </bean> <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"> <property name="realm" ref="iniRealm" /> </bean> <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/> </beans> struts.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.devMode" value="true" /> <package name="default" extends="struts-default"> <action name="list" class="loginAction" method="list"> <result name="success">/success.jsp</result> <result name="error">error.jsp</result> </action> </package> </struts> index.jsp: <body> <s:action name="list" /> </body> login.jsp 看起来像: <form name="loginform" action="" method="post"> <table align="left" border="0" cellspacing="0" cellpadding="3"> <tr> <td>Username:</td> <td><input type="text" name="username" maxlength="30"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" maxlength="30"></td> </tr> <tr> <td colspan="2" align="left"><input type="checkbox" name="rememberMe"><font size="2">Remember Me</font></td> </tr> <tr> <td colspan="2" align="right"><input type="submit" name="submit" value="Login"></td> </tr> </table> </form> LoginAction.list(): public String list() { Subject currentUser = SecurityUtils.getSubject(); if(currentUser.isAuthenticated()) {System.out.println("user : "+currentUser.getPrincipal()); System.out.println("You are authenticated!"); } else { System.out.println("Hey hacker, hands up!"); } return "success"; } shiro.ini: [users] root=123,admin guest=456,guest frank=789,roleA,roleB # role name=permission1,permission2,..,permissionN [roles] admin=* roleA=lightsaber:* roleB=winnebago:drive:eagle5 index.jsp、login.jsp、success.jsp放在webapp下 我想要的是:输入LoginAction.list()需要进行身份验证,如果登录成功,则运行LoginAction.list()并返回"success"然后显示定义为Struts操作结果的success.jsp。 现在登录成功后可以执行LoginAction.list(),但是success.jsp不显示,浏览器是空白页面。 为什么? 我找到了原因:我在index.jsp中使用了<s:action name="list" />,但是struts文档说如果我们想用<s:action>看到结果页面,那么我们必须将其属性executeResult设置为true,即就像<s:action name="list" executeResult="true"/>。 在我看来,这有点奇怪,这个属性默认应该是 true。 有一个示例,您应该如何使用 Shiro applicationContext.xml 进行配置: <property name="filterChainDefinitions"> <value> # some example chain definitions: /admin/** = authc, roles[admin] /** = authc # more URL-to-FilterChain definitions here </value> </property> 以 /admin/ 开头的 URL 通过角色 admin 进行保护,任何其他 URL 均不受保护。如果 Struts 操作和结果 JSP 不在受保护区域中,则会显示它们。


在这种情况下有“distinct-values()”的解决方法吗?

首次海报和 XPath 初学者。我希望你能帮助我解决我遇到的这个 XPath 问题。这是我的文件的简化示例。 第一次海报和 XPath 初学者。我希望你能帮助我解决我遇到的这个 XPath 问题。这是我的文件的简化示例。 <town> <library> <section> <book> <title>ABC </title> </book> <book> <title>DEF </title> </book> </section> <section> <book> <title>ABC </title> </book> <book> <title>DEF </title> </book> </section> </library> <library> <section> <book> <title>ABC </title> </book> <book> <title>DEF </title> </book> </section> <section> <book> <title>ABC </title> </book> <book> <title>DEF </title> </book> <book> <title>GHI </title> </book> </section> </library> </town> 我试图通过 XPath 获得的是具有唯一“标题”的“book”元素,但在两个“library”元素中都是唯一的,而不是在根“town”节点中唯一的。 所以,根据我上面的例子,我期望得到第一个“library”的第一个“ABC”和第一个“DEF”,以及第一个“ABC”,第一个“DEF”和第一个“GHI”第二个“图书馆”。 distinct-values(//library[1]//book | //library[2]//book) 这可行,但我无法使用它,因为我需要使用 XPath 的 CMS 无法识别该功能... //library//book[not(./title = preceding::*/title)] 这不会选择第二个“库”中的第一个“ABC”和第一个“DEF”,我不明白为什么。有没有办法限制“前一个”轴的范围,使其停止在自己的“库”元素处? 如果有人理解我想要实现的目标,我将非常感谢任何帮助! 看来您使用的CMS仅支持XPath 1.0。首先游说他们改变这一点 - XPath 1.0 于 2007 年被 2.0 取代,现在应该已经成为历史。 这在单个 XPath 1.0 表达式中很难(也许不可能)完成。 (很难证明任何事情都是不可能的,但是你可以从 XPath 1.0 不是关系完备的前提开始,即它不支持整个一阶谓词演算;特别是它不支持范围变量.) 不幸的是,我不知道您还有哪些其他选择。


PHP 函数 ssh2_connect 不起作用

以下是我的脚本: 以下是我的脚本: <?php $connection = ssh2_connect('XX.XX.XX.XX', 22); ssh2_auth_password($connection, 'root', '******'); $stream = ssh2_exec($connection, 'useradd -d /home/users/test -m testftp'); $stream = ssh2_exec($connection, 'passwd testftp'); $stream = ssh2_exec($connection, 'password'); $stream = ssh2_exec($connection, 'password'); ?> 它显示以下错误: Fatal error: Call to undefined function ssh2_connect() in /home/chaosnz/public_html/fotosnap.net/test.php on line 2 我该如何处理这个问题? 谢谢 老实说,我建议使用 phpseclib,这是一个纯 PHP SSH2 实现。示例: <?php include('Net/SSH2.php'); $ssh = new Net_SSH2('www.domain.tld'); if (!$ssh->login('username', 'password')) { exit('Login Failed'); } echo $ssh->exec('pwd'); echo $ssh->exec('ls -la'); ?> 它更加便携、更易于使用并且功能也更加丰富。 我已经安装了 SSH2 PECL 扩展,它工作正常,感谢大家的帮助... 我已经在 ubuntu 16.4 PHP 7.0.27-0+deb9u 和 nginx 上解决了这个问题 sudo apt install php-ssh2 您需要安装ssh2 lib sudo apt-get install libssh2-php && sudo /etc/init.d/apache2 restart 这应该足以让你上路 如果您在 OSX 上运行 bomebrew,我使用以下命令来安装它: brew install php56-ssh2 这对我有用。我从这里拉它。应该还有使用 mac 端口的 Ubuntu 和 OSX。 我正在运行 CentOS 5.6 作为我的开发环境,以下内容对我有用。 su - pecl install ssh2 echo "extension=ssh2.so" > /etc/php.d/ssh2.ini /etc/init.d/httpd restart 为了扩展 @neubert 答案,如果您使用 Laravel 5 或类似版本,您可以使用更简单的 phpseclib,如下所示: 奔跑composer require phpseclib/phpseclib ~2.0 在您的控制器中添加 use phpseclib\Net\SSH2; 然后在控制器方法中使用它,例如: $host = config('ssh.host'); $username = config('ssh.username'); $password = config('ssh.password'); $command = 'php version'; $ssh = new SSH2($host); if (!$ssh->login($username, $password)) { $output ='Login Failed'; } else{ $output = $ssh->exec($command); } 今天pecl install ssh2需要旧版本的php(<=6.0). Here https://pecl.php.net/package/ssh2您可以看到支持php7和php8的最新beta版本的ssh2。所以您应该安装其中之一: pecl install ssh2-1.3.1 * 不要忘记在 php.ini 文件中启用此 ssh2.so 扩展。 我知道有答案,但我只是在这里简化答案。 我有同样的问题,我在 ubuntu 20 中使用以下解决方案修复了它: sudo apt-get install libssh2-1 php7.1-ssh2 -y 您可以根据需要更改 php 版本,例如:php7.4-ssh2 参考:https://blog.programster.org/ubuntu-16-04-install-php-ssh2-extension 适用于 WHM 面板 菜单 > 服务器配置 > 终端: yum install libssh2-devel -y 菜单 > 软件 > 模块安装程序 PHP PECL 管理点击 ssh2 立即安装点击 菜单 > 重新启动服务 > HTTP 服务器 (Apache) 您确定要重新启动此服务吗? 是的 ssh2_connect() 工作了! 我觉得这个已有 11 年历史的讨论值得更新。我从 PHPSecLib 库切换到 PHP 7 和 8 的内置 SSH2 库,因为它似乎连接速度更快并且更标准。现在它还可以使用密钥密码,因此无需再使用第 3 方库。


© www.soinside.com 2019 - 2024. All rights reserved.