File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ RUN mkdir -p /data/trackstudio/upload /data/trackstudio/index \
9595# Copy WAR built in the builder stage
9696COPY --from=builder --chown=tomcat:tomcat /app/build/libs/TrackStudio.war $CATALINA_HOME/webapps/
9797
98+ # Set JVM encoding for UTF-8 support
99+ ENV CATALINA_OPTS="-Dfile.encoding=UTF-8"
100+
98101# Switch to non-root user
99102USER tomcat
100103
Original file line number Diff line number Diff line change @@ -18,6 +18,24 @@ tasks.compileJava {
1818 options.encoding = " UTF-8"
1919}
2020
21+ tasks.compileTestJava {
22+ options.encoding = " UTF-8"
23+ }
24+
25+ tasks.processResources {
26+ filteringCharset = " UTF-8"
27+ // JSTL читает .properties как ISO-8859-1. Конвертируем language_*.properties
28+ // из UTF-8 в ASCII с \uXXXX, как делал Maven (native2ascii),
29+ // чтобы на рантайме текст отображался корректно.
30+ filesMatching(" **/language_*.properties" ) {
31+ filter(org.apache.tools.ant.filters.EscapeUnicode ::class .java)
32+ }
33+ }
34+
35+ tasks.processTestResources {
36+ filteringCharset = " UTF-8"
37+ }
38+
2139repositories {
2240 mavenCentral()
2341}
@@ -84,4 +102,11 @@ tasks.war {
84102// Юнит-тесты JUnit4
85103tasks.test {
86104 useJUnit()
105+ systemProperty(" file.encoding" , " UTF-8" )
106+ }
107+
108+ // Настройка Javadoc для UTF-8 (на случай генерации документации)
109+ tasks.javadoc {
110+ options.encoding = " UTF-8"
111+ (options as StandardJavadocDocletOptions ).charSet = " UTF-8"
87112}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ services:
4242 depends_on :
4343 - migrator
4444 environment :
45- CATALINA_OPTS : -Dhibernate.connection.url=${DB_URL} -Dhibernate.connection.username=${DB_USER} -Dhibernate.connection.password=${DB_PASS}
45+ CATALINA_OPTS : -Dfile.encoding=UTF-8 - Dhibernate.connection.url=${DB_URL} -Dhibernate.connection.username=${DB_USER} -Dhibernate.connection.password=${DB_PASS}
4646 volumes :
4747 - tsindex:/data/trackstudio/index
4848 - tsupload:/data/trackstudio/upload
Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" ISO-8859-1 " ?>
1+ <?xml version =" 1.0" encoding =" UTF-8 " ?>
22<!DOCTYPE taglib
33 PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
44 "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" ISO-8859-1 " ?>
1+ <?xml version =" 1.0" encoding =" UTF-8 " ?>
22<!DOCTYPE taglib
33 PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
44 "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" ISO-8859-1 " ?>
1+ <?xml version =" 1.0" encoding =" UTF-8 " ?>
22<!DOCTYPE taglib
33 PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
44 "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
Original file line number Diff line number Diff line change 1- <?xml version =" 1.0" encoding =" ISO-8859-1 " ?>
1+ <?xml version =" 1.0" encoding =" UTF-8 " ?>
22<web-app
33 xmlns =" http://java.sun.com/xml/ns/j2ee"
44 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
You can’t perform that action at this time.
0 commit comments