smallsun848

Results comments of smallsun848

@lihengming FastJsonHttpMessageConverter配置如下,FastJsonViewResponseBodyAdvice 需要怎么配置? @SpringBootApplication @MapperScan("com.example.test1.dao") public class Test1Application { public static void main(String[] args) { SpringApplication.run(Test1Application.class, args); } @Bean public HttpMessageConverters fastJsonHttpMessageConverters() { FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter(); FastJsonConfig fastJsonConfig...

问题解决了。因为FastJsonViewResponseBodyAdvice 配置了component,而springboot默认不会去扫描,指定了扫描的路径就可以了。 @SpringBootApplication @MapperScan("com.example.test1.dao") @ComponentScan({"com.alibaba.fastjson.support.spring","com.example.test1.controller"}) public class Test1Application {