
Spring
文章平均质量分 72
Spring
CodeCaptain
这个作者很懒,什么都没留下…
展开
-
macOSX 11.2安装Eclipse 4.7 提示“Failed to create the java virtual machine.“ 的解决方法
在macOSX 11.2环境中,安装Eclipse 4.7版,Eclipse4.7安装完成后运行,无法启动,报“Failed to create the java virtual machine.”错误。原创 2021-03-11 23:51:37 · 550 阅读 · 0 评论 -
Spring容器上下文的关闭
一、提倡的初始化方法:1. 在独立应用程序中,获取ApplicationContext: AbstractApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); context.close();//释放资源2. 在w转载 2015-09-07 15:56:38 · 9241 阅读 · 0 评论 -
(一)Spring boot CommandLineRunner的基本使用:启动加载数据
在Spring boot项目的实际开发中,我们有时需要项目服务启动时加载一些数据或预先完成某些动作。为了解决这样的问题,Spring boot 为我们提供了一个方法:通过实现接口 CommandLineRunner 来实现这样的需求。实现方式:只需要一个类即可,无需其他配置。 实现步骤:1.创建实现接口 CommandLineRunner 的类 MyStartupRunne原创 2017-02-28 14:57:38 · 5772 阅读 · 0 评论