SpringBoot 學習三:Controller的使用

1、給同一個類添加兩個訪問地址 在瀏覽器裏輸入: localhost:8081/hello 或者 localhost:8081/hi都能訪問到。 2、給整個類指定一個URL  通過設置@RequestMapping("/hello"),給整個類指定一個URL  這個時候就需要通過http://localhost:8081/hello/hi去訪問這個類了。 3、如何處理url中的參數 (1) 使用@
相關文章
相關標籤/搜索