Blog Articles
-
[spring-boot] 使用gradle建立项目
使用gradle建立spring-boot项目 https://spring.io/guides/gs/spring-boot/ 安装或更新Gradle https://downloads.gradle.org/distributions/gradle-3.5-bin.zip 使用gradle创建项目 https://guides.gradle.org/creating-new-gradl
Published on: -
[spring-boot] 配置数据库
guide: https://spring.io/guides/gs/accessing-data-jpa/ https://spring.io/guides/gs/accessing-data-mysql/增加依赖 compile ‘org.springframework.boot:spring-boot-starter-data-jpa’ compile ‘mysql:mysql-con
Published on: -
[spring-boot] 使用redis
安装redis:$ wget http://download.redis.io/releases/redis-3.2.8.tar.gz $ tar xzf redis-3.2.8.tar.gz $ cd redis-3.2.8 $ make配置:$ vi redis.conf requirepass 123456 #配置密码 port 6231 #配置端口 daemonize yes #配置后台运
Published on: -
[spring-boot] thymeleaf 热交换
使用spring boot main方法启动时,修改了thymeleaf文件后,热交换不能起作用,每次修改都需要重新启动服务,非常不方便,google搜索到方法,特分享于此。 原文:https://github.com/spring-projects/spring-boot/issues/34 The default template resolver registered by spring
Published on: -
[spring-boot] 使用spring session
为了解决分布式HttpSesssion的问题,可以使用spring session, 在和spring boot 一起使用时,spring session的配置更简单了: Spring Session - Spring Boot1. 导入依赖 //session compile 'org.springframework.session:spring-session:1.3.1.REL
Published on: -
[spring-boot] 集成shiro
shiro介绍 shiro是一个权限管理框架,基于用户-角色-权限。一个用户可以有多个角色,一个角色有多个权限,每个权限指定了资源的访问。 shiro的原理是在所有请求之前设置一个filter,这个filter判断哪些资源需要权限,哪些不要,对于不需要权限的直接放行,对于需要权限的,使用securityManager和realm进行身份验证和授权,如果验证失败或者权限不足,都跳转到登录页面或者...
Published on: -
UPNP编程
零、SDK的安装 upnp的概念就不理会了,网上很多,这里偏向于具体编程。 SDK使用upnp1.6.17版本,这是一个linux下的开源版本,目前仍然在维护,下载地址: http://pupnp.sourceforge.net/ 安装SDK相对比较简单,参考阅读SDK目录下的README 我使用命令如下: tar jxvf libupnp-1.6.17.tar.bz2 cd lib
Published on: -
使用ffmpeg+SDL的简单播放器
使用ffmpeg+SDL的简单播放器,做了简单同步,还有许多问题,谨慎参考,直接上代码: #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" #include #include "SDL/SDL.h" #include "SDL_thre
Published on: -
使用estimator重写tensorflow入门程序
忍不住进入机器学习这个坑,决定从tensorflow教程入门。 看了tensorflow官方文档的入门篇:https://www.tensorflow.org/get_started/get_started,后文介绍了高级api estimator的使用,尝试了一下,结果不会用,查了些资料,用estimator把入门篇那个程序重写了一下,记录代码如下:import numpy as np impo
Published on: -
交叉编译ushare
ushare是网络上一个DMS的源代码,下面要交叉编译到目标平台上: 编译环境: 编译器:arm-hisiv200-linux-gcc 主机:ubuntu 10.4 源码包: ffmpeg-0.11.tar.bz2 libdlna-0.2.4.tar.bz2 libupnp-1.6.17.tar.bz2 ushare-1.1a.tar.bz2 依赖关系: ushare
Published on: