摘要: 在pom.xml加入 在resources\templates\hello.html 在Controller中加入 启动,然后输入localhost:8080/hello 会跳转到页面 注意:必须加入thymeleaf包,不然找不到 阅读全文
posted @ 2017-05-27 10:53 孤独时光 阅读(28954) 评论(2) 推荐(0) 编辑
摘要: 这是接着上一篇写的,在上一篇的基础上添加 Controller Service Dao(接口,实现了CrudRepository<User,Long>) 然后运行项目,输入:http://localhost:8080/saveUser 表中会多了 一条记录 阅读全文
posted @ 2017-05-27 10:14 孤独时光 阅读(7897) 评论(0) 推荐(0) 编辑
摘要: 导入包,不多说 创建bean application.properties 启动类就不说了 启动之后发现 去数据库中看就有了user表。 阅读全文
posted @ 2017-05-27 09:54 孤独时光 阅读(475) 评论(0) 推荐(0) 编辑