小编uda*_*mar的帖子

Promise在节点js中是同步的或异步的

我承诺很多困惑.这是同步还是异步?

return new Promise (function(resolved,reject){
    //sync or async? 
});
Run Code Online (Sandbox Code Playgroud)

javascript asynchronous synchronous node.js promise

9
推荐指数
3
解决办法
3829
查看次数

org.osgi.framework.BundleException:无法解析:缺少要求:osgi.wiring.package;(osgi.wiring.package=org.json)

我是 Java/ Karaf 4.0.9/ Maven/ Pom/ Camel 的新手,我无法解决这个问题

文件中的Json部分pom.xml,这里我改了很多Json版本,但没有用。

            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20151123</version>
            </dependency>
Run Code Online (Sandbox Code Playgroud)

这里我附上了我的Pom.xml文件,我用谷歌搜索了一下。在 GSON 中遇到同样的问题,但我不知道如何解决 felix 中的问题。

        <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
              http://maven.apache.org/maven-v4_0_0.xsd">

            <modelVersion>4.0.0</modelVersion>

            <groupId>PaxelESBNotification</groupId>
            <artifactId>PaxelESBNotification</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <packaging>jar</packaging>

            <name>A Camel Blueprint Route</name>

            <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            </properties>

            <dependencyManagement>
                <dependencies>
                    <!-- Camel BOM -->
                    <dependency>
                        <groupId>org.apache.camel</groupId>
                        <artifactId>camel-parent</artifactId>
                        <version>2.16.5</version>
                        <scope>import</scope>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </dependencyManagement>

            <dependencies>
                <!-- Camel -->
                <dependency>
                    <groupId>org.apache.camel</groupId>
                    <artifactId>camel-core</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.apache.camel</groupId>
                    <artifactId>camel-rabbitmq</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.json</groupId>
                    <artifactId>json</artifactId>
                    <version>20151123</version>
                </dependency> …
Run Code Online (Sandbox Code Playgroud)

java osgi maven apache-felix apache-karaf

3
推荐指数
1
解决办法
7302
查看次数