小编use*_*247的帖子

为什么跳过gradle war任务?

我是一个新的转换为gradle.大多数任务都很好.但是我看到战争任务总是被跳过.当我在调试模式下运行时,我看到以下日志 -

09:12:34.889 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]:war 09:12:34.889 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]开始执行任务' :war '09:12:34.889 [INFO] [org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter]跳过任务':war'作为任务onlyIf为false.09:12:34.889 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]完成执行任务':war'09:12:34.889 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :战争SKIPPED

我不确定为什么只有我是假的.我在互联网上搜索过.但我没有找到任何相关的东西.

这是我的gradle文件 -

buildscript {
    ext {
        springBootVersion = '2.0.0.M2'
    }
    repositories {
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
apply plugin: 'checkstyle'
apply …
Run Code Online (Sandbox Code Playgroud)

android gradle maven gradlew build.gradle

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

vert.x和RxJava之间的区别

我们正在为我们的一个项目评估反应式编程框架.我刚刚学习了vert.x教程.我检查了一下RxJava的介绍.RxJava似乎更接近CompletableFuture.但是,尽管存在底层模式,RxJava和Vert.x都可以访问非阻塞编程.我很困惑他们之间有什么区别.在这方面,我将不胜感激.

vert.x rx-java

15
推荐指数
3
解决办法
5930
查看次数

即使我的应用程序停止,Spring-integration-ftp轮询文件也是如此

作为问题的后续行动 -

同样的文件在spring-ftp中一次又一次地被拾取,但名称不同

我的application.xml中有以下配置

 <?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns:int="http://www.springframework.org/schema/integration"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:file="http://www.springframework.org/schema/integration/file"
    xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
    xmlns:int-ftp="http://www.springframework.org/schema/integration/ftp"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/integration
        http://www.springframework.org/schema/integration/spring-integration.xsd
        http://www.springframework.org/schema/integration/file
        http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
        http://www.springframework.org/schema/integration/stream
        http://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd
        http://www.springframework.org/schema/integration/ftp
        http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context.xsd">

    <int:poller id="poller" task-executor="synchTaskExecutor" default="true" fixed-delay="1000" />

    <beans:bean id="ftpClientFactory"
          class="com.everge.springframework.integration.ftp.session.EvergeFtpSessionFactory">
        <beans:property name="host" value="111.93.128.170"/>
        <beans:property name="port" value="21"/>
        <beans:property name="username" value="singha"/>
        <beans:property name="password" value="singha16"/>
        <beans:property name="clientMode" value="2"></beans:property>
    </beans:bean>

    <beans:bean id="ftpOutClientFactory"
          class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
        <beans:property name="host" value="111.93.128.170"/>
        <beans:property name="port" value="21"/>
        <beans:property name="username" value="singha"/>
        <beans:property name="password" value="singha16"/>
        <beans:property name="clientMode" value="2"></beans:property>
    </beans:bean>

    <beans:bean id="synchTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <beans:property name="corePoolSize" value="1"></beans:property>
        <beans:property name="maxPoolSize" value="1"></beans:property>
        <beans:property …
Run Code Online (Sandbox Code Playgroud)

spring spring-integration spring-batch spring-integration-sftp

6
推荐指数
0
解决办法
640
查看次数

fs节点模块的readFileSync是如何工作的?

我想看看fs节点模块的代码,以便我了解这个模块是如何同步实现这个文件读取功能的。我确实尝试在 node_modules 文件夹中搜索。但我没有得到任何参考。你能帮我解决这个问题吗?

javascript node.js

5
推荐指数
1
解决办法
1458
查看次数

卡桑德拉读书有前后矛盾吗?

我是Cassandra的新手,正在尝试了解它的工作原理。假设是否写入多个节点。我的理解是,根据键的哈希值,它决定哪个节点拥有数据,然后进行复制。在读取数据时,键的哈希值确定哪个节点拥有数据,然后它进行响应。现在我的问题是,如果读取和写入是从始终具有数据的同一节点集进行的,那么读取不一致将如何发生,而Cassandra会返回陈旧数据?

cassandra cassandra-2.0 cassandra-2.1

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

RxJava订阅不起作用

我有以下代码 -

package com.test.rxjava;

import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;

import io.reactivex.Flowable;

public class App1 {

    public static void main(String[] args) {

        Subscriber<Integer> subscriber = new Subscriber<Integer>() {

            @Override
            public void onSubscribe(Subscription s) {
            }

            @Override
            public void onNext(Integer t) {
                System.out.printf("Entry %d\n", t);
            }

            @Override
            public void onError(Throwable t) {
                System.err.printf("Failed to process: %s\n", t);
            }

            @Override
            public void onComplete() {
                System.out.println("Done");
            }

        };
        Flowable.just(123).subscribe(subscriber);

    }

}
Run Code Online (Sandbox Code Playgroud)

我期待在onNext方法中执行代码.但是没有任何反应.但是如果我用下面的代码替换最后一行,我确实得到了输出.

Flowable.just(123).subscribe((t) -> System.out.println(t));
Run Code Online (Sandbox Code Playgroud)

我不确定这里缺少什么.但绝对是肯定的.我是Rx世界的新手,可以帮助找出问题所在.提前致谢!

java reactive-programming rx-java

0
推荐指数
1
解决办法
1857
查看次数