tomcat run启动不报错,debug启动报错
前言
tomcat run启动不报错,debug启动报错
ERROR: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'datasource.url'
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:244)
看了下其他参考文章,大多说是内存配置问题,我的不是
idea中 项目run启动正常,debug启动一直失败
原因
先说原因 这和我使用系统变量读取配置中心有关系,报错中'dataSource' defined 这一段提示了我,run启动时,我在Tomcat启动环境变量参数中设置了值,但是没有在debug设置,所以导致不行,按理说我应该配置成系统环境变量,类似JAVA_HOME那样,为了省事,所以报错,提个醒吧,太粗心了


浙公网安备 33010602011771号