MrZhao
MrZhao
问题的原因是加载模板目录方法错误,setDirectoryForTemplateLoading在IDE运行没问题,但是打包发布以后没办法从jar包直接加载文件路径 正确解决方法: cfg.setDirectoryForTemplateLoading(new File("src/main/resources/templates")); 修改为 cfg.setClassForTemplateLoading(this.getClass(),"templates"); 项目中只要修改两个地方 com.yupi.sqlfather.config.FreeMarkerConfigurationConfig com.yupi.sqlfather.FreeMarkerTest
问题的原因是加载模板目录方法错误,setDirectoryForTemplateLoading在IDE运行没问题,但是打包发布以后没办法从jar包直接加载文件路径 正确解决方法: cfg.setDirectoryForTemplateLoading(new File("src/main/resources/templates")); 修改为 cfg.setClassForTemplateLoading(this.getClass(),"templates"); 项目中只要修改两个地方 com.yupi.sqlfather.config.FreeMarkerConfigurationConfig com.yupi.sqlfather.FreeMarkerTest
如何支持百炼的Key,灵积(DashScope)已经升级为百炼了,但是配置百炼的Key不行