上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: ApplicationContextInitializer SpringApplicationRunListener 以上两个起作用,必须配置在resources下META-INF/spring.factories ApplicationRunner CommandLineRunner 阅读全文
posted @ 2019-04-21 21:04 MagicAsa 阅读(548) 评论(0) 推荐(0) 编辑
摘要: public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); stopWatch.start(); ConfigurableApplicationContext c 阅读全文
posted @ 2019-04-21 15:48 MagicAsa 阅读(2072) 评论(0) 推荐(0) 编辑
摘要: 几个重要的事件回调机制 配置在META-INF/spring.factories ApplicationContextInitializer SpringApplicationRunListener 只需要放在ioc容器中 ApplicationRunner **CommandLineRunner* 阅读全文
posted @ 2019-04-21 15:02 MagicAsa 阅读(766) 评论(0) 推荐(0) 编辑
摘要: ORM(Object Relational Mapping); 2)、编写一个Dao接口来操作实体类对应的数据表(Repository) 3)、基本的配置JpaProperties 阅读全文
posted @ 2019-04-19 16:36 MagicAsa 阅读(132) 评论(0) 推荐(0) 编辑
摘要: pom文件: 步骤: ​ 1)、配置数据源相关属性(见上一节Druid) ​ 2)、给数据库建表 ​ 3)、创建JavaBean 注解版: 问题: 自定义MyBatis的配置规则;给容器中添加一个ConfigurationCustomizer; 配置文件版: mybatis: config-loca 阅读全文
posted @ 2019-04-16 18:17 MagicAsa 阅读(161) 评论(0) 推荐(0) 编辑
摘要: pom依赖: 配置类: 数据源配置yml: 阅读全文
posted @ 2019-04-16 18:09 MagicAsa 阅读(668) 评论(0) 推荐(1) 编辑
摘要: pom依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId> 阅读全文
posted @ 2019-04-16 18:05 MagicAsa 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 如图所示,解决方法为: 把勾去掉即可。 阅读全文
posted @ 2019-04-16 15:41 MagicAsa 阅读(2294) 评论(0) 推荐(0) 编辑
摘要: Shift + Tab 内容对齐 Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近更改的文件Shift+Click,可以关闭文件Ctrl+[ OR ],可以跑到大括号的开头与结尾Ctrl+F12,可以显示当 阅读全文
posted @ 2019-04-15 15:45 MagicAsa 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 错误的启动: [root@localhost ~]# docker run --name mysql01 -d mysql 42f09819908bb72dd99ae19e792e0a5d03c48638421fa64cce5f8ba0f40f5846 ​ mysql退出了 [root@localh 阅读全文
posted @ 2019-04-12 18:41 MagicAsa 阅读(298) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页