我们有时候会在拦截器中使用service,dao或者@value来获取yml文件的变量,有时候获取不到,下面是教程。
这里给出图示,具体的可以可看下面的代码。
******************************************************************** xia mian dai ma *****************************************************************
package com.config;
import java.nio.charset.Charset;
import java.util.List;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import or