• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






天生自然

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

随笔分类 -  吴裕雄--天生自然Spring和SpringBoot开发实战学习笔记

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页

 
退出登录或注销关键代码
摘要:/** * 注销用户 */ @Override public String logout(HttpServletRequest request, HttpServletResponse response) { //获得用户认证信息 Authentication authentication = Se 阅读全文
posted @ 2022-03-09 11:16 吴裕雄
获取当前用户权限和用户名关键代码
摘要:/** * 获得当前用户权限 */ private String getAuthorities() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); List<Strin 阅读全文
posted @ 2022-03-09 11:10 吴裕雄
实现用户注册关键代码
摘要:/** * 实现注册 */ @Override public String register(MyUser userDomain) { String username = userDomain.getUsername(); List<Authority> authorityList = new Ar 阅读全文
posted @ 2022-03-09 10:56 吴裕雄
配置安装MongoDB
摘要:https://www.cnblogs.com/zhoulifeng/p/9429597.html 阅读全文
posted @ 2022-03-06 14:05 吴裕雄
解决:Unable to open JDBC Connection for DDL execution
摘要:1、application.properties中配置错误 需要在 spring.datasource.url 属性中加上 &serverTimezone=Asia/Shanghai&useSSL=false 阅读全文
posted @ 2022-03-05 21:16 吴裕雄
使用@ControllerAdvice进行全局异常处理关键代码
摘要:package com.tszr.controller; import com.tszr.exception.MyException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.spring 阅读全文
posted @ 2022-03-05 19:09 吴裕雄
自定义Starters
摘要:<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc 阅读全文
posted @ 2022-03-04 23:45 吴裕雄
解决:No active profile set, falling back to default profiles: default
摘要:pom.xml加上下面依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> 阅读全文
posted @ 2022-03-04 23:27 吴裕雄
@Conditional根据满足某特定条件创建特定的Bean
摘要:package com.tszr.conditional; import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; 阅读全文
posted @ 2022-03-04 20:48 吴裕雄
配置和输出日志
摘要:#设定日志的默认级别为info logging.level.root=info #设定org包下的日志级别为warn logging.level.org=warn #设定com.ch.ch4_1包下的日志级别为debug logging.level.com.ch.ch4_1=debug loggin 阅读全文
posted @ 2022-03-04 19:59 吴裕雄
使用@PropertySource和@Value读取其它自定义的参数文件里面的参数值
摘要:package com.tszr.controller; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.PropertySource; 阅读全文
posted @ 2022-03-04 19:51 吴裕雄
使用@ConfigurationProperties读取application.properties参数
摘要:package com.tszr.model; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @ 阅读全文
posted @ 2022-03-04 19:44 吴裕雄
@RequestMapping 转发数据乱码解决方案
摘要:@RequestMapping(value = "XXXX", method = RequestMethod.GET, produces = "text/html;charset=UTF-8") 添加produce部分 阅读全文
posted @ 2022-03-04 19:41 吴裕雄
使用@Value给属性参数赋值
摘要:package com.tszr.controller; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestMapping; 阅读全文
posted @ 2022-03-04 19:23 吴裕雄
使用Environment直接读取application.properties参数
摘要:package com.tszr.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.env.Environment; import or 阅读全文
posted @ 2022-03-04 19:11 吴裕雄
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
摘要:在Spring Boot项目中,出现这个错误有两种情况: 一,在main方法所在的类忘记添加@SpringBootApplication 二,缺少依赖,添加即可 <dependency> <groupId>org.springframework.boot</groupId> <artifactId> 阅读全文
posted @ 2022-03-04 18:12 吴裕雄
配置路由
摘要:<template> <div class="notFound"> <h2>抱歉,您访问的页面<em>失联</em>啦 ...</h2> </div> </template> <script> export default { name: 'NotFound' } </script> import 阅读全文
posted @ 2022-03-02 00:56 吴裕雄
Idea中创建maven项目
摘要:https://blog.csdn.net/zzvar/article/details/114879815 阅读全文
posted @ 2022-03-01 13:17 吴裕雄
IntelliJ IDEA 绿色破解版 打开即用
摘要:http://www.javatiku.cn/idea/822.html 阅读全文
posted @ 2022-03-01 12:55 吴裕雄
Incorrect username or password ( access token )
摘要:原因: 我修改了码云的账号密码解决如下: 重新打开命令行窗口,然后再次git下载、更新操作 阅读全文
posted @ 2022-03-01 11:52 吴裕雄
 

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 26 下一页