-
在github上下载cat源码,然后解压,github地址:https://github.com/dianping/cat/wiki/readme_server
-
以文件夹的方式将解压后的源码导入eclipse
-
根据ide的类型,在解压后的cat目录中执行 mvn eclipse:eclipse 或者 mvn idea:idea
-
新建D:\data\appdatas\cat目录,往里添加如下文件,client.xml,datasources.xml,server.xml,其余文件会自动生成。
client.xml
<?xml version="1.0" encoding="utf-8"?> <config mode="client" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="config.xsd"> <servers> <!-- Local mode for development --> <server ip="localhost" port="2280" http-port="8080" /> <!-- If under production environment, put actual server address as list. --> <!-- <server ip="192.168.7.71" port="2280" /> <server ip="192.168.7.72" port="2280" /> --> </servers> </config>
datasource.xml
<?xml version="1.0" encoding="utf-8"?> <data-sources> <data-source id="cat"> <maximum-pool-size>3</maximum-pool-size> <connection-timeout>1s</connection-timeout> <idle-timeout>10m</idle-timeout> <statement-cache-size>1000</statement-cache-size> <properties> <driver>com.mysql.jdbc.Driver
windows环境下启动单机cat服务端及测试客户端(2019-07)
最新推荐文章于 2024-05-02 13:55:05 发布