上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 1springboot单元测试的依赖jar <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> < 阅读全文
posted @ 2020-08-20 14:37 我是一只老白兔 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 1配置文件加载 不废话,上代码 首先现在pom.xml中添加Maven的jar <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</arti 阅读全文
posted @ 2020-08-19 15:38 我是一只老白兔 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 1常见的配置文件 (xx.yml xx.properties) YAML(yet another markup language),写YAML比xml快得多,无需关注标注标签和引号,使用空格、缩近来分层,不同层次之间的缩近可以用不同的空格数目, 注意:Key后面的冒号,后面需要新增跟一个空格,树状结 阅读全文
posted @ 2020-08-19 12:01 我是一只老白兔 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 在application.properties上鼠标右键点击,选择properties,选择UTF-8类型的数据类型,点击【apply】,关闭即可 阅读全文
posted @ 2020-08-18 15:38 我是一只老白兔 阅读(1161) 评论(0) 推荐(0) 编辑
摘要: 1官方文档:https://docs.spring.io/spring-boot/docs/2.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#using-boot-dectools 点击Developer Tools,复制Maven的依赖包到pom.xml中 2r 阅读全文
posted @ 2020-08-18 10:41 我是一只老白兔 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 不知道eclipse中怎么安装github插件的,可以查看地址https://www.cnblogs.com/zhushilai/p/13503652.html 1对需要更新的文件点击右键,然后点击Team下面的commit 注意,左侧的unstaged changes是系统扫描出来的更新文件,点击 阅读全文
posted @ 2020-08-17 18:28 我是一只老白兔 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 1在pom.xml中添加Maven的依赖,如果没有对应的依赖,运行后会报错:no main mainfest attribute,in xxx.jar <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <ar 阅读全文
posted @ 2020-08-17 17:00 我是一只老白兔 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 一 对上传图片加以限制 1.1可以直接在有@springbootApplication注解的类或者是有@Configuration注解中的类中添加以下限制,然后运行application即可, 如果没有这2种注解,自己写一个工具类,添加注解也行 /** * 设置上传文件的类型 * 注意Multipa 阅读全文
posted @ 2020-08-17 15:59 我是一只老白兔 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: 1打开eclipse -->help -->eclipse Marketplace...,搜索egit,点击install 然后漫长的等待 2鼠标右键,点击导入,选择git下的Projects from Git,点击next 3找一个git项目,复制code中的地址 4将地址复制到URI中,uer和 阅读全文
posted @ 2020-08-14 18:00 我是一只老白兔 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 1结构 2在js中新建upload.html <!DOCTYPE html><html><head><meta charset="UTF-8"><title>uploading.html</title> <meta name="keywords" content="keyword1,keywords 阅读全文
posted @ 2020-08-14 13:03 我是一只老白兔 阅读(3578) 评论(0) 推荐(0) 编辑
摘要: 1目录讲解 src/main/java:存放代码 src/main/resources static:存放静态文件,比如:css js image (访问方式:http://localhost:8080/js/main.js) templates:存放静态页面 jsp ,html,tpl confi 阅读全文
posted @ 2020-08-13 17:56 我是一只老白兔 阅读(4569) 评论(0) 推荐(0) 编辑
摘要: 1常用的框架 阿里的fastjson,谷歌的gson javabean序列化json,性能Jackson>fastJson>Gson>Json 测试方法:循环序一百万次,看谁先完成 jackson fastjson gson类各有优缺点,但是优化无非是空间换时间,运行速度很快,但是cpu温度较高,负 阅读全文
posted @ 2020-08-13 16:19 我是一只老白兔 阅读(1166) 评论(0) 推荐(0) 编辑
摘要: 1上代码 package com.example.demo.controller; import java.util.HashMap;import java.util.Map; import org.springframework.web.bind.annotation.PostMapping;im 阅读全文
posted @ 2020-08-13 13:09 我是一只老白兔 阅读(858) 评论(0) 推荐(0) 编辑
摘要: 1get请求 多说无益,直接上代码 package com.example.demo.controller; import java.util.HashMap;import java.util.Map; import javax.servlet.http.HttpServletRequest; im 阅读全文
posted @ 2020-08-13 12:39 我是一只老白兔 阅读(3695) 评论(0) 推荐(0) 编辑
摘要: 1application必须是在根目录下,否则无法扫描到对应的类,从而给前端返回值, 或者通过@ComponentScan(basePackages = {"com.example.com.example.demo.controller.DemoController"})来指定绝对路径 2 阅读全文
posted @ 2020-08-13 10:54 我是一只老白兔 阅读(1813) 评论(0) 推荐(1) 编辑
摘要: 1postman的官网地址:https://www.postman.com/,进入官网 2漫长的等待 3找到安装文件,双击即可 postman安装的时候没法自定义路径,默认路径是 C:\Users\Administrator\AppData\Local\Postman 4postman最好是注册一个 阅读全文
posted @ 2020-08-12 22:58 我是一只老白兔 阅读(3314) 评论(0) 推荐(0) 编辑
摘要: 1@RestController和@RestMapping是springMVC的注解,不是springboot的注解 2@RestController=@Controller+@ResponseBody ,ResponseBody是返回json类型的数据 3@SpringBootApplicatio 阅读全文
posted @ 2020-08-12 22:26 我是一只老白兔 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 1登录官网https://typora.io/,在最底部点击【windows】 下载64位的markdown编辑器 2找到下载好的位置,双击安装文件 阅读全文
posted @ 2020-08-12 18:09 我是一只老白兔 阅读(358) 评论(0) 推荐(0) 编辑
摘要: springboot的pom.xml中没有声明version,那么默认引用的是父类版本的依赖,也就是parent中的版本号, 如果想查看对应的版本依赖,可以ctrl点击,然后去查找 如果想用其他版本的依赖,直接加上<version>1.5.9RELEASE</version>之类版本就行了,Mave 阅读全文
posted @ 2020-08-12 00:38 我是一只老白兔 阅读(2502) 评论(0) 推荐(0) 编辑
摘要: 本质就是jar包引用不到,这个时候就要需要去windows-preferences-Maven-user settings中查看jar包存放在本地的那个仓库之中 我存放的是D:\tools\study_tools\maven\apache-maven-3.6.3\repository 关闭eclip 阅读全文
posted @ 2020-08-12 00:01 我是一只老白兔 阅读(3094) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页