我不会在Spring中编写Spring Boot Application,它将监视Windows中的目录,当我更改子文件夹或添加新的文件夹或删除现有的文件夹时,我想获取有关该文件夹的信息。
我怎样才能做到这一点?我已经读过这篇文章:http : //docs.spring.io/spring-integration/reference/html/files.html 和google中“ spring file watcher”下的每个结果,但是我找不到解决方案...
您是否有类似这样的好文章或示例?我不想这样:
@SpringBootApplication
@EnableIntegration
public class SpringApp{
public static void main(String[] args) {
SpringApplication.run(SpringApp.class, args);
}
@Bean
public WatchService watcherService() {
...//define WatchService here
}
}
Run Code Online (Sandbox Code Playgroud)
问候
我已经用maven编写了Java 9模块应用程序,现在我正在尝试添加测试用例.
当我尝试mvn clean install整个项目时,我有这个错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:testCompile (default-testCompile) on project EmployeeModule: Fatal error compiling: invalid flag: -Xmodule:EmployeeModule -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the …Run Code Online (Sandbox Code Playgroud)