北京,今夜我将离去

        虽然在北京只是待了短短的两个月,结识了不少朋友,都很直爽,很善良,是一群值得深交的朋友,这两个月的相处,给了我很多帮助和照顾,在此真诚的谢谢你们,和你们在一起很开心,也学到了很多我以前在学校里没学到的东西。
        缘分这东西很奇妙,有时候虽然只见了一面,也许只是短短几句闲聊,他们注定是一辈子的朋友。朋友们,我也舍不得离开你们,回到南京我会去寻找我喜欢的工作,也许我短期内不能去北京和你们一聚,但是我不会忘记你们,四海之内皆兄弟,以后独自闯荡的日子我会想念你们,我会在远方祝福你们。  
        再见了北京,再见了我的朋友,今夜我将踏上归途,将踏上新的人生旅程,我会在未来的日子里细细品味这段美好的回忆,朋友们请保重!

        轻轻的我将离开你
        请将眼角的泪拭去
        漫漫长夜里未来日子里
        亲爱的你别为我哭泣
        前方的路虽然太凄迷
        请在笑容里为我祝福
        虽然迎著风虽然下著雨
        我在风雨之中念著你
        没有你的日子里
        我会更加珍惜自己
        没有我的岁月里
        你要保重你自己
        .......

       

       

1. 在Spring Boot中,可以使用JdbcTemplate或者Spring Data JPA等方式从数据库中查询数据。 2. 假设我们从数据库中查询出以下数据: ```java List<Map<String, Object>> dataList = jdbcTemplate.queryForList("SELECT name, age, city FROM user"); ``` 3. 将查询结果转化为指定格式的数据: ```java List<Map<String, Object>> formattedDataList = new ArrayList<>(); for (Map<String, Object> data : dataList) { Map<String, Object> formattedData = new LinkedHashMap<>(); formattedData.put("name", data.get("name")); formattedData.put("age", data.get("age")); formattedData.put("city", data.get("city")); formattedDataList.add(formattedData); } ``` 4. 将数据传递给Thymeleaf模板引擎,在index.html中进行展示。 Controller代码: ```java @GetMapping("/") public String index(Model model) { List<Map<String, Object>> dataList = jdbcTemplate.queryForList("SELECT name, age, city FROM user"); List<Map<String, Object>> formattedDataList = new ArrayList<>(); for (Map<String, Object> data : dataList) { Map<String, Object> formattedData = new LinkedHashMap<>(); formattedData.put("name", data.get("name")); formattedData.put("age", data.get("age")); formattedData.put("city", data.get("city")); formattedDataList.add(formattedData); } model.addAttribute("dataList", formattedDataList); return "index"; } ``` index.html代码: ```html <!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org"> <head> <title>Spring Boot Thymeleaf Example</title> </head> <body> <h1>Data List</h1> <table> <thead> <tr> <th>Name</th> <th>Age</th> <th>City</th> </tr> </thead> <tbody> <tr th:each="data : ${dataList}"> <td th:text="${data.name}"></td> <td th:text="${data.age}"></td> <td th:text="${data.city}"></td> </tr> </tbody> </table> </body> </html> ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值