
Springboot
哈里哈气
个人博客:http://zhaoxincheng.com/
展开
-
springboot热部署
使用springboot可能会遇到热部署问题吧,就想实时的更新,以及调试代码。 先要去下载JRebel idea下载插件和激活jrebel就不说了,直接进入正题 第一步ctrl+alt+shift+/ 第二这里都打上钩 第三就去启动吧 ...原创 2018-07-30 19:38:29 · 8819 阅读 · 0 评论 -
Failed to configure a DataSource: 'url' attribute is not specified and no embedde
springboot启动报错Failed to configure a DataSource: ‘url’ attribute is not specified and no embedde原因分析 DataSourceAutoConfiguration会自动加载. 没有配置spring - datasource - url 属性. spring - datasource - url 配...原创 2019-01-04 10:24:12 · 3586 阅读 · 0 评论 -
Springboot开发微信公众号(四)
1.1 数据结构分析{ "button":[ { "type":"click", "name":"今日歌曲", "key":"V1001_TODAY_MUSIC" }, { "name":"菜单", "sub_button":[ ...转载 2018-11-19 16:38:20 · 833 阅读 · 0 评论 -
Springboot开发微信公众号(三)
Access_token一、Access_tokenaccess_token是公众号的全局唯一接口调用凭据,公众号调用各接口时都需使用access_toke。access_token的有效时间时2个小时,并且调用的次数是有限的,需要定时获取,并配置全局。通过访问接口的方式获取access_token.在之后的开发中会很常见,调用接口。1.添加httpclient处理 <d...原创 2018-11-02 11:36:25 · 1172 阅读 · 0 评论 -
springboot中Scheduled不执行的原因
@Component@EnableSchedulingpublic class Scheduler { @Scheduled(fixedDelay = 100) public void getAccessToken() { }}少了@EnableScheduling加上这个就好了原创 2018-11-02 10:02:09 · 26822 阅读 · 2 评论 -
static方法里用@Autowire或者@Resource注入的属性
看代码先@Component//必须有,使当前类成为一个bean对象。public class CheckUntil { @Autowired private ReadApplicationUntil readApplicationUntil; private static ReadApplicationUntil readApplicationUntils; ...原创 2018-10-30 16:52:10 · 3596 阅读 · 0 评论 -
Spring boot 读取配置文件application.yml (自定义属性值)
引入pom.xml支持这个是对@ConfigurationProperties注解支持的包<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifact...原创 2018-10-30 15:50:44 · 15741 阅读 · 4 评论 -
springboot与微信开发(二)
关注、接收和发送消息上一节讲述了配置接口,这次看一下关注、接收和发送消息。我们先看效果图在上一次的controller里面加上: @PostMapping("/wx") public void doPost(HttpServletRequest request, HttpServletResponse response) { response.setCharact...原创 2018-10-30 11:31:37 · 2519 阅读 · 1 评论 -
springboot与微信开发(一)
springboot开发微信环境搭建需要用到IntelliJ IDEA、微信公号测试平台、springboot、内网穿透(本地开发比较方便,这里我用的是小米球内网穿透)请自行建立springboot项目首先我们需要登录到微信测试开发平台,接口配置信息如下图:我们在配置的时候需要建立springboot项目,将项目运行起来才可以配置成功,我们先去建立controller类,类里面的请求方...原创 2018-10-30 10:56:42 · 2692 阅读 · 0 评论 -
使用spring boot +WebSocket的那些坑
springboot和websocket通讯时的坑有一个:下面这个东西要有import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.socket.server.st...原创 2018-09-04 22:17:32 · 4494 阅读 · 0 评论 -
使用springboot+layim+websocket实现webim
**使用springboot+layim+websocket实现webim**先来两张图吧项目介绍采用springboot和layim构建webim,使用websocket作为通讯协议,目前已经能够正常聊天,并没有对好友的操作进行实现,查找和加好友没有实现,有需要的可以自行实现安装教程sql自行导入,配置文件更改数据库信息http://ip:8080/login登陆入口目...原创 2018-10-20 12:34:56 · 3831 阅读 · 7 评论 -
Spring boot WebSocket 注入失败
1.在@ServerEndpoint()下面添加 //此处是解决无法注入的关键 private static ApplicationContext applicationContext; //这里是service private WebSocketService webSocketService;2.继续添加public static void s...原创 2018-09-08 11:47:19 · 1550 阅读 · 0 评论 -
关于springboot Error resolving template之类问题
今天开发遇到这个问题,找不到这个login.html使用RestController就没错误,但是无法转到这个页面org.thymeleaf.exceptions.TemplateInputException: Error resolving template [login.html], template might not exist or might not be accessible b...原创 2019-01-18 13:06:10 · 7675 阅读 · 0 评论