org.springframework.context.i18n.LocaleContextHolder#setLocaleContext ( )源码实例Demo

下面列出了org.springframework.context.i18n.LocaleContextHolder#setLocaleContext ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: spring-analysis-note   文件: FrameworkServlet.java
private void initContextHolders(HttpServletRequest request,
		@Nullable LocaleContext localeContext, @Nullable RequestAttributes requestAttributes) {

	if (localeContext != null) {
		LocaleContextHolder.setLocaleContext(localeContext, this.threadContextInheritable);
	}
	if (requestAttributes != null) {
		RequestContextHolder.setRequestAttributes(requestAttributes, this.threadContextInheritable);
	}
}
 
源代码2 项目: java-technology-stack   文件: FrameworkServlet.java
private void initContextHolders(HttpServletRequest request,
		@Nullable LocaleContext localeContext, @Nullable RequestAttributes requestAttributes) {

	if (localeContext != null) {
		LocaleContextHolder.setLocaleContext(localeContext, this.threadContextInheritable);
	}
	if (requestAttributes != null) {
		RequestContextHolder.setRequestAttributes(requestAttributes, this.threadContextInheritable);
	}
}
 
源代码3 项目: lams   文件: FrameworkServlet.java
private void initContextHolders(
		HttpServletRequest request, LocaleContext localeContext, RequestAttributes requestAttributes) {

	if (localeContext != null) {
		LocaleContextHolder.setLocaleContext(localeContext, this.threadContextInheritable);
	}
	if (requestAttributes != null) {
		RequestContextHolder.setRequestAttributes(requestAttributes, this.threadContextInheritable);
	}
	if (logger.isTraceEnabled()) {
		logger.trace("Bound request context to thread: " + request);
	}
}
 
源代码4 项目: lams   文件: FrameworkServlet.java
private void resetContextHolders(HttpServletRequest request,
		LocaleContext prevLocaleContext, RequestAttributes previousAttributes) {

	LocaleContextHolder.setLocaleContext(prevLocaleContext, this.threadContextInheritable);
	RequestContextHolder.setRequestAttributes(previousAttributes, this.threadContextInheritable);
	if (logger.isTraceEnabled()) {
		logger.trace("Cleared thread-bound request context: " + request);
	}
}
 
源代码5 项目: spring4-understanding   文件: FrameworkServlet.java
private void initContextHolders(
		HttpServletRequest request, LocaleContext localeContext, RequestAttributes requestAttributes) {

	if (localeContext != null) {
		LocaleContextHolder.setLocaleContext(localeContext, this.threadContextInheritable);
	}
	if (requestAttributes != null) {
		RequestContextHolder.setRequestAttributes(requestAttributes, this.threadContextInheritable);
	}
	if (logger.isTraceEnabled()) {
		logger.trace("Bound request context to thread: " + request);
	}
}
 
源代码6 项目: spring4-understanding   文件: FrameworkServlet.java
private void resetContextHolders(HttpServletRequest request,
		LocaleContext prevLocaleContext, RequestAttributes previousAttributes) {

	LocaleContextHolder.setLocaleContext(prevLocaleContext, this.threadContextInheritable);
	RequestContextHolder.setRequestAttributes(previousAttributes, this.threadContextInheritable);
	if (logger.isTraceEnabled()) {
		logger.trace("Cleared thread-bound request context: " + request);
	}
}
 
源代码7 项目: spring-analysis-note   文件: FrameworkServlet.java
private void resetContextHolders(HttpServletRequest request,
		@Nullable LocaleContext prevLocaleContext, @Nullable RequestAttributes previousAttributes) {

	LocaleContextHolder.setLocaleContext(prevLocaleContext, this.threadContextInheritable);
	RequestContextHolder.setRequestAttributes(previousAttributes, this.threadContextInheritable);
}
 
源代码8 项目: java-technology-stack   文件: FrameworkServlet.java
private void resetContextHolders(HttpServletRequest request,
		@Nullable LocaleContext prevLocaleContext, @Nullable RequestAttributes previousAttributes) {

	LocaleContextHolder.setLocaleContext(prevLocaleContext, this.threadContextInheritable);
	RequestContextHolder.setRequestAttributes(previousAttributes, this.threadContextInheritable);
}