![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
关于springboot的一些记录
千年-today
Stay hungry Stay foolish
展开
-
SpringBoot文件上传(Ajax)
1.准备前端页面<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>fileup</title> <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script></head><body>原创 2020-06-22 16:15:10 · 484 阅读 · 0 评论 -
SpringBoot添加thymeleaf模板
springboot整合thymeleaf十分简单,你不用做任何配置,只需要添加thymeleaf依赖即可直接使用。下面给出例子。1.创建springboot工程添加依赖当然也可以直接在工程的pom文件中添加: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymelea原创 2020-06-22 11:06:12 · 659 阅读 · 0 评论 -
SpringBoot属性注入
这里写出两种从properties文件中获得属性值得两种方式你可以自己创建一个properties,当然也可以使用默认的application.properties。book.properties内容如下book.name=llbook.price=301.使用@Value@Component//如果是使用自己定义的properties需要下面的注解注明位置,如果写在application.properties中则不需要@PropertySource("classpath:book.pr原创 2020-06-22 10:04:59 · 135 阅读 · 0 评论