Java Intellij不承载静态内容

Java Intellij不承载静态内容,java,eclipse,spring,intellij-idea,Java,Eclipse,Spring,Intellij Idea,我正试图从Eclipse迁移到Intellij,我遇到了一个似乎很奇怪的问题。当我通过Eclipse运行项目时,我的static content index.html是可访问的,但当我通过Intellij运行它时,它不是 在eclipse中,我使用一个Maven构建,目标是jetty:run和profiles dev。然后我可以通过url访问我的内容http://localhost:8080/last-galaxy/ui/index.html 在intellij中,我使用带有命令行jetty:r

我正试图从Eclipse迁移到Intellij,我遇到了一个似乎很奇怪的问题。当我通过Eclipse运行项目时,我的static content index.html是可访问的,但当我通过Intellij运行它时,它不是

在eclipse中,我使用一个Maven构建,目标是jetty:run和profiles dev。然后我可以通过url访问我的内容http://localhost:8080/last-galaxy/ui/index.html

在intellij中,我使用带有命令行jetty:run和profiles dev的Maven运行,然后我无法通过该url访问内容

那么这里可能有什么不同呢?我正在通过Spring设置这些静态内容,我不确定从Eclipse到Intellij,这些内容的工作方式会有什么不同

连接该内容的spring配置是:

@Configuration
@ComponentScan(SpringConfig.BASE_PACKAGE)
@EnableWebMvc
@EnableScheduling
@EnableJpaRepositories(SpringConfig.BASE_PACKAGE)
public class SpringConfig extends WebMvcConfigurerAdapter  {

    /**
     * You probably shouldn't change the base package name, but if you do, update it in here!
     */
    protected static final String BASE_PACKAGE = "com.corinthgames.lastgalaxy";

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/ui/**").addResourceLocations("classpath:/ui/");
        registry.addResourceHandler("/**").addResourceLocations("/**");
    }
}

我要寻找的第一件事是打印运行时类路径,看看IDEA是像M2E一样通过磁盘上的项目提供Maven依赖项,还是通过不会反映更改的JAR提供Maven依赖项。好吧,它神奇地开始工作了。不过,我认为你是对的,因为现在我的javascript文件不能自动反映我所做的更改。