随笔分类 -  springboot

摘要:1.模块安装 npm install crypto-js 2.新建插件secret.js import CryptoJS from 'crypto-js' // 默认的 KEY 与 iv 如果没有给 const KEY = CryptoJS.enc.Utf8.parse("1234567890123 阅读全文
posted @ 2022-01-11 17:04 o小兵o 阅读(4430) 评论(0) 推荐(0) 编辑
摘要:1.新建拦截器配置类: WebMvcConfigurer import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import o 阅读全文
posted @ 2021-12-14 11:08 o小兵o 阅读(211) 评论(0) 推荐(0) 编辑
摘要:1.SpringBoot使⽤用注解⽅方式开启定时任务 @SpringBootApplication @ServletComponentScan //启动类⾥里里⾯面 @EnableScheduling开启定时任务,⾃自动扫描 @EnableScheduling public class Demo00 阅读全文
posted @ 2021-04-25 11:47 o小兵o 阅读(113) 评论(0) 推荐(0) 编辑
摘要:1.springboot启动类里面使用@EnableAsync注解开启异步功能 @EnableAsync public class Demo001Application { public static void main(String[] args) { SpringApplication.run( 阅读全文
posted @ 2021-04-22 15:02 o小兵o 阅读(229) 评论(0) 推荐(0) 编辑
摘要:1.Thymeleaf介绍(官网推荐:https://www.thymeleaf.org/doc/articles/thymeleaf3migration.html) Thymeleaf是跟Velocity、FreeMarker类似的模板引擎,它可以完全替代JSP,相较与其他的模板引擎,它主要有以下 阅读全文
posted @ 2021-04-13 14:19 o小兵o 阅读(119) 评论(0) 推荐(0) 编辑
摘要:1.freemarker介绍 Apache FreeMarker是一款开源的模板引擎:即一种基于模板和要改变的数据,并用来生成输出文本(HTML网页,电子邮件,配置文件,源代码等)的通用工具。它不是面向最终用户的,而是一个java类库,是一款程序员可以嵌入他们所开发产品的组件。模板使用FreeMar 阅读全文
posted @ 2021-04-13 10:54 o小兵o 阅读(1191) 评论(0) 推荐(0) 编辑
摘要:一、全局异常处理 //Result定义全局数据返回对象 package com.xiaobing.demo001.domain; public class Result { private Integer code; private String message; private Object da 阅读全文
posted @ 2021-04-08 15:26 o小兵o 阅读(2809) 评论(0) 推荐(0) 编辑
摘要:一、配置文件加载 1、Controller中配置并指向文件 @Controller @PropertySource(value = { "application.properties" })//指定配置文件 2、在变量上打注解并指明配置文件中的key @Value("${web.upload.fil 阅读全文
posted @ 2020-07-01 22:55 o小兵o 阅读(1173) 评论(0) 推荐(0) 编辑
摘要:1、引入热部署依赖包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependen 阅读全文
posted @ 2020-06-30 22:53 o小兵o 阅读(203) 评论(0) 推荐(0) 编辑
摘要:1、静态文件 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>文件上传</title> </head> <body> <form enctype="multipart/form-data" method="post" actio 阅读全文
posted @ 2020-06-29 23:03 o小兵o 阅读(10790) 评论(4) 推荐(0) 编辑
摘要:1、目录 src/main/java :存放java代码 src/main/resources static:存放静态文件,比如css、js、image(访问方式 http://localhost:8080/js/main.js) templates:存放静态页面jsp,html,tpl confi 阅读全文
posted @ 2020-06-18 23:49 o小兵o 阅读(1003) 评论(0) 推荐(0) 编辑
摘要:1.新建项目,项目中实战讲解注解作用 2.pom.xml依赖配置 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <parent> <groupId>org.s 阅读全文
posted @ 2019-11-10 20:56 o小兵o 阅读(472) 评论(1) 推荐(1) 编辑
摘要:1. springboot自动创建地址:https://start.spring.io/ 2.选择web(springMVC) 3.点击创建 4.创建成功 5.解压,导入项目 6.新建成功 7.原因 : maven的插件版本的问题,造成与IDE的不兼容 解决办法 :在pom中加上 <maven-ja 阅读全文
posted @ 2019-11-03 13:04 o小兵o 阅读(507) 评论(0) 推荐(0) 编辑
摘要:1.打开Eclipse新建maven项目 2.导入maven依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0 阅读全文
posted @ 2019-11-02 23:44 o小兵o 阅读(403) 评论(0) 推荐(0) 编辑
摘要:springboot官方文档:https://spring.io/guides/gs/spring-boot/ springbootGitHub地址:https://github.com/spring-projects/spring-boot Spring Boot Spring Boot make 阅读全文
posted @ 2019-11-02 22:52 o小兵o 阅读(443) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示