首页>代码>springboot+jpa+bootstrap+mysql用户登录+增删改查 运行环境为IDEA>/springboot-jba/src/main/java/ng/bq/springbootjba/component/MyLocalResolver.java
package ng.bq.springbootjba.component; import org.springframework.util.StringUtils; import org.springframework.web.servlet.LocaleResolver; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Locale; public class MyLocalResolver implements LocaleResolver { @Override public Locale resolveLocale(HttpServletRequest request) { String l=request.getParameter("l"); Locale locale=Locale.getDefault(); if(!StringUtils.isEmpty(l)){ String[] split =l.split("_"); locale=new Locale(split[0],split[1]); } return locale; } @Override public void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale) { } }
最近下载更多
skipple3 LV39
2023年10月25日
飞呀飞呀飞不放 LV7
2023年8月9日
hbsoft2008 LV16
2023年3月21日
lyws1986 LV17
2023年3月13日
微信网友_6368711690080256 LV3
2023年2月28日
zhaoming200677 LV12
2022年12月3日
呵呵哈哈哈 LV10
2022年7月8日
Ty LV10
2022年6月27日
CHENHAOJUDA LV10
2022年6月14日
aqin_qin LV1
2022年6月3日