SpringBoot
kcp606
https://www.kuangcp.top
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot使用Yml配置文件
添加依赖 来源于官方文档 SpringBoot 1.5.9Maven<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional></depend原创 2018-01-01 20:45:16 · 13984 阅读 · 0 评论 -
SpringBoot集成SpringSecurity(入门级)
目录Springboot集成SpringSecurity Demo 快速上手-初步入门: 创建单用户单角色的安全控制多用户多角色的实现思路 每个身份都使用一个登录实体类另一种思路:实现细节 关于注解的几种使用方式 @Secured@RolesAllowedSpringSecurity3.0 开始提供了 SpEL表达式保护方法应用目录创建于2017-12-18Springb原创 2017-12-30 14:46:04 · 1168 阅读 · 0 评论 -
SpringBoot相关
目录SpringBoot 安装SpringBootCLISpringboot的测试模块参考博客配置文件 多种配置文件并切换 yml方式yml和Properties结合Web模块 上传下载文件错误页面跳转配置跨域HTTPS的配置线程池项目部署 生成指定文件 warjar构建docker镜像 gradle结合docker目录创建于2017-12-18Spring原创 2017-12-30 14:44:14 · 956 阅读 · 0 评论 -
Springboot项目使用Nginx 并配置 HTTPS
Springboot的配置 参考博客签发证书:############ 证书颁发机构# CA机构私钥openssl genrsa -out ca.key 2048# CA证书openssl req -x509 -new -key ca.key -out ca.crt############ 服务端# 生成服务端私钥openssl genrsa -out server.key 20转载 2017-10-23 20:57:06 · 7352 阅读 · 1 评论 -
Springboot单文件上传大小限制 FileUploadBase$FileSizeLimitExceededException:
找到的解决方案:application.properties中配置spring.http.multipart.maxFileSize = -1这样改大了一点,但是最大限制变成了10Mb【最终解决方案】在任意一个@Configuration注解的类下添加该方法即可 @Bean public MultipartConfigElement multipartConfigElement() {原创 2017-10-22 21:10:25 · 11741 阅读 · 0 评论 -
SpringBoot2的跨域配置
官方 CORS support in Spring Framework 参考博客 第二十五章:SpringBoot添加支持CORS跨域访问 这是SpringBoot1, 但是大致一样 参考博客 Spring Security的WebMvcConfigurerAdapter已过时 参考博客 SpringBoot 实现前后端分离的跨域访问(CORS)虽然有错误,但是可以参考学习...原创 2018-04-22 10:06:37 · 5386 阅读 · 0 评论 -
SpringBoot2 集成 Security JWT
Github 完整源码SpringBoot2中使用Security整合JWT 参考 原项目 修改而来 | 博客运行起来后执行命令获取TOKENcurl -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"123456"}' http://127.0.0.1...原创 2018-04-25 12:10:13 · 4742 阅读 · 0 评论 -
SpringBoot常见部署方式 jar war docker
项目部署生成指定文件war部署为war必须的类,一般在创建项目时选war就会自动生成,选jar就要手动添加 public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBui...原创 2018-05-23 09:41:43 · 1770 阅读 · 0 评论
分享