建立乙個簡單的SpringBoot專案

2021-09-10 21:56:52 字數 474 閱讀 1027

解壓到自定義位置,用ide匯入新建的meven專案

選擇剛解壓好的demo

然後基本上就是一路next 就可以了

匯入好了以後我們可以看到

這個時候我們要去pom.xml裡面加入依賴

org.springframework.boot

spring-boot-starter-web

我們寫乙個controller來簡單實現個hello world

public string sayworld(@pathvariable("name") string name) }

1234

5678

9101112

1314

15這個時候關掉剛剛執行的服務,重新啟動,掃瞄註解。

這個時候我們可以訪問tomcat容器 預設8080埠

可以看到這個時候介面顯示 hello duxw 。

使用idea快捷建立乙個springboot專案

第一步 file new project 選擇spring initializr,jdk選擇自己專案環境合適的版本,springboot初始化工具位址預設就好 第二步 按照需要修改以下幾項配置,然後繼續next到結束即可 第三步 修改專案編譯的jdk版本 第四步 新增http訪問端 第五步 解決打包...

建立乙個簡單的執行緒

handle createthread in opt lpsecurity attributes lpthreadattributes,security attributes 結構指定了這個執行緒的安全屬性,如果填 null 則就以預設的安全描述子建立,並且返回的控制代碼不會被繼承。in size ...

建立乙個簡單的畫板

1.cv.createtrackbar 有5個引數 滑動條的名字 視窗的名字 數值的最小值 數值的最大值 函式2.cv.gettrackbarpos 有2個引數 滑動條的名字 視窗的名字 函式的返回值是滑動條的數值。import cv2 as cv import numpy as np def no...