eclipse报错之Context root cannot be empty

本文介绍了一种在Eclipse中创建MavenWebApp项目时遇到的ContextRoot为空并显示错误的问题的解决方案。通过Maven->UpdateProject操作,成功解决了无法手动设置ContextRoot的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首选,通过Eclipse创建一个maven webapp工程,然后我从其它maven项目复制Java文件和其它配置文件到该工程目录下后,出现了下面的错误Context root cannot be empty,很是郁闷!!!根据百度上的去尝试,没解决!!!

在右键工程->properties->Web project Settings 时,发现其Context root为空,且报出Context root ...not be empty 错误

手动往内部输入字符时,不管你是否带有 / 都会被置为空,更加郁闷了。。。

真实日了dog了,百度了那么久没一个能真正解决根本问题的。。。

最后通过Eclipse上面的一个错误提示,找到最终解决方法:

鼠标在项目上右键-->选择"Maven"-->点击"Update Project"。阿弥陀佛,都搞定了。。。

 

 

Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/  :: Spring Boot ::   (v3.5.3) 07-28 17:36:29 INFO StartupInfoLogger.java:53 Starting Mb3Application using Java 21.0.7 with PID 16460 (D:\Eclipse\mb3\target\classes started by Administrator in D:\Eclipse\mb3) 07-28 17:36:29 INFO SpringApplication.java:652 No active profile set, falling back to 1 default profile: "default" 07-28 17:36:30 INFO TomcatWebServer.java:111 Tomcat initialized with port 80 (http) 07-28 17:36:30 INFO DirectJDKLog.java:168 Starting service [Tomcat] 07-28 17:36:30 INFO DirectJDKLog.java:168 Starting Servlet engine: [Apache Tomcat/10.1.42] 07-28 17:36:30 INFO DirectJDKLog.java:168 Initializing Spring embedded WebApplicationContext 07-28 17:36:30 INFO ServletWebServerApplicationContext.java:301 Root WebApplicationContext: initialization completed in 798 ms Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts 07-28 17:36:31 INFO DruidDataSource.java:1002 {dataSource-1} inited 07-28 17:36:31 INFO AbstractImageCaptchaGenerator.java:67 图片验证码[SpringMultiImageCaptchaGenerator]初始化... 07-28 17:36:31 INFO OptionalValidatorFactoryBean.java:48 Failed to set up a Bean Validation provider: jakarta.validation.NoProviderFoundException: Unable to create a Configuration, because no Jakarta Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath. 07-28 17:36:31 WARN ThymeleafAutoConfiguration.java:102 Cannot find template location: classpath:/templates/page/ (please add some templates, check your Thymeleaf configuration, or set spring.thymeleaf.check-template-location=false) 07-28 17:36:31 INFO TomcatWebServer.java:243 Tomcat started on port 80 (http) with context path '/' 07-28 17:36:31 INFO StartupInfoLogger.java:59 Started Mb3Application in 1.924 seconds (process running for 2.431)
最新发布
07-29
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值