配置文件的路径: /etc/redis/redis.conf
redis服务路径: /etc/init.d/redis-server
默认是开机启动
出现的问题:
1 | [platform] ERROR 2017-02-22 17:46:05,756 [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.context.ContextLoader.() | Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pmTranLimitLiteServiceImpl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.msds.zkutil.ZkLockFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@Javax.annotation.Resource(mappedName=, shareable=true, description=, name=, type=class Java.lang.Object, authenticationType=CONTAINER, lookup=)} |
最重要的是这句
1 | org.springframework.beans.factory.BeanCreationException: |
出现的原因:
缺少相关的jar包或者依赖
建议不要自己配置idea的module和artificts
直接在pom.xml文件添加
1 | <artifactId>hisen-project</artifactId><!--加在这句话后面--> |
其他原因
开始不知道什么问题,后来搜索这个服务。
发现这跟dubbo有关,于是百度搜索进了官网
没想到常见问题里面就有说这个事情
1 | 13. 出现org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxService': Initialization of bean failed; nested exception is Java.lang.IllegalArgumentException: Method must not be null怎么办? |
更多dubbo问题:点击查看
Java.Lang.OutOfMemoryError: PermGen Space
Tomcat只分配了非常小的PermGen内存,这里重新设置一下
直接在配置tomcat的时候,在VM options填入:
1 | -XX:PermSize=97m -XX:MaxPermSize=256m |
windows系统
1 | cd %userprofile%\.m2\repository |
或者新建一个bat文件,批处理。就不用每次都在cmd敲命令了
1 | @echo off |
linux系统
1 | find /app/maven/localRepository -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \; |
这几天折腾ubuntu然后安装了下mongodb
通过Oracle VM VirtualBox端口转发,连接了虚拟机的MongoDB
1.用idea创建一个maven项目
2.在pom.xml中添加mongodb Java驱动
1 | <dependency> |
3.参考官方:MongoDB Driver Quick Tour
本用例github地址:mongodbTest
贴下代码:
1.制作启动脚本
新建一个start.bat文件,内容如下
1 | @echo off |
2.设置开机启动
把start.bat文件复制到[启动]文件夹里面
[启动]文件夹路径
1 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp |
文件管理器地址栏显示大概是这样
1 | Windows > [开始]菜单 > 程序 > 启动 |
放进去之后就可以开机启动了!
启动之后Xshell连接即可
1 > 添加 MongoDB 公共GPG钥匙
1 | sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 |
2 > 创建列表文件
这里把官网repo.mongodb.org
换成了mirrors.aliyun.com
1 | echo "deb http://mirrors.aliyun.com/mongodb/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list |
这几天在折腾Ubuntu虚拟机,想着也就让他做一台服务器罢了
没想到安装之后发现一直没法让VirtualBox隐藏到托盘
按正常程序走,打开一个虚拟机会出现两个GUI界面:
第一个可以在打开虚拟机之后关闭,第二个不能关闭也不能隐藏到托盘
痛苦!!!
1 | C:\tool\Oracle\VirtualBox> |
1 | C:\tool\Oracle\VirtualBox>VBoxManage list vms |