/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 50515
Source Host : localhost:3306
Source Schema : blog
Target Server Type : MySQL
Target Server Version : 50515
File Encoding : 65001
Date: 24/03/2020 18:22:54
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_blog
-- ----------------------------
DROP TABLE IF EXISTS `t_blog`;
CREATE TABLE `t_blog` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`first_picture` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`flag` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`views` int(11) NULL DEFAULT NULL,
`appreciation` int(11) NOT NULL DEFAULT 0,
`share_statement` int(11) NOT NULL DEFAULT 0,
`commentabled` int(11) NOT NULL DEFAULT 0,
`published` int(11) NOT NULL DEFAULT 0,
`recommend` int(11) NOT NULL DEFAULT 0,
`create_time` datetime NULL DEFAULT NULL,
`update_time` datetime NULL DEFAULT NULL,
`type_id` bigint(20) NULL DEFAULT NULL,
`user_id` bigint(20) NULL DEFAULT NULL,
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`tag_ids` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of t_blog
-- ----------------------------
INSERT INTO `t_blog` VALUES (1, 'maven中静态资源的过滤', '# maven中静态资源的过滤\r\n\r\npom.xml文件中加入下面配置\r\n\r\n### 可以过滤java和resources文件夹里面所有的的.properties和.xml文件\r\n**directory:指定资源所在的目录,目录的路径是相对于pom.xml文件的\r\nincludes:指定要包含哪些文件**\r\n**filtering标签中:false表示不过滤,true表示过滤**\r\n\r\n```java\r\n <build>\r\n <resources>\r\n <resource>\r\n <directory>src/main/java</directory>\r\n <includes>\r\n <include>**/*.properties</include>\r\n <include>**/*.xml</include>\r\n </includes>\r\n <filtering>false</filtering>\r\n </resource>\r\n <resource>\r\n <directory>src/main/resources</directory>\r\n <includes>\r\n <include>**/*.properties</include>\r\n <include>**/*.xml</include>\r\n </includes>\r\n <filtering>false</filtering>\r\n </resource>\r\n </resources>\r\n </build>\r\n```\r\n', 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1584367888190&di=7855ff350e759b4b3de8c614978673b4&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201612%2F07%2F20161207154722_Cmce5.thumb.400_0.gif', '原创', 0, 1, 1, 1, 1, 1, '2020-03-12 08:25:47', '2020-03-13 11:56:19', 3, 1, 'pom.xml文件中加入下面配置\r\n可以过滤java和resources文件夹里面所有的的.properties和.xml文件', '4');
INSERT INTO `t_blog` VALUES (2, '使用System.out.format()格式化输出', '#### JDK5.0允许java像C语言那样直接用printf()方法来格式化输出\r\n#### System.out.format()功能与printf()一样,可以使用%d,%f等参数。\r\n使用System.out.format()完成**左对齐,补0,千位分隔符,小数点位数,本地化表达**\r\n```java\r\npublic class TestNumber {\r\n \r\n public static void main(String[] args) {\r\n int year = 2020;\r\n //左对齐,补0,千位分隔符,小数点位数,本地化表达\r\n \r\n //直接打印数字\r\n System.out.println(year);\r\n \r\n //直接打印数字\r\n System.out.format(\"%d%n\",year);\r\n //总长度是8,默认右对齐\r\n System.out.format(\"%8d%n\",year);\r\n //总长度是8,左对齐\r\n System.out.format(\"%-8d%n\",year);\r\n //总长度是8,不够补0\r\n System.out.format(\"%08d%n\",year);\r\n //千位分隔符\r\n System.out.format(\"%,8d%n\",year*10000);\r\n \r\n //保留5位小数\r\n System.out.format(\"%.5f%n\",Math.PI);\r\n \r\n //不同国家的千位分隔符\r\n System.out.format(Locale.FRANCE,\"%,.2f%n\",Math.PI*10000);\r\n System.out.format(Locale.US,\"%,.2f%n\",Math.PI*10000);\r\n System.out.format(Locale.UK,\"%,.2f%n\",Math.PI*10000);\r\n \r\n }\r\n}\r\n```\r\n输出结果:\r\n\r\n```java\r\n2020\r\n2020\r\n 2020\r\n2020 \r\n00002020\r\n20,200,000\r\n3.14159\r\n31?415,93\r\n31,415.93\r\n31,415.93\r\n```\r\n', 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1584368822685&di=19855856bbd158b52926a49b51e876c0&imgtype=0&src=http%3A%2F%2Fwx2.sinaimg.cn%2Fcrop.0.4.1280.711%2F70745653ly1fvuflwe10zj20zk0k0n06.jpg', '原创', 0, 1, 1, 1, 1, 1, '2019-03-12 13:42:14', '2019-03-13 12:00:08', 6, 1, 'JDK5.0允许java像C语言那样直接用printf()方法来格式化输出\r\nSystem.out.format()功能与printf()一样,可以使用%d,%f等参数。\r\n\r\n使用System.out.format()完成左对齐,补0,千位分隔符,小数点位数,本地化表达', '7');
INSERT INTO `t_blog` VALUES (3, 'Springboot中PageHelper 分页查询使用方法', '### 一:导入依赖\r\n\r\n```java\r\n<dependency>\r\n <groupId>com.github.pagehelper</groupId>\r\n <artifactId>pagehelper-spring-boot-starter</artifactId>\r\n <version>1.2.13</version>\r\n</dependency>\r\n```\r\n### 二:配置yml文件中PageHelper的属性\r\n\r\n```java\r\npagehelper: #分页插件\r\n helper-dialect: mysql\r\n reasonable: true\r\n support-methods-arguments: true\r\n params:\r\n```\r\n### 三:在controller类中使用,\r\n##### 1.在查询方法上调用PageHelper.startPage()方法,设置分页的页数和每页信息数,\r\n##### 2.将查询出来的结果集用PageInfo的构造函数初始化为一个分页结果对象\r\n##### 3.将分页结果对象存入model,返回前端页面\r\n```java\r\n@GetMapping(\"/types\")\r\npublic String types(@RequestParam(required = false,defaultValue = \"1\",value = \"pagenum\")int pagenum, Model model){\r\n\r\n PageHelper.startPage(pagenum, 5); //pagenum:页数,pagesize:每页的信息数\r\n \r\n List<Type> allType = typeService.getAllType(); //调用业务层查询方法\r\n \r\n PageInfo<Type> pageInfo = new PageInfo<>(allType); //得到分页结果对象\r\n \r\n model.addAttribute(\"pageInfo\", pageInfo); //携带分页结果信息\r\n \r\n return \"admin/types\"; //回到前端展示页面\r\n}\r\n```\r\n### 四:前端展示分页(thymeleaf+semantic-ui),这里ui用自己的就行,比如bootstrap或layui,主要是thymeleaf的使用。\r\n\r\n```java\r\n<table class=\"ui compact celled teal table\">\r\n <thead>\r\n <tr>\r\n <th></th>\r\n <th>名称</th>\r\n <th>操作</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr th:each=\"type, iterStat : ${pageInfo.list}\">\r\n <td th:text=\"${iterStat.count}\">1</td>\r\n <td th:text=\"${type.name}\">摸鱼方法</td>\r\n <td>\r\n <a href=\"#\" th:href=\"@{/admin/types/{id}/input(id=${type.id})}\" class=\"ui mini teal basic button\">编辑</a>\r\n <a href=\"#\" th:href=\"@{/admin/types/{id}/delete(id=${type.id})}\" class=\"ui mini red basic button\">删除</a>\r\n </td>\r\n </tr>\r\n </tbody>\r\n <tfoot>\r\n <tr>\r\n <th colspan=\"7\">\r\n <div class=\"ui mini pagination menu\" >\r\n <div class=\"item\"><a th:href=\"@{/admin/types}\">首页</a></div>\r\n <div class=\"item\"><a th:href=\"@{/admi
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一键三连加关注私信up获取源码无偿分享群,以下为福利链接:https://pan.baidu.com/s/1niFL_7h0KhdJSW7r0XdtDw?pwd=1234 提取码:1234 基于springboot的XXXX管理系统,可以用于计算机专业毕设和课设使用 开发语言:Java 开发软件:eclipse/myeclipse/idea 框架:springboot JDK版本:JDK1.8 服务器:tomcat7 数据库:mysql 5.7(一定要5.7版本) 数据库工具:Navicat11 Maven包:Maven3.3.9 浏览器:谷歌浏览器 管理员账号:admin 管理员密码:admin 配置环境安装包: Java配置环境链接:https://cloud.189.cn/t/baeQZrAjEvyy (访问码:pfd5) 后台路径地址:localhost:8080/项目名称/admin/dist/index.html 前台路径地址:localhost:8080/项目名称/front/dist/inde
资源推荐
资源详情
资源评论
收起资源包目录
springboot个人博客项目.zip (1069个子文件)
AUTHORS 6KB
AUTHORS 6KB
Blog.class 13KB
Comment.class 7KB
User.class 7KB
BlogController.class 5KB
BlogServiceImpl.class 5KB
TypeController.class 4KB
TagController.class 4KB
IndexController.class 3KB
LogAspect$RequestLog.class 3KB
CommentController.class 3KB
MarkdownUtils.class 3KB
LogAspect.class 3KB
Type.class 3KB
Tag.class 3KB
TagServiceImpl.class 3KB
TagShowController.class 3KB
LoginController.class 2KB
TypeShowController.class 2KB
BlogAndTag.class 2KB
CommentServiceImpl.class 2KB
ControllerExceptionHandler.class 2KB
TypeServiceImpl.class 2KB
MD5Utils.class 2KB
BlogDao.class 1KB
WebConfig.class 1KB
MarkdownUtils$CustomAttributeProvider.class 1KB
ArchiveShowController.class 1KB
BlogService.class 1KB
LoginInterceptor.class 1KB
UserServiceImpl.class 995B
MarkdownUtils$1.class 907B
NotFoundException.class 854B
CommentDao.class 824B
TagService.class 719B
BlogApplication.class 717B
TypeDao.class 702B
TagDao.class 688B
AboutShowController.class 593B
TypeService.class 583B
BlogApplicationTests.class 515B
UserDao.class 507B
CommentService.class 385B
UserService.class 257B
editormd.css 76KB
editormd.css 76KB
editormd.min.css 60KB
editormd.min.css 60KB
editormd.preview.css 55KB
editormd.preview.css 55KB
editormd.preview.min.css 44KB
editormd.preview.min.css 44KB
ambiance.css 26KB
ambiance.css 26KB
animate.css 23KB
animate.css 23KB
codemirror.css 8KB
codemirror.css 8KB
typo.css 7KB
typo.css 7KB
codemirror.min.css 5KB
codemirror.min.css 5KB
mdn-like.css 5KB
mdn-like.css 5KB
solarized.css 5KB
solarized.css 5KB
me.css 3KB
me.css 3KB
merge.css 3KB
merge.css 3KB
lint.css 3KB
lint.css 3KB
xq-dark.css 3KB
xq-dark.css 3KB
prism.css 3KB
prism.css 3KB
lesser-dark.css 2KB
lesser-dark.css 2KB
pastel-on-dark.css 2KB
pastel-on-dark.css 2KB
xq-light.css 2KB
xq-light.css 2KB
tomorrow-night-eighties.css 2KB
tomorrow-night-eighties.css 2KB
editormd.logo.css 2KB
editormd.logo.css 2KB
erlang-dark.css 2KB
erlang-dark.css 2KB
zenburn.css 2KB
zenburn.css 2KB
twilight.css 2KB
twilight.css 2KB
midnight.css 2KB
midnight.css 2KB
vibrant-ink.css 2KB
vibrant-ink.css 2KB
mbo.css 2KB
mbo.css 2KB
base16-dark.css 2KB
共 1069 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11
资源评论
源码空间站11
- 粉丝: 3938
- 资源: 500
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功