- Spring 5.0 Projects
- Nilang Patel
- 98字
- 2021-07-02 12:34:57
Defining the API controllers
So far, we have written code to interact with the DB. Next up is to work on the code for the controller. We will have both types of controller—one that returns the view name (Thymeleaf template in our case) with the data for the view populated in the model object, and the other that exposes the RESTful APIs. We will need to add the following dependency to pom.xml:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
Adding spring-webmvc to the dependency will automatically include spring-core, spring-beans, and spring-context dependencies. So we can remove them from the pom.xml.
推薦閱讀
- Cisco OSPF命令與配置手冊
- 物聯(lián)網(wǎng)安全:理論、實踐與創(chuàng)新
- OpenLayers Cookbook
- 計算機(jī)網(wǎng)絡(luò)與數(shù)據(jù)通信
- 網(wǎng)絡(luò)安全技術(shù)與解決方案(修訂版)
- 互聯(lián)網(wǎng)安全的40個智慧洞見:2014年中國互聯(lián)網(wǎng)安全大會文集
- 企業(yè)私有云建設(shè)指南
- NB-IoT物聯(lián)網(wǎng)技術(shù)解析與案例詳解
- SSL VPN : Understanding, evaluating and planning secure, web/based remote access
- 數(shù)字調(diào)制解調(diào)技術(shù)的MATLAB與FPGA實現(xiàn):Altera/Verilog版(第2版)
- 物聯(lián)網(wǎng)之霧:基于霧計算的智能硬件快速反應(yīng)與安全控制
- Echo Quick Start Guide
- 夢工廠之材質(zhì)N次方:Maya材質(zhì)手冊
- 網(wǎng)絡(luò)工程實施技術(shù)與方案大全
- 人人都該都懂的互聯(lián)網(wǎng)思維