codingdocs / springboot-guide Goto Github PK
View Code? Open in Web Editor NEWSpringBoot2.0+从入门到实战!
Home Page: https://snailclimb.gitee.io/springboot-guide/#/
License: Apache License 2.0
SpringBoot2.0+从入门到实战!
Home Page: https://snailclimb.gitee.io/springboot-guide/#/
License: Apache License 2.0
过滤器这篇文章,第4小节题目“4.定义多个拦截器,并决定它们的执行顺序”,“拦截器”应更正为“过滤器”。
看起来是csdn图床加了防盗链处理,解决方法是在img标签上加个referrerPolicy="no-referrer"
或者是在html里加个 <meta name="referrer" content="no-referrer" />
这里写了一个油猴脚本
// ==UserScript==
// @name 恢复图片显示
// @namespace http://tampermonkey.net/
// @version 2024-03-26
// @description try to take over the world!
// @author You
// @match https://snailclimb.gitee.io/springboot-guide/
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitee.io
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(() => {
// 获取页面上的所有img标签
var imgElements = document.getElementsByTagName('img');
// 遍历所有img标签并添加referrerPolicy属性
for (var i = 0; i < imgElements.length; i++) {
imgElements[i].setAttribute('referrerPolicy', 'no-referrer');
}
}, 2000)
// Your code here...
})();
《Spring Boot 整合 阿里云OSS 存储服务,快来免费搭建一个自己的图床 》 这篇文章不见了吗?
按照文章一直捕获不到异常,调试也进不去方法内部。
https://github.com/Snailclimb/springboot-guide/blob/master/docs/advanced/springboot-handle-exception-plus.md
ExceptionController.java(抛出一场的类)
应该修改为
ExceptionController.java(抛出异常的类)
我之前是用的七牛云的对象存储博客中的图片,但是被七牛云坑了一波,那个外链域名是一个月就失效的,看到这里用的阿里云的oos不会有这个问题吧,没有的话就转战阿里云了
用DeleteMapping的话会405报错,我换成PostMapping就好了,不知道大家有没有遇到这种问题
Spring Boot 异常处理的几种方式中的第三点,介绍@ResponseStatus使用时代码中的public类与包名不对应
跟着教程撸了一遍,进浏览器报了NPE,然后跟了一下,自己改了一下。
原代码:
public class HelloController {
@Reference
private HelloService helloService;
修改后:
public class HelloController {
@Reference
private HelloService helloService = new HelloServiceImpl();
@PreDestroy : 当 bean 被 Web 容器的时候被调用,一般用来释放 bean 所持有的资源。。PostConstruct 注解的方法会在Servlet 的destroy()方法之前执行。
这里的PostConstruct注解应该是PreDestroy 吧,是不是笔误了
《RESTful Web 服务介绍》中的helloworld项目404了
The type HandlerInterceptorAdapter is deprecated
可以写一个新的 org.springframework.web.servlet.HandlerInterceptor 更好一点。
Responsity 应该改为 ResponseEntity
Spring Boot JPA 基础:常见操作解析 部分的测试代码中,@before注解没有给value属性赋值,没有指定切点表达式
由于是restful所以Httpcode 200,400比较好理解,但是返回1001,1002这种感觉没什么意义,前后端分离,这种code输出给前端,前端人员实际上抛出去的是错误信息,得到这个code的意义在哪里,即使给后端人员看,也没必要通过code找问题,通过接口名称不是也能定位吗?
https://snailclimb.gitee.io/springboot-guide/#/./docs/advanced/springboot-async
Queue Capacity : 当新任务来的时候会先判断当前运行的线程数量是否达到核心线程数,如果达到的话,信任就会被存放在队列中。
“信任” 应该是 “新任务”吧?
否则UserService.java文件中自动注解会报错
https://github.com/Snailclimb/springboot-guide/blob/master/docs/start/springboot-hello-world.md
1、错字修改:最后的标题“代办”应该为“待办”
2、链接有误:“总结”部分
代码地址: https://github.com/Snailclimb/springboot-guide/tree/master/source-code/start/hello-world(建议自己手敲一遍!!!)
跳转不到指定位置。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.