启动后端
直接参考官方文档:
https://doc.go-admin.dev/guide/ksks.html
go build下载包出错,需要设置goproxy为https://goproxy.cn
初始化数据库
➜ go-admin git:(v1.2.2_phone_dev) ✗ ./go-admin migrate -c=config/settings.ymlstart initwarning config not found settings.ssl in the configuration2021-02-27 20:47:32 file=logger/setup.go:44 level=fatal request logger setup error: %s0x4844040
settings.ssl的错误,需要制定配置文件为settings.full.yml,因为里面制定了ssl:enable为false。
fatal request logger setup error: %s0x4844040这个错误是由于日志目录问题导致的。
参考:
https://github.com/go-admin-team/go-admin/issues/298
在项目目录下创建:
- 你在你的项目盘建好相应的文件夹, 比如 E:\temp\logs\bus E:\temp\logs\job E:\temp\logs\request。
- 修改配置文件 logger:
logger:
# 日志存放路径
#———————-修改这里 像这样 就可以了——————————————
path: E:\temp\logs# 控制台日志stdout: true# 日志等级level: all# 业务日志开关enabledbus: true# 请求日志开关enabledreq: false
如果报如下错误:
[error] failed to initialize database, got error Error 1049: Unknown database 'go-admin'2021-02-27 22:28:13 file=database/mysql_drive.go:43 level=fatal mysql connect error :Error 1049: Unknown database 'go-admin'
需要先创建go-admin database。
然后执行初始化,就不会报错了,下面是goland配置:
./go-admin migrate -c=config/settings.full.yml
初始化执行成功:
数据库基础数据初始化成功Process finished with exit code 0

启动后端
./go-admin server -c=config/settings.full.yml
启动成功后:
看接口:
http://localhost:8000/swagger/index.html
日志打印目录:
启动前端
参考官方文档:
https://doc.go-admin.dev/guide/ksks.html#npm-install
编译
➜ go-admin-ui git:(v1.2.2_phone_dev) npm i --registry=https://registry.npm.taobao.orgnpm noticenpm notice New minor version of npm available! 7.5.3 -> 7.6.0npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.0npm notice Run npm install -g npm@7.6.0 to update!npm noticenpm ERR! code ERESOLVEnpm ERR! ERESOLVE unable to resolve dependency treenpm ERR!npm ERR! While resolving: go-admin@1.2.2npm ERR! Found: eslint@7.6.0npm ERR! node_modules/eslintnpm ERR! dev eslint@"7.6.0" from the root projectnpm ERR!npm ERR! Could not resolve dependency:npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/cli-plugin-eslint@4.5.11npm ERR! node_modules/@vue/cli-plugin-eslintnpm ERR! dev @vue/cli-plugin-eslint@"^4.4.6" from the root projectnpm ERR!npm ERR! Fix the upstream dependency conflict, or retrynpm ERR! this command with --force, or --legacy-peer-depsnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.npm ERR!npm ERR! See /Users/liliang22/.npm/eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:npm ERR! /Users/liliang22/.npm/_logs/2021-02-27T11_54_24_458Z-debug.log
考虑可能是node版本太高,导致:
重新安装node v14.14.0:
➜ go-admin-ui git:(v1.2.2_phone_dev) node -vv15.10.0➜ go-admin-ui git:(v1.2.2_phone_dev) npm -v7.5.3➜ go-admin-ui git:(v1.2.2_phone_dev) nvm lsv0.11.0v14.14.0-> v15.10.0default -> v15.10.0^[[Aiojs -> N/A (default)node -> stable (-> v15.10.0) (default)stable -> 15.10 (-> v15.10.0) (default)unstable -> 0.11 (-> v0.11.0) (default)lts/* -> lts/fermium (-> N/A)lts/argon -> v4.9.1 (-> N/A)lts/boron -> v6.17.1 (-> N/A)lts/carbon -> v8.17.0 (-> N/A)lts/dubnium -> v10.24.0 (-> N/A)lts/erbium -> v12.21.0 (-> N/A)lts/fermium -> v14.16.0 (-> N/A)➜ go-admin-ui git:(v1.2.2_phone_dev) nvm use v14.14.0Now using node v14.14.0 (npm v6.14.8)➜ go-admin-ui git:(v1.2.2_phone_dev) node -vv14.14.0
使用nvm use修改的版本只对当前会话生效,下次打开窗口还是原来的版本。全局生效需要nvm alias default v0.11.0:
➜ go-admin-ui git:(v1.2.2_phone_dev) nvm alias default v13.14.0default -> v13.14.0
此时执行编译:
➜ go-admin-ui git:(v1.2.2_phone_dev) nvm alias default v13.14.0default -> v13.14.0➜ go-admin-ui git:(v1.2.2_phone_dev) npm installnpm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-pluginnpm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supportednpm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"npm WARN deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli insteadnpm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.npm WARN deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latestnpm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.npm WARN deprecated har-validator@5.1.5: this library is no longer supportednpm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintainednpm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintainednpm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintainednpm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actualversion of core-js@3.npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecatednpm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated> fsevents@1.2.13 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/jest-haste-map/node_modules/fsevents> node install.jsSOLINK_MODULE(target) Release/.nodeCXX(target) Release/obj.target/fse/fsevents.oSOLINK_MODULE(target) Release/fse.node> deasync@0.1.21 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/deasync> node ./build.js`darwin-x64-node-13` exists; testingBinary is fine; exiting> fsevents@1.2.13 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/watchpack-chokidar2/node_modules/fsevents> node install.jsSOLINK_MODULE(target) Release/.nodeCXX(target) Release/obj.target/fse/fsevents.oSOLINK_MODULE(target) Release/fse.node> fsevents@1.2.13 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/webpack-dev-server/node_modules/fsevents> node install.jsSOLINK_MODULE(target) Release/.nodeCXX(target) Release/obj.target/fse/fsevents.oSOLINK_MODULE(target) Release/fse.node> yorkie@2.0.0 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/yorkie> node bin/install.jssetting up Git hooksdone> husky@4.2.5 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/husky> node husky installhusky > Setting up git hookshusky > Done> node-sass@4.14.1 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass> node scripts/install.jsDownloading binary from https://npm.taobao.org/mirrors/node-sass//v4.14.1/darwin-x64-79_binding.nodeDownload complete ⸩ ⠋ :Binary saved to /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-79/binding.nodeCaching binary to /Users/liliang22/.npm/node-sass/4.14.1/darwin-x64-79_binding.node> core-js@2.6.12 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/babel-runtime/node_modules/core-js> node -e "try{require('./postinstall')}catch(e){}"Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:> https://opencollective.com/core-js> https://www.patreon.com/zloirockAlso, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)> core-js@3.9.0 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/core-js> node -e "try{require('./postinstall')}catch(e){}"> core-js-pure@3.9.0 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/core-js-pure> node -e "try{require('./postinstall')}catch(e){}"> ejs@2.7.4 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/ejs> node ./postinstall.jsThank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)> highlight.js@9.18.5 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/highlight.js> node deprecated.js-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*Verion 9 of Highlight.js has reached EOL. It will no longerbe supported or receive security updates in the future.Please upgrade to version 10 or encourage your indirectdependencies to do so.For more info:https://github.com/highlightjs/highlight.js/issues/2877https://github.com/highlightjs/highlight.js/blob/master/VERSION_10_UPGRADE.md-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*> husky@4.2.5 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/husky> opencollective-postinstall || exit 0Thank you for using husky!If you rely on this package, please consider supporting our open collective:> https://opencollective.com/husky/donate> node-sass@4.14.1 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass> node scripts/build.jsBinary found at /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-79/binding.nodeTesting binaryBinary is finenpm notice created a lockfile as package-lock.json. You should commit this file.npm WARN @vue/cli-plugin-eslint@4.5.11 requires a peer of eslint@>= 1.6.0 < 7.0.0 but none is installed. You must install peer dependencies yourself.npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.npm WARN sass-loader@9.0.3 requires a peer of sass@^1.3.0 but none is installed. You must install peer dependencies yourself.npm WARN sass-loader@9.0.3 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.npm WARN eslint-loader@2.2.1 requires a peer of eslint@>=1.6.0 <7.0.0 but none is installed. You must install peer dependencies yourself.npm WARN jsdom@15.2.1 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.npm WARN ws@7.4.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.npm WARN ws@7.4.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.npm WARN The package vue-quill-editor is included as both a dev and production dependency.added 2345 packages from 2245 contributors in 109.33s89 packages are looking for fundingrun `npm fund` for details
群主(项目owner)建议的使用v13.14.0版本才编译通过。
启动
➜ go-admin-ui git:(v1.2.2_phone_dev) npm run dev> go-admin@1.2.2 dev /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui> vue-cli-service serveINFO Starting development server...98% after emitting CopyPluginWARNING Compiled with 2 warnings 11:04:12 AMModule Warning (from ./node_modules/eslint-loader/index.js):/Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/src/components/FileManage/Left.vue18:37 warning Variable 'data' is already declared in the upper scope vue/no-template-shadow✖ 1 problem (0 errors, 1 warning)Module Warning (from ./node_modules/eslint-loader/index.js):/Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/src/views/loginlog/index.vue283:13 error 'updateSysLoginlog' is not defined no-undef293:13 error 'addSysLoginlog' is not defined no-undef✖ 2 problems (2 errors, 0 warnings)You may use special comments to disable some warnings.Use // eslint-disable-next-line to ignore the next line.Use /* eslint-disable */ to ignore all warnings in a file.App running at:- Local: http://localhost:9527/- Network: http://192.168.1.102:9527/Note that the development build is not optimized.To create a production build, run npm run build.
看到还有一个warning,2个error
最终版本
最终群主(项目owner)建议使用 v10.16.0版本才没任何错误。
➜ go-admin-ui git:(v1.2.2_phone_dev) nvm install v10.16.0Downloading and installing node v10.16.0...Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-darwin-x64.tar.xz...########################################################################################################################################################################### 100.0%Computing checksum with shasum -a 256Checksums matched!Now using node v10.16.0 (npm v6.9.0)➜ go-admin-ui git:(v1.2.2_phone_dev) nvm alias default v10.16.0default -> v10.16.0➜ go-admin-ui git:(v1.2.2_phone_dev) npm installnpm WARN @vue/cli-plugin-eslint@4.5.11 requires a peer of eslint@>= 1.6.0 < 7.0.0 but none is installed. You must install peer dependencies yourself.npm WARN eslint-loader@2.2.1 requires a peer of eslint@>=1.6.0 <7.0.0 but none is installed. You must install peer dependencies yourself.npm WARN eslint-plugin-vue@6.2.2 requires a peer of eslint@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.npm WARN jsdom@15.2.1 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.npm WARN ws@7.4.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.npm WARN ws@7.4.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.npm WARN sass-loader@9.0.3 requires a peer of sass@^1.3.0 but none is installed. You must install peer dependencies yourself.npm WARN sass-loader@9.0.3 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.npm WARN The package vue-quill-editor is included as both a dev and production dependency.up to date in 7.796s➜ go-admin-ui git:(v1.2.2_phone_dev) npm run dev> go-admin@1.2.2 dev /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui> vue-cli-service serveINFO Starting development server...98% after emitting CopyPlugin⸨░░░░░░░░░░░░░░░░░░⸩ ⠋ :⸨ ░░░░░░░░░░░░░░░⸩ ⠋ :⸨ ░░░░░░░░░░░░⸩ ⠋ :⸨ ░░░░░░░░░░░⸩ ⠋ :⸨ ░░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░░⸩ ⠋ :⸨ ░░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░░⸩ ⠋ :⸨ ░░░░⸩ ⠋ :⸨ ░░░⸩ ⠋ :⸨ ░⸩ ⠋ :⸨ ░⸩ ⠋ :⸨ ░⸩ ⠋ :⸨ ░⸩ ⠋ :⸨ ░⸩ ⠋ :⸨ ░⸩ ⠋ :ERROR Failed to compile with 1 error 11:19:18 AMerror in ./src/components/tableAction.vue?vue&type=style&index=0&id=aaabb078&lang=scss&scoped=true&Syntax Error: Error: Missing binding /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-64/binding.nodeNode Sass could not find a binding for your current environment: OS X 64-bit with Node.js 10.xFound bindings for the following environments:- OS X 64-bit with Node.js 13.xThis usually happens because your environment has changed since running `npm install`.Run `npm rebuild node-sass` to download the binding for your current environment.@ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/tableAction.vue?vue&type=style&index=0&id=aaabb078&lang=scss&scoped=true& 4:14-466 14:3-18:5 15:22-474@ ./src/components/tableAction.vue?vue&type=style&index=0&id=aaabb078&lang=scss&scoped=true&@ ./src/components/tableAction.vue@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/system/schedule.vue?vue&type=script&lang=js&@ ./src/views/system/schedule.vue?vue&type=script&lang=js&@ ./src/views/system/schedule.vue@ ./src sync ^\.\/views.*$@ ./src/store/modules/permission.js@ ./src/store/modules sync \.js$@ ./src/store/index.js@ ./src/main.js@ multi (webpack)-dev-server/client?http://192.168.1.102:9527&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js^C
run的使用提示了 1 error ,根据提示,需要执行下npm rebuild node-sass:
➜ go-admin-ui git:(v1.2.2_phone_dev)➜ go-admin-ui git:(v1.2.2_phone_dev)➜ go-admin-ui git:(v1.2.2_phone_dev) npm rebuild node-sass> node-sass@4.14.1 install /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass> node scripts/install.jsDownloading binary from https://npm.taobao.org/mirrors/node-sass//v4.14.1/darwin-x64-64_binding.nodeDownload complete ░⸩ ⠋ :Binary saved to /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-64/binding.nodeCaching binary to /Users/liliang22/.npm/node-sass/4.14.1/darwin-x64-64_binding.node> node-sass@4.14.1 postinstall /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass> node scripts/build.jsBinary found at /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass/vendor/darwin-x64-64/binding.nodeTesting binaryBinary is finenode-sass@4.14.1 /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui/node_modules/node-sass➜ go-admin-ui git:(v1.2.2_phone_dev) npm run dev> go-admin@1.2.2 dev /Users/liliang22/go/src/github.com/go-admin-team/go-admin-ui> vue-cli-service serveINFO Starting development server...98% after emitting CopyPluginDONE Compiled successfully in 18315ms 11:20:34 AMApp running at:- Local: http://localhost:9527/- Network: http://192.168.1.102:9527/Note that the development build is not optimized.To create a production build, run npm run build.
最后启动就不会报错了。
第一个测试
示例文章界面
创建github.com/go-admin-team/go-admin/app/admin/apis/phone/article.go
package phoneimport ("net/http""github.com/gin-gonic/gin""go-admin/tools/app")// GetArticleList 获取文章列表func GetArticleList(c *gin.Context) {var res app.Responseres.Data = "hello world !"c.JSON(http.StatusOK, res.ReturnOK())}
创建github.com/go-admin-team/go-admin/app/admin/router/phone.go
package routerimport ("github.com/gin-gonic/gin""go-admin/app/admin/apis/phone")// 无需认证的路由代码func registerPhoneInfoRouter(v1 *gin.RouterGroup) {v1.GET("/articleList", phone.GetArticleList)}
修改github.com/go-admin-team/go-admin/app/admin/router/router.go中的examplesNoCheckRoleRouter方法,最后加以下代码调用:
// 无需认证的路由示例func examplesNoCheckRoleRouter(r *gin.Engine) {// 可根据业务需求来设置接口版本v1 := r.Group("/api/v1")// 空接口防止v1定义无使用报错v1.GET("/nilcheckrole", nil)for _, f := range routerNoCheckRole {f(v1)}// {{无需认证路由自动补充在此处请勿删除}}registerSysFileInfoRouter(v1)registerSysFileDirRouter(v1)//注册phoneregisterPhoneInfoRouter(v1)}
goland重新启动后,请求访问:
http://localhost:8000/api/v1/articleList
返回:
{"code":200,"data":"hello world !","msg":"","requestId":""}
创建表
CREATE TABLE `article` (`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编码',`title` varchar(128) DEFAULT NULL COMMENT '标题',`author` varchar(128) DEFAULT NULL COMMENT '作者',`content` varchar(255) DEFAULT NULL COMMENT '内容',`status` int(1) DEFAULT NULL COMMENT '状态',`publish_at` timestamp NULL DEFAULT NULL COMMENT '发布时间',`created_at` timestamp NULL DEFAULT NULL,`updated_at` timestamp NULL DEFAULT NULL,`deleted_at` timestamp NULL DEFAULT NULL,`create_by` int(11) unsigned DEFAULT NULL,`update_by` int(11) unsigned DEFAULT NULL,PRIMARY KEY (`id`),KEY `idx_article_deleted_at` (`deleted_at`) USING BTREE) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='文章';
代码生成
导入:
编辑:
点击生成代码,之后后端代码会多出以下文件:
前段也会多出以下相关文件:
重启前段服务后,刷新页面,点击代码生成->配置生成。
然后重启后端工程后,刷新页面,此时就出来文章菜单了:
新增文章:


