- ctrl+f9 重新编译重新run
- 项目统一根路径/community,放在static包下的html包的student.html,网页打开/community/html/student.html
<p th:text="${name}">p里面的文本取这个$里面的变量,此时是从model里取的值- mysql改密码:alter user root@localhost identified by '970802';
- 导入表结构 source F:\init_schema.sql
- 导入表数据
- 避免数据库被同时大量访问而崩溃,访问数据库是一定要设置连接池的
- 数据库连接池可以复用连接,并且控制最大连接数
- 可以用spring boot内置的连接池hikari
lombok中的
- @Data=@Getter+@Setter+@EqualsAndHashCode+@ToString+@RequiredArgsConstructor
- @NoArgsConstructor @AllArgsConsturctor @RequiredArgsConstructor(final/@NonNull修饰的)
- @Builder