上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 181 下一页
摘要: 一,默认html模板不会打包到二进制文件中 如果二进制文件的当前目录下不包含html模板文件路径,会报错如下 $ ./mediabank [GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery mi 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(35) 评论(0) 推荐(0)
摘要: 一,代码 controller: //得到用户信息 func (ic *MediaController) User(c *gin.Context) { if c.Request.Header.Get("X-Requested-With") == "XMLHttpRequest" { c.JSON(h 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(9) 评论(0) 推荐(0)
摘要: 一,下载jquery 官网: https://jquery.com/ 从命令行下载: $ wget https://code.jquery.com/jquery-3.7.1.min.js 二,代码: 目录结构 routes package routes import ( "github.com/gi 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(16) 评论(0) 推荐(0)
摘要: 一,go代码: 目录结构: routes package routes import ( "github.com/gin-gonic/gin" "mediabank/controller" ) func Routes() *gin.Engine { router := gin.Default() / 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(19) 评论(0) 推荐(0)
摘要: 一,目录结构 二,代码 controller package controller import ( "github.com/gin-gonic/gin" "net/http" ) type MediaController struct{} func NewMediaController() Med 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(15) 评论(0) 推荐(0)
摘要: 一,从官网下载 官方站: https://golang.google.cn/dl/ 从命令行下载: $ wget https://golang.google.cn/dl/go1.25.1.linux-amd64.tar.gz 二,安装 解压: $ tar -zxvf go1.25.1.linux-a 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(271) 评论(0) 推荐(0)
摘要: 一,创建项目 $ mkdir mediabank $ cd mediabank/ $ go mod init mediabank go: creating new go.mod: module mediabank $ go get github.com/gin-gonic/gin@latest 二, 阅读全文
posted @ 2025-09-20 09:46 刘宏缔的架构森林 阅读(33) 评论(0) 推荐(0)
摘要: 一,代码: 在activity中增加一行: getSupportActionBar()?.hide() 例子: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(17) 评论(0) 推荐(0)
摘要: 一,引入lifecycle 1,libs.versions.toml [versions] lifecycle = "2.9.1" [libraries] # lifecycle androidx-lifecycle-livedata-core-ktx = { group = "androidx.l 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(25) 评论(0) 推荐(0)
摘要: 一,安装第三方库 build.gradle.kts中添加 implementation("com.squareup.retrofit2:retrofit:2.9.0") implementation("com.squareup.retrofit2:converter-gson:2.9.0") imp 阅读全文
posted @ 2025-09-06 22:07 刘宏缔的架构森林 阅读(28) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 181 下一页