接口管理工具用了RAP,又是巴巴队伍的东西,开源的,需要进行二次开发方可被使用。
前几个月的时候鼓捣了一阵子,下来一片红,然后就没管它了。最近又捡起。直接git导入项目即可。
安装git插件,网上很多,我也是找网上的
教程参考:http://www.cnblogs.com/lenve/p/4889317.html 感谢作者的付出与分享
import-git
在github中找到此项目页面
上面URL在eclipse中填写
点击下一步,finish
导下来后,整体目录是这个样子的
配置数据库及redis:
如果redis没安装,启动tomcat会报错:
严重: Exception sending context initialized event to listener instance of class com.taobao.rigel.rap.common.listener.RapServletContextListenerredis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool at redis.clients.util.Pool.getResource(Pool.java:50) at redis.clients.jedis.JedisPool.getResource(JedisPool.java:86) at com.taobao.rigel.rap.common.utils.CacheUtils.getJedis(CacheUtils.java:42) at com.taobao.rigel.rap.common.utils.CacheUtils.init(CacheUtils.java:122) at com.taobao.rigel.rap.common.listener.RapServletContextListener.contextInitialized(RapServletContextListener.java:22) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5099) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5615) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out at redis.clients.jedis.Connection.connect(Connection.java:155) at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:83) at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1643) at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:85) at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435) at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363) at redis.clients.util.Pool.getResource(Pool.java:48) ... 13 moreCaused by: java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at redis.clients.jedis.Connection.connect(Connection.java:149) ... 20 more
是因为,redis服务连接不上,查看config.properties文件中的配置,服务器地址要写对
jdbc.driverClassName=com.mysql.jdbc.Driverjdbc.url=jdbc\:mysql\://localhost\:3306/rap_db?useUnicode\=true&characterEncoding\=utf8&zeroDateTimeBehavior\=convertToNull&noAccessToProcedureBodies\=truejdbc.username=rootjdbc.password=rootredis.host=192.168.74.230redis.port=6379redis.timeout=2000redis.password=redis.database=0
这里延伸redis的安装,我这台230机器是linux上安装的,具体教程可参考:http://www.cnblogs.com/wangchunniu1314/p/6339416.html后台启动服务部分,感谢作者的付出和分享
这里没有jsp和html页面,全部使用的是velocity模板来管理view界面
延伸知识点:eclipse安装velocity,语法高亮.vm文件
http://blog.csdn.net/10km/article/details/52329820 eclipse篇,感谢作者的付出和分享