我对本机做出了新的反应,并希望在后端使用spring创建一个应用程序。我已经尝试运行此处1给出的代码,但是它无法连接到任何服务。这就是我的日志
Running application "myApp" with appParams: {"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
11-14 07:49:13.523 18875 18997 I ReactNativeJS: Open!
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { type: 'message',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: target:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { CONNECTING: 0,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: OPEN: 1,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: CLOSING: 2,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: CLOSED: 3,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: readyState: 1,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _eventEmitter:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriber:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriptionsForType:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { appStateDidChange:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: isAvailable: true,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _eventHandlers:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { change:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _mapData: [],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _objectIndex: {},
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _stringIndex: {},
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _otherIndex: {} },
11-14 07:49:14.041 18875 18997 I ReactNativeJS: memoryWarning:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _mapData: [],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _objectIndex: {},
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _stringIndex: {},
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _otherIndex: {} } },
11-14 07:49:14.041 18875 18997 I ReactNativeJS: currentState: 'active' },
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'appStateDidChange',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 0 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: websocketMessage:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ ,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketMessage',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: websocketOpen:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ ,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketOpen',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: websocketClosed:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ ,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketClosed',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: websocketFailed:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ ,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketFailed',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: didUpdateDimensions:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: sharedSubscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _currentSubscription:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketMessage',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } },
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'didUpdateDimensions',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 0 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: hardwareBackPress:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: sharedSubscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _currentSubscription:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'websocketMessage',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 1 } },
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: context: undefined,
11-14 07:49:14.041 18875 18997 I ReactNativeJS: eventType: 'hardwareBackPress',
11-14 07:49:14.041 18875 18997 I ReactNativeJS: key: 0 } ],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: collectBugExtraData:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: [ { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { _subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: sharedSubscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: _currentSubscription:
11-14 07:49:14.041 18875 18997 I ReactNativeJS: { subscriber: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: emitter: [Circular],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: listener: [Function],
11-14 07:49:14.041 18875 18997 I ReactNativeJS: co
您能帮我提供这段代码吗,还可以引导我找到一些使用react-native帮助连接到spring websocket的资源。另外,请告诉我是否有更好的方法