나는 gsp를 pdf로 변환해야하는 grails 3 (grails 버전 3.2.3, java version 1.8) 프로젝트에서 작업 중이다. grails에서 제공하는 렌더링 플러그인을 사용하려고했습니다. 내가 사용 플러그인 수입 : 내 build.gradle 파일grails 렌더링 플러그인 호환되지 않는 반환 형식 문제
과 내 컨트롤러 에 compile 'org.grails.plugins:rendering:2.0.3'
을 내가 사용 :
ByteArrayOutputStream bytes = pdfRenderingService.render(template: "/templates/pdf_PI", model: [proformaInvoice: proformaInvoice])
가 PDF 파일을 렌더링 할 수 있습니다. 이 서비스는 내가 작업이 플러그인을 얻으려고 시간을 보냈다하지만 그냥 작동하지 않습니다이 오류
grails-app/controllers/chsam/re/ProformaInvoiceController.groovy: -1: The return type of java.lang.Object getPdfRenderingService() in chsam.re.ProformaInvoiceController is incompatible with grails.plugins.rendering.pdf.PdfRenderingService in grails.plugins.rendering.RenderingTrait. At [-1:-1] @ line -1, column -1.
을 받고 있어요 그러나 def pdfRenderingService
사용하여 주입한다. 도와주세요.
PLZ를 사용
Grails는 3.2.11에 작품
, 종속 { 런타임 'org.springframework : 봄 테스트 : 4.1.6.RELEASE' } –이 컴파일을 추가하십시오 "조직 .grails.plugins : rendering : 2.0.0-SNAPSHOT "이 컴파일을 추가하는 대신 org.grails.plugins : rendering : 2.0.3 ' –