一,zabbix不能配置中文界面的问题: 1, zabbix5.0 系统安装后,web界面不能选择使用中文 系统提示: You are not able to choose some of the languages, because locales for them are not installed on the web server. 截图: 2,解决问题:手动安装中文语言包: 安装zh_CN语言包 [root@blog include]# dnf install langpacks-zh…
在Spring Boot2.0以上配置嵌入式Servlet容器时EmbeddedServletContainerCustomizer类不存在,经网络查询发现被WebServerFactoryCustomizer替代. 2.x版本 @Bean public WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryCustomizer(){ return new WebServerFactoryCustomi…
@Configuration public class RestTemplateWithoutLoadBalance { @Bean("normalRestTemplate") public RestTemplate normalRestTemplate() { RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters() .add(0, new StringHttpMessage…
在Spring Boot2.0+的版本中,只要用户自定义了拦截器,则静态资源会被拦截.但是在spring1.0+的版本中,是不会拦截静态资源的. 因此,在使用Spring Boot2.0+时,配置拦截器之后,我们要把静态资源的路径加入到不拦截的路径之中. @Configuration public class InterceptorConfig implements WebMvcConfigurer { @Override public void addInterceptors(Intercep…
Spring MVC3返回JSON数据中文乱码问题解决 查了下网上的一些资料,感觉比较复杂,这里,我这几使用两种很简单的办法解决了中文乱码问题. Spring版本:3.2.2.RELEASE Jackson JSON版本:2.1.3 解决思路:Controller的方法中直接通过response向网络流写入String类型的json数据. 使用 Jackson 的 ObjectMapper 将Java对象转换为String类型的JSON数据. 为了避免中文乱码,需要设置字符编码格式,例如:UTF…