java.lang.illegalstateexception:找不到接口java.util.list的主构造函数或默认构造函数

wwtsj6pe  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(301)

错误:
java.lang.illegalstateexception:在.springframework.web.method.annotation.modelattributemethodprocessor.createattribute(modelattributemethodprocessor)中找不到接口java.util.list的主构造函数或默认构造函数。java:219)
我有一个项目,这是一个struts2和Spring Boot的组合。当我尝试给出以下请求格式时,出现此错误:
http://url/project/spring/lookup?filter[countrycode]=1筛选器[calleridgroup][id]=307(&F)
我希望jar中的配置有问题或冲突。请帮帮我。
下面是配置文件:

@Configuration
@EnableWebMvc
@ComponentScan(basePackages = { "com.ku.spring.web" })
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    ClLogger    logger;

    /*@Autowired
    private FilterArgumentResolver filterArgumentResolver;*/

    @Override
    public void configureDefaultServletHandling( DefaultServletHandlerConfigurer configurer ) {

        configurer.enable();
    }

    @Override
    public void addArgumentResolvers( List<HandlerMethodArgumentResolver> argumentResolvers ) {

        argumentResolvers.add( new FilterArgumentResolver( logger ) );
    }

    // Configuration to handle static resources(.JS, .CSS) by spring MVC
    @Override
    public void addResourceHandlers( ResourceHandlerRegistry registry ) {

        registry.addResourceHandler( "/resources/**" ).addResourceLocations( "/resources/" );
        registry.addResourceHandler( "/css/**" ).addResourceLocations( "/css/" );
        registry.addResourceHandler( "/images/**" ).addResourceLocations( "/images/" );
        registry.addResourceHandler( "/scripts/**" ).addResourceLocations( "/scripts/" );
        registry.addResourceHandler( "/js/**" ).addResourceLocations( "/js/" );
    }

    @Bean
    public ViewResolver viewResolver() {

        InternalResourceViewResolver resolver = new InternalResourceViewResolver();

        resolver.setPrefix( "/WEB-INF/views/" );
        resolver.setSuffix( ".jsp" );
        resolver.setExposeContextBeansAsAttributes( true );

        return resolver;
    }

    @Bean(name = "multipartResolver")
    public MultipartResolver multipartResolver() {

        return new StandardServletMultipartResolver();
    }

    @Bean
    public SmartValidator smartValidator() {

        return new LocalValidatorFactoryBean();
    }

    @Bean
    public MappedInterceptor springLoggingInterceptor() {

        return new MappedInterceptor( null, new SpringLoggingInterceptor() );

    }

}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题