- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我无法为使用 IBM MobileFirst Platform 构建的应用程序订阅推送通知。我收到错误消息
WLPush.isAbleToSubscribe in WLPush.java:414 :: Can't subscribe, notification token is not updated on the server
日志猫
05-06 10:20:44.767 20941-20941/com.vdot.pushdemo D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
05-06 10:20:44.887 20941-21582/com.vdot.pushdemo D/WLClient﹕ WLClient.createInstance in WLClient.java:213 :: WLClient has already been created.
05-06 10:20:44.917 20941-21582/com.vdot.pushdemo D/GCMClientFactory﹕ GCMClientFactory.getInstance in GCMClientFactory.java:25 :: Using GCMAPIClient
05-06 10:20:44.937 20941-21582/com.vdot.pushdemo W/com.worklight.wlclient.api.WLPush﹕ WLPush.unregisterReceivers in WLPush.java:792 :: unregisterReceivers:Receiver not registered: com.worklight.wlclient.api.WLPush$3@43a3d598
05-06 10:20:44.967 20941-21582/com.vdot.pushdemo D/wl.request﹕ WLRequestSender.run in WLRequestSender.java:40 :: Sending request http://10.136.78.232:10080/MFPushDemo/apps/services/api/AndroidPushDemo/Androidnative/init
05-06 10:20:45.267 20941-21681/com.vdot.pushdemo I/System.out﹕ pool-3-thread-6 calls detatch()
05-06 10:20:45.307 20941-21582/com.vdot.pushdemo D/com.worklight.wlclient.api.WLPush﹕ WLPush.updateToken in WLPush.java:521 :: Registering at the GCM server.
05-06 10:20:45.327 20941-21582/com.vdot.pushdemo D/com.worklight.wlclient.api.WLPush﹕ WLPush.clearSubscribedEventSources in WLPush.java:596 :: Clearing notification subscriptions.
05-06 10:20:45.337 20941-21582/com.vdot.pushdemo D/com.worklight.wlclient.api.WLPush﹕ WLPush.updateSubscribedEventSources in WLPush.java:614 :: Updating notification subscriptions.
05-06 10:20:45.347 20941-21582/com.vdot.pushdemo D/com.worklight.wlclient.api.WLPush﹕ WLPush.clearSubscribedTags in WLPush.java:607 :: Clearing tag notification subscriptions.
05-06 10:20:45.357 20941-21681/com.vdot.pushdemo D/com.demo.push﹕ Mode Connect Success
05-06 10:20:45.367 20941-21582/com.vdot.pushdemo D/com.worklight.wlclient.api.WLPush﹕ WLPush.updateSubscribedTags in WLPush.java:635 :: Updating tag notification subscriptions.
05-06 10:20:45.497 20941-21582/com.vdot.pushdemo D/GCMAPIClient﹕ GCMAPIClient$1.doInBackground in GCMAPIClient.java:45 :: Successfully registered with GCM using Google Play Services. Returned deviceToken:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
05-06 10:20:45.507 20941-21682/com.vdot.pushdemo D/com.demo.push﹕ onReadyToSubscribe
05-06 10:20:50.697 20941-20941/com.vdot.pushdemo D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
05-06 10:20:50.827 20941-21582/com.vdot.pushdemo D/WLClient﹕ WLClient.createInstance in WLClient.java:213 :: WLClient has already been created.
05-06 10:20:50.847 20941-21582/com.vdot.pushdemo D/GCMClientFactory﹕ GCMClientFactory.getInstance in GCMClientFactory.java:25 :: Using GCMAPIClient
05-06 10:20:50.857 20941-21582/com.vdot.pushdemo W/com.worklight.wlclient.api.WLPush﹕ WLPush.unregisterReceivers in WLPush.java:792 :: unregisterReceivers:Receiver not registered: com.worklight.wlclient.api.WLPush$3@43a800e0
05-06 10:20:50.877 20941-21582/com.vdot.pushdemo E/com.worklight.wlclient.api.WLPush﹕ WLPush.isAbleToSubscribe in WLPush.java:414 :: Can't subscribe, notification token is not updated on the server
主要 Activity
package com.vdot.pushdemo;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.worklight.wlclient.WLRequestListener;
import com.worklight.wlclient.api.WLClient;
import com.worklight.wlclient.api.WLEventSourceListener;
import com.worklight.wlclient.api.WLFailResponse;
import com.worklight.wlclient.api.WLOnReadyToSubscribeListener;
import com.worklight.wlclient.api.WLProcedureInvocationData;
import com.worklight.wlclient.api.WLPush;
import com.worklight.wlclient.api.WLPushOptions;
import com.worklight.wlclient.api.WLRequestOptions;
import com.worklight.wlclient.api.WLResponse;
import com.worklight.wlclient.api.WLResponseListener;
public class MainActivity extends Activity {
Button Push;
Button Sub;
Button UnSub;
Button Test;
Button Logout;
WLClient client;
WLPush push;
final String realm = "SampleAppRealm";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Push =(Button) findViewById(R.id.button0);
Sub =(Button) findViewById(R.id.button1);
UnSub =(Button) findViewById(R.id.button2);
Test =(Button) findViewById(R.id.button3);
Logout = (Button) findViewById(R.id.button4);
setupUIEvents();
}
void setupUIEvents(){
Push.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
client = WLClient.createInstance(MainActivity.this);
push = client.getPush();
PushListener listener = new PushListener(PushListener.MODE_CONNECT, MainActivity.this);
push.setOnReadyToSubscribeListener(listener);
client.registerChallengeHandler(new LoginChallengeHandler(realm, "IBM User", MainActivity.this));
client.connect(listener);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
});
Sub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
client = WLClient.createInstance(MainActivity.this);
client.getPush().subscribe("myAndroid",new WLPushOptions(), new PushListener(PushListener.MODE_SUBSCRIBE,MainActivity.this));
}
});
UnSub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
Test.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
client = WLClient.createInstance(MainActivity.this);
PushListener listener = new PushListener(PushListener.MODE_CONNECT, MainActivity.this);
client.registerChallengeHandler(new LoginChallengeHandler(realm, "IBM User", MainActivity.this));
client.connect(listener);
int i = 0;
while (i < 10000)
{
i++;
}
String adapterName = "PushAdapter";
String procedureName = "getSecretData";
WLProcedureInvocationData invocationData =
new WLProcedureInvocationData(adapterName, procedureName);
Object[] parameters = new Object[]{};
invocationData.setParameters(parameters);
WLRequestOptions options = new WLRequestOptions();
options.setTimeout(30000);
client.getInstance().invokeProcedure(invocationData, listener, options);
}
});
Logout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
client = WLClient.createInstance(MainActivity.this);
client.logout(realm,new MyListener());
}
});
}
public class MyListener implements WLRequestListener{
@Override
public void onSuccess(WLResponse wlResponse) {
Log.d("com.demo.push", "Log out success");
}
@Override
public void onFailure(WLFailResponse wlFailResponse) {
Log.d("com.demo.push", "Log out failed");
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onPause() {
super.onPause();
if (push != null)
push.setForeground(false);
}
@Override
protected void onResume() {
super.onResume();
int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if(code == ConnectionResult.SERVICE_MISSING || code == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED || code == ConnectionResult.SERVICE_DISABLED) {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(code, this, 1);
dialog.show();
}
if (push != null)
push.setForeground(true);
}
@Override
protected void onDestroy() {
super.onDestroy();
if (push != null)
push.unregisterReceivers();
}
}
登录挑战处理程序
package com.vdot.pushdemo;
import android.content.Context;
import android.content.Intent;
import com.worklight.wlclient.api.WLFailResponse;
import com.worklight.wlclient.api.WLProcedureInvocationData;
import com.worklight.wlclient.api.WLRequestOptions;
import com.worklight.wlclient.api.WLResponse;
import com.worklight.wlclient.api.challengehandler.ChallengeHandler;
public class LoginChallengeHandler extends ChallengeHandler {
private String userName;
private Context currentContext;
public LoginChallengeHandler(String realm, String user, Context ctx) {
super(realm);
userName = user;
currentContext = ctx;
}
@Override
public boolean isCustomResponse(WLResponse wlResponse) {
try {
if(wlResponse!= null &&
wlResponse.getResponseJSON()!=null &&
wlResponse.getResponseJSON().isNull("authRequired") != true &&
wlResponse.getResponseJSON().getBoolean("authRequired") == true){
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public void handleChallenge(WLResponse wlResponse) {
submitLogin(userName,"dummyPassword");
}
@Override
public void onSuccess(WLResponse wlResponse) {
// activity.Loader("Authenticate","Authentcating via VDOT secure server",false);
if(isCustomResponse(wlResponse))
{
handleChallenge(wlResponse);
}
else
{
submitSuccess(wlResponse);
}
}
@Override
public void onFailure(WLFailResponse wlFailResponse) {
submitFailure(wlFailResponse);
}
public void submitLogin(String userName, String password){
Object[] parameters = new Object[]{userName, password};
WLProcedureInvocationData invocationData = new WLProcedureInvocationData("PushAdapter", "submitAuthentication");
invocationData.setParameters(parameters);
WLRequestOptions options = new WLRequestOptions();
options.setTimeout(30000);
submitAdapterAuthentication(invocationData, options);
}
}
推送监听器
package com.vdot.pushdemo;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.widget.TextView;
import com.worklight.wlclient.api.WLClient;
import com.worklight.wlclient.api.WLEventSourceListener;
import com.worklight.wlclient.api.WLFailResponse;
import com.worklight.wlclient.api.WLOnReadyToSubscribeListener;
import com.worklight.wlclient.api.WLResponse;
import com.worklight.wlclient.api.WLResponseListener;
public class PushListener implements WLOnReadyToSubscribeListener,WLResponseListener,WLEventSourceListener {
public static final int MODE_CONNECT = 0;
public static final int MODE_SUBSCRIBE = 1;
public static final int MODE_UNSUBSCRIBE =2;
private int mode ;
private Context currentContext;
public PushListener(int mode, Context ctx){
this.mode = mode;
currentContext = ctx;
}
@Override
public void onReadyToSubscribe() {
WLClient.getInstance().getPush().registerEventSourceCallback("myAndroid", "PushAdapter","PushEventSource", this );
Log.d("com.demo.push", "onReadyToSubscribe");
}
@Override
public void onReceive(String arg0, String arg1) {
}
@Override
public void onSuccess(WLResponse wlResponse) {
switch (mode){
case MODE_CONNECT:
// connect =true ;
Log.d("com.demo.push", "Mode Connect Success");
break;
case MODE_SUBSCRIBE:
Log.d("com.demo.push", "Mode Subscribe Success ");
break;
case MODE_UNSUBSCRIBE:
// unsubscribe = true;
break;
}
}
@Override
public void onFailure(WLFailResponse wlFailResponse) {
switch (mode){
case MODE_CONNECT:
Log.d("com.demo.push", "Mode Connect Fail");
break;
case MODE_SUBSCRIBE:
Log.d("com.demo.push", "Mode Subscribe Fail");
break;
case MODE_UNSUBSCRIBE:
// unsubscribe = false;
break;
}
}
}
Android list
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.vdot.pushdemo" >
<permission android:name="com.vdot.pushdemo.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="com.vdot.pushdemo.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.parse.push.notification_icon"
android:resource="@drawable/push" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.vdot.pushdemo.MainActivity.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<service android:name="com.worklight.wlclient.push.GCMIntentService" />
<receiver android:name="com.worklight.wlclient.push.WLBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.vdot.pushdemo" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.vdot.pushdemo" />
</intent-filter>
</receiver>
</application>
</manifest>
WLCLient.Properties
wlServerProtocol = http
wlServerHost = NG00164378
wlServerPort = 10080
wlServerContext = /MFPushDemo/
wlAppId = AndroidPushDemo
wlAppVersion = 1.0
wlEnvironment = Androidnative
wlUid = wY/mbnwKTDDYQUvuQCdSgg==
wlPlatformVersion = 7.0.0.0
#languagePreferences = Add locales in order of preference (e.g. en, fr, fr-CA)
#For Push Notifications,uncomment below line and assign value to it
GcmSenderId = 64XXXXXXXXXX
认证配置.XML
<?xml version="1.0" encoding="UTF-8"?>
<tns:loginConfiguration xmlns:tns="http://www.worklight.com/auth/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<staticResources>
<resource id="subscribeServlet" securityTest="SubscribeServlet">
<urlPatterns>/subscribeSMS*;/receiveSMS*;/ussd*</urlPatterns>
</resource>
</staticResources>
<securityTests>
<mobileSecurityTest name="MySecurityTest">
<testUser realm="SampleAppRealm"/>
<testDeviceId provisioningType="none"/>
</mobileSecurityTest>
<customSecurityTest name="SubscribeServlet">
<test realm="SubscribeServlet" isInternalUserID="true"/>
</customSecurityTest>
</securityTests>
<realms>
<realm name="SampleAppRealm" loginModule="AuthLoginModule">
<className>com.worklight.integration.auth.AdapterAuthenticator</className>
<parameter name="login-function" value="PushAdapter.onAuthRequired"/>
<parameter name="logout-function" value="PushAdapter.onLogout"/>
</realm>
<realm name="SubscribeServlet" loginModule="rejectAll">
<className>com.worklight.core.auth.ext.HeaderAuthenticator</className>
</realm>
</realms>
<loginModules>
<loginModule name="AuthLoginModule">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule>
<loginModule name="requireLogin" expirationInSeconds="-1">
<className>com.worklight.core.auth.ext.SingleIdentityLoginModule</className>
</loginModule>
<loginModule name="rejectAll">
<className>com.worklight.core.auth.ext.RejectingLoginModule</className>
</loginModule>
<!-- Required for Trusteer - wl_basicTrusteerFraudDetectionRealm -->
<!-- loginModule name="trusteerFraudDetectionLogin" expirationInSeconds="300">
<className>com.worklight.core.auth.ext.TrusteerLoginModule</className>
</loginModule-->
<!-- For websphere -->
<!-- loginModule name="WASLTPAModule" expirationInSeconds="-1">
<className>com.worklight.core.auth.ext.WebSphereLoginModule</className>
</loginModule -->
<!-- Login module for User Certificate Authentication -->
<!-- <loginModule name="WLUserCertificateLoginModule" expirationInSeconds="-1">
<className>com.worklight.core.auth.ext.UserCertificateLoginModule</className>
</loginModule> -->
<!-- For enabling SSO with no-provisioning device authentication -->
<!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceNoProvisioningLoginModule" expirationInSeconds="-1">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule> -->
<!-- For enabling SSO with auto-provisioning device authentication -->
<!-- <loginModule name="MySSO" ssoDeviceLoginModule="WLDeviceAutoProvisioningLoginModule" expirationInSeconds="-1">
<className>com.worklight.core.auth.ext.NonValidatingLoginModule</className>
</loginModule> -->
</loginModules>
</tns:loginConfiguration>
应用程序描述符
<?xml version="1.0" encoding="UTF-8"?>
<nativeAndroidApp id="AndroidPushDemo" platformVersion="7.0.0.00.20150312-0731"
version="1.0" xmlns="http://www.worklight.com/native-android-descriptor" securityTest="MySecurityTest">
<displayName>AndroidPushDemo</displayName>
<description>AndroidPushDemo</description>
<publicSigningKey></publicSigningKey>
<packageName></packageName>
<accessTokenExpiration>3600</accessTokenExpiration>
<userIdentityRealms></userIdentityRealms>
<pushSender key="AIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" senderId="XXXXXXXXXX"/>
</nativeAndroidApp>
推送适配器
function onAuthRequired(headers, errorMessage){
WL.Logger.error("onAuthRequired");
errorMessage = errorMessage ? errorMessage : null;
return {
authRequired: true,
errorMessage: errorMessage
};
}
function onLogout(){
WL.Logger.debug("Logged out");
}
function getSecretData(){
WL.Logger.error("getSecretData");
return {
secretData: "A secret data to invoke authentication"
};
}
function submitAuthentication(username, password){
// if (username==="user" && password === "user"){
WL.Logger.error("submitAuthentication");
var userIdentity = {
userId: username,
displayName: username,
attributes: {
foo: "bar"
}
};
WL.Server.setActiveUser("SampleAppRealm", userIdentity);
return {
authRequired: false,
user :userIdentity
};
// }
// return onAuthRequired(null, "Invalid login credentials");
}
WL.Server.createEventSource({
name: 'PushEventSource',
onDeviceSubscribe: 'deviceSubscribeFunc',
onDeviceUnsubscribe: 'deviceUnsubscribeFunc',
securityTest:'MySecurityTest'
});
function deviceSubscribeFunc(userSubscription, deviceSubscription){
WL.Logger.error("deviceSubscribeFunc");
WL.Logger.debug(">> deviceSubscribeFunc");
}
function deviceUnsubscribeFunc(userSubscription, deviceSubscription){
WL.Logger.debug(">> deviceUnsubscribeFunc");
}
function submitNotification(userId, notificationText) {
var userSubscription = WL.Server.getUserNotificationSubscription('PushAdapter.PushEventSource', userId);
if (userSubscription === null) {
return { result: "No subscription found for user :: " + userId };
}
var badgeDigit = 1;
var notification = WL.Server.createDefaultNotification(notificationText, badgeDigit, {custom:"data"});
WL.Server.notifyAllDevices(userSubscription, notification);
return {
result: "Notification sent to user :: " + userId
};
}
最佳答案
根据文档 http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.apiref.doc/html/refjava-worklight-android-native/html/com/worklight/wlclient/api/WLClient.html?lang=en createinstance() 方法需要在应用程序的主要 Activity 开始时调用。后续调用需要使用 getInstance() ...在您粘贴的代码中我看到多次调用 createInstance() 这可能会覆盖使用 token 更新的先前实例。因此,您可以使用一次 createInstance() 并在后续调用中使用 getInstance()。
关于android - IBM MobileFirst - 无法订阅,通知 token 未在服务器上更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30079686/
我通过 spring ioc 编写了一些 Rest 应用程序。但我无法解决这个问题。这是我的异常(exception): org.springframework.beans.factory.BeanC
我对 TestNG、Spring 框架等完全陌生,我正在尝试使用注释 @Value通过 @Configuration 访问配置文件注释。 我在这里想要实现的目标是让控制台从配置文件中写出“hi”,通过
为此工作了几个小时。我完全被难住了。 这是 CS113 的实验室。 如果用户在程序(二进制计算器)结束时选择继续,我们需要使用 goto 语句来到达程序的顶部。 但是,我们还需要释放所有分配的内存。
我正在尝试使用 ffmpeg 库构建一个小的 C 程序。但是我什至无法使用 avformat_open_input() 打开音频文件设置检查错误代码的函数后,我得到以下输出: Error code:
使用 Spring Initializer 创建一个简单的 Spring boot。我只在可用选项下选择 DevTools。 创建项目后,无需对其进行任何更改,即可正常运行程序。 现在,当我尝试在项目
所以我只是在 Mac OS X 中通过 brew 安装了 qt。但是它无法链接它。当我尝试运行 brew link qt 或 brew link --overwrite qt 我得到以下信息: ton
我在提交和 pull 时遇到了问题:在提交的 IDE 中,我看到: warning not all local changes may be shown due to an error: unable
我跑 man gcc | grep "-L" 我明白了 Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more inf
我有一段代码,旨在接收任何 URL 并将其从网络上撕下来。到目前为止,它运行良好,直到有人给了它这个 URL: http://www.aspensurgical.com/static/images/a
在过去的 5 个小时里,我一直在尝试在我的服务器上设置 WireGuard,但在完成所有设置后,我无法 ping IP 或解析域。 下面是服务器配置 [Interface] Address = 10.
我正在尝试在 GitLab 中 fork 我的一个私有(private)项目,但是当我按下 fork 按钮时,我会收到以下信息: No available namespaces to fork the
我这里遇到了一些问题。我是 node.js 和 Rest API 的新手,但我正在尝试自学。我制作了 REST API,使用 MongoDB 与我的数据库进行通信,我使用 Postman 来测试我的路
下面的代码在控制台中给出以下消息: Uncaught DOMException: Failed to execute 'appendChild' on 'Node': The new child el
我正在尝试调用一个新端点来显示数据,我意识到在上一组有效的数据中,它在数据周围用一对额外的“[]”括号进行控制台,我认为这就是问题是,而新端点不会以我使用数据的方式产生它! 这是 NgFor 失败的原
我正在尝试将我的 Symfony2 应用程序部署到我的 Azure Web 应用程序,但遇到了一些麻烦。 推送到远程时,我在终端中收到以下消息 remote: Updating branch 'mas
Minikube已启动并正在运行,没有任何错误,但是我无法 curl IP。我在这里遵循:https://docs.traefik.io/user-guide/kubernetes/,似乎没有提到关闭
每当我尝试docker组成任何项目时,都会出现以下错误。 我尝试过有和没有sudo 我在这台机器上只有这个问题。我可以在Mac和Amazon WorkSpace上运行相同的容器。 (myslabs)
我正在尝试 pip install stanza 并收到此消息: ERROR: No matching distribution found for torch>=1.3.0 (from stanza
DNS 解析看起来不错,但我无法 ping 我的服务。可能是什么原因? 来自集群中的另一个 Pod: $ ping backend PING backend.default.svc.cluster.l
我正在使用Hibernate 4 + Spring MVC 4当我开始 Apache Tomcat Server 8我收到此错误: Error creating bean with name 'wel
我是一名优秀的程序员,十分优秀!