现场:起服务时获取不到配置参数,报错:
Could not resolve placeholder 'db.driver' in string value "${db.driver}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'db.driver' in string value "${db.driver}"
解决方法
1.新建.bat文件到项目下,可与pom文件同目录,
内容如下:
:: smart-tomcat专用 :: configuration -> tomcat -> Before launch -> + -> Run External tool -> + -> program -> 选择文件 REM 拷贝dev配置文件到打包的target目录下,适配smart-tomcat插件的启动 copy appjia-server\src\main\resources\dev\* appjia-server\target\classes\ /Y
2.在启动参数中按如下步骤配置
configuration -> tomcat -> Before launch -> + -> Run External tool -> + -> program -> 选择文件