zoukankan      html  css  js  c++  java
  • jar 包和 mysql 服务器部署

    (1)创建好本地服务器:

      navicat新建链接:

      链接名:自定义,这里命名为test

      配置同jar包

    (2)给予登陆权限,loclhost_3306,右击选择“命令行界面”,输入如下:

      create user 'yonghu'@'%' identified by 'mima';

      GRANT ALL ON mydb1.* TO 'yonghu'@'%';

    (3)此时双击test,便可以连接了。

    (4)配置好jar包中的 .properties文件,配置如下:

      spring.datasource.driver-class-name=com.mysql.jdbc.Driver
      spring.datasource.url=jdbc:mysql://192.168.3.215:3306/mydb
      spring.datasource.username=java
      spring.datasource.password=javatest123

    (5)cmd命令行:

      java -jar edifact-api-1.1.jar

      注意切换到路径下,可以直接拖动jar包到cmd窗口中。

    (6)接口地址:http://192.168.3.215:8080/edif-api

      http://192.168.3.215:8080/edif-api?year=95b&trmd=codeco&trsd=ftx

      注意用google浏览器

    如果出现端口被占用:会提示:

    Description:

    The Tomcat connector configured to listen on port 8080 failed to start. The port
    may already be in use or the connector may be misconfigured.

    Action:

    Verify the connector's configuration, identify and stop any process that's liste
    ning on port 8080, or configure this application to listen on another port.


    方法1:

    在dos下,输入 netstat -ano|findstr 8080
    在任务管理器中杀死
    可以查看哪个进程占用了8080和8009端口,找到占用端口软件的PID,然后在任务管理器找到对应PID的软件,关闭结束该进程即可。如果任
    务管理器中没有显示PID列,需要设置,查看---》选择列---》勾选“PID(进程标识符)”。
    方法2:

    修改tomcat默认端口号。
    修改Tomcat的配置文件。
    例如:C:/tomcat5.5.25/conf/server.xml
    <Connector port="8080" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
    enableLookups="false" redirectPort="8443" acceptCount="100"
    connectionTimeout="20000" disableUploadTimeout="true" />
    Connector 节点,将port="8080"中的端口改为一个没有被占用的端口。

  • 相关阅读:
    .NET Interop 工具集
    关于正弦波的算法
    Windows Phone 系列 本地数据存储
    Xaml cannot create an instance of “X”
    Windows Phone 系列 使用 MVVM绑定时无法获取当前值
    Windows Phone 系列 应用程序图标无法显示
    Windows Phone 系列 WPConnect无法上网的问题
    Windows Phone 系列 使用 Windows Phone 保存铃声任务
    WP7.5提交应用
    Windows Phone 系列 动态删除ObservableCollection
  • 原文地址:https://www.cnblogs.com/smuxiaolei/p/7373708.html
Copyright © 2011-2022 走看看