SpringBoot整合Easypoi項目啟動出錯和導出文件亂碼


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2020-09-25 14:20:53.200 ERROR 7184 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   :

   

APPLICATION FAILED TO START

   

Description:

   

An attempt was made to call a method that does not exist. The attempt was made from the following location:

   

此時我的SpringBoot是2.3.3,引入的easypoi的依賴如下

   

<dependency>

  <groupId>cn.afterturn</groupId>

  <artifactId>easypoi-base</artifactId>

  <version>4.1.3</version>

</dependency>

?

<dependency>

  <groupId>cn.afterturn</groupId>

  <artifactId>easypoi-web</artifactId>

  <version>4.1.3</version>

</dependency>

?

<dependency>

  <groupId>cn.afterturn</groupId>

  <artifactId>easypoi-annotation</artifactId>

  <version>4.1.3</version>

</dependency>

   

其實並沒有什么特別復雜的問題,將easypoi的依賴更換成

<dependency>

  <groupId>cn.afterturn</groupId>

  <artifactId>easypoi-spring-boot-starter</artifactId>

  <version>4.1.3</version>

</dependency>

   

   

導出文件亂碼:

我遇見的分2種情況:

1、使用swagger測試導出亂碼,直接使用瀏覽導出不亂碼?

這其實只是swagger處理流的問題

<swagger2.version>2.7.0</swagger2.version> //這個版本的swagger測試,文件名和文件內容都會亂碼

<dependency>

  <groupId>io.springfox</groupId>

  <artifactId>springfox-swagger2</artifactId>

  <version>2.9.2</version> //2.9.2的就不會,不知道是不是經過了處理

</dependency>

   

2、怎么導出都亂碼,可以參照 SpringBoot整合Easypoi


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM