Could not find class [org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration]

107 views Asked by At

When upgrading from springboot1.5.x to 2.3.x, it prompts that could not find class [org.springframework.boot.bind.RelaxedPropertyResolver]. I introduced spring-boot-autoconfigure of version 2.3.x to fix this problem, and subsequently it prompts that could not find class [org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration], which in spring-boot-autoconfigure of version 1.5.x.

I'm not sure what the problem is - can anyone please help me out? Thanks.

2

There are 2 answers

0
Avinash Gupta On

RelaxedPropertyResolver errors could arise because of mixed Spring versions. You can do a Maven dependency tree and check for mixed Spring versions (the one of the parent POM and other versions from transitive dependencies. If you have mixed Spring versions in your dependency tree, fix them with dependency management or similar Maven features.

0
Lesiak On

In 2017, this MultipartAutoConfiguration class was moved to org.springframework.boot.autoconfigure.web.servlet package with commit Restructure web auto-configuration

- package org.springframework.boot.autoconfigure.web;
+ package org.springframework.boot.autoconfigure.web.servlet;