栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

org.springframework.boot.web.support不存在

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

org.springframework.boot.web.support不存在

这可能是源代码中的导入问题-您的Gradle构建脚本使用Spring Boot
1.3.6.RELEASE,其中SpringBootServletInitializer具有以下完全限定的名称:

org.springframework.boot.context.web.SpringBootServletInitializer

但是,您的Maven pom.xml使用Spring Boot 1.4.0.BUILD-SNAPSHOT,其中包名称已更改为:

org.springframework.boot.web.support.SpringBootServletInitializer

因此,如果您转到SampleJettyJspApplication并将导入更改为

import org.springframework.boot.context.web.SpringBootServletInitializer;

一切都应该没问题。

另外,您可以更改Gradle构建脚本以导入1.4.0.BUILD-SNAPSHOT,但这需要添加Spring的快照存储库:

buildscript {    repositories {        maven.url "http://repo.spring.io/snapshot"        mavenCentral()    }    dependencies {        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.0.BUILD-SNAPSHOT")    }}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/670722.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号