Google API 용 문서를 생성하기 위해 Spring REST Docs를 사용하고 있습니다. 나는 gradle build
을 한 후 나는 build/asciidoc
에서 디렉토리 파일이 build/generated-snippets
도 생성되는 것을 볼 수 있습니다 여기에 튜토리얼 http://docs.spring.io/spring-restdocs/docs/current/reference/html5/봄 휴식 문서 생성 된 콘텐츠를 찾을 수 없습니다.
ext {
snippetsDir = file('build/generated-snippets')
}
test {
outputs.dir snippetsDir
}
asciidoctor {
attributes 'snippets': snippetsDir
inputs.dir snippetsDir
outputDir "build/asciidoc"
dependsOn test
sourceDir 'src/main/asciidoc'
}
jar {
dependsOn asciidoctor
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
}
을 build.gradle 모든 것을 추가했습니다. 내가 Gradle을 IDEA 작업 bootRun
및 로컬 호스트에 액세스하려고에서 실행할 때
그러나 : 8080/문서/index.html을 내가 404를 찾을 수 없습니다지고있어 그냥 테스트를 위해 내가 resources/static
디렉토리 아래에 몇 가지 index.html
파일을 넣어 시도하고 그런 다음 bootRun
을 수행하고 그 후에 localhost:8080/index.html
파일에 액세스 할 수 있습니다.
내 .jar 파일을 열면 정적 파일이 BOOT-INF/classes/static/docs
디렉토리 아래에서 볼 수 있으므로 jar 파일로 압축됩니다.
누군가 같은 문제가 있었습니까?
당신이 표시 한 Gradle을 구성으로,'bootRun'는 테스트를 실행하거나 Asciidoctor에서 HTML을 생성하지 않습니다. –
bootRun으로 생성 할 수 있습니까? –