类 I18nAspect

java.lang.Object
com.anji.captcha.config.I18nAspect
所有已实现的接口:
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>

@ControllerAdvice @Component @ConditionalOnProperty(value="aj.captcha.i18n.enabled", matchIfMissing=false) public class I18nAspect extends Object implements org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private org.springframework.context.ApplicationContext
     
    private org.springframework.context.MessageSource
     
    private String
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    beforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response)
     
    private String
    getMessage(String code, com.anji.captcha.model.common.ResponseModel res)
     
    boolean
    supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • messageSource

      @Autowired(required=false) private org.springframework.context.MessageSource messageSource
    • prefix

      @Value("${aj.captcha.i18n.prefix:aj.captcha.}") private String prefix
    • applicationContext

      @Autowired private org.springframework.context.ApplicationContext applicationContext
  • 构造器详细资料

    • I18nAspect

      public I18nAspect()
  • 方法详细资料

    • supports

      public boolean supports(org.springframework.core.MethodParameter returnType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> converterType)
      指定者:
      supports 在接口中 org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
    • beforeBodyWrite

      public Object beforeBodyWrite(Object body, org.springframework.core.MethodParameter returnType, org.springframework.http.MediaType selectedContentType, Class<? extends org.springframework.http.converter.HttpMessageConverter<?>> selectedConverterType, org.springframework.http.server.ServerHttpRequest request, org.springframework.http.server.ServerHttpResponse response)
      指定者:
      beforeBodyWrite 在接口中 org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice<Object>
    • getMessage

      private String getMessage(String code, com.anji.captcha.model.common.ResponseModel res)