search

Home  >  Q&A  >  body text

java - When using gradle to build a war package, a character error will occur on the deployment server

This error is displayed when building the war package: warning unmappable characters in encoding gbk. I have added these
tasks.withType(JavaCompile) {

in build.gradle
options.encoding = "UTF-8"

}

tasks.withType(Compile) {

options.encoding = "UTF-8"

}
[compileJava, compileTestJava].options.encoding = 'UTF-8'`
Modify the bat file in the configuration file set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 , I also changed it but

still appears
扔个三星炸死你扔个三星炸死你2732 days ago658

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-06-12 09:25:39

    1. Look at the code in the error line

    2. Try setting up the project’s coding in the IDE

    reply
    0
  • Cancelreply