The import org.springframework.stereotype.Service conflicts with a type defined in the same file

The import org.springframework.stereotype.Service conflicts with a type defined in the same file

今天卸了一个类导入写注解时一直提示错误,百度一下说是jar包冲突,各种解决还是不管用,后来发现是因为我新建的类的名字是Service导入的包还是Service,改名后就没有问题了。

The import org.springframework.stereotype.Service conflicts with a type defined in the same file