Skip to content

Commit

Permalink
fix charset config and add check at init
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyHec committed Oct 18, 2024
1 parent 6156dee commit 2515409
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

@SpringBootApplication
@EnableScheduling
@MapperScan("org.apache.hugegraph.mapper")
Expand All @@ -38,6 +41,8 @@ public static void main(String[] args) {
}

public static void initEnv() {
Ex.check(Charset.defaultCharset().equals(StandardCharsets.UTF_8),
"Charset must be UTF-8, current:" + Charset.defaultCharset());
String hubbleHomePath = System.getProperty("hubble.home.path");
Ex.check(StringUtils.isNotEmpty(hubbleHomePath),
"The system property 'hubble.home.path' must be set");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ for jar in "${LIB_PATH}"/*.jar; do
class_path=${class_path}:${jar}
done

JAVA_OPTS="-Xms512m"
JAVA_OPTS="-Xms512m -Dfile.encoding=UTF-8"
JAVA_DEBUG_OPTS=""
FOREGROUND="false"

Expand Down

0 comments on commit 2515409

Please sign in to comment.