spring - Spring-Boot 应用程序:Maven:为什么要翻译 .jar 文件中的端点?
问题描述
我的问题:当我在 IntelliJ(mvn 包)中使用 Maven 编译 Spring Boot 项目时,Spring Boot 控制器端点(例如“/errors”)被翻译成德语(例如“/fehlers”)。如果我直接从 IDE 中启动它,它会与声明的端点一起工作(如“/errors”)。
我没有自己设置项目并将其移交。但是我检查了是否使用了国际化或本地化,但我找不到任何与我在网上找到的教程相似的东西。我还检查了不同的浏览器。我还将 .jar 文件反编译回 Java 源代码,那里的 API 仍然是正确的英文版本。我还将浏览器(firefox)的语言更改为英语,但没有任何改变。
我的 IDE IntelliJ 语言是英语,我的操作系统语言是德语。
下面是我的 pom.xml 文件(如果有帮助的话)。
提前致谢!
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>de.backend</groupId>
<artifactId>backend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>backend</name>
<description>Backend</description>
<properties>
<java.version>11</java.version>
</properties>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<configuration>
<mainClass>de.backend.BackendApplication</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
解决方案
推荐阅读
- python - 需要在 django 中更改表单
- angularjs - 以 js 服务格式公开函数:这行得通吗?
- node.js - 如何使用 twitch-passport 进行身份验证?Node Express Passport 下一个
- java - 如何修复xpath?
- postgresql - pyside 问题 - pyside pyside [本地] 空闲
- sql - 为什么 XML 结果在某些选择类型上给出 NULL?
- python-3.x - 在不使用双循环的情况下操作计数器字典的元素(最好是列表理解)
- android - getView 在 Fragment,Android 中变为 null
- javascript - click()时获取类的值
- python - 检查输入时Tensorflow抛出值错误(lstm_1)