当前位置: 首页 > news >正文

买个域名自己做网站吗/如何免费做视频二维码永久

买个域名自己做网站吗,如何免费做视频二维码永久,wordpress允许ping,一个公司网站后台怎么做xl_echo编辑整理,欢迎转载,转载请声明文章来源。更多IT、编程案例、资料请联系QQ:1280023003 百战不败,依不自称常胜,百败不颓,依能奋力前行。——这才是真正的堪称强大!! 开发步骤…

xl_echo编辑整理,欢迎转载,转载请声明文章来源。更多IT、编程案例、资料请联系QQ:1280023003
百战不败,依不自称常胜,百败不颓,依能奋力前行。——这才是真正的堪称强大!!


开发步骤
完成服务提供方的编写,完成服务消费方的编写

  • 第一步:创建服务提供方的工程
    这里写图片描述

  • 第二步:配置pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.echo.dubboxservice</groupId><artifactId>dubbox-service</artifactId><version>0.0.1-SNAPSHOT</version><packaging>war</packaging><name>dubbox-service</name><properties>     <spring.version>4.2.4.RELEASE</spring.version></properties><dependencies><!-- Spring --><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-beans</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-aspects</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-jms</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId><version>${spring.version}</version></dependency>   <!-- dubbo相关 --><dependency><groupId>com.alibaba</groupId><artifactId>dubbo</artifactId><version>2.8.4</version>            </dependency><dependency><groupId>org.apache.zookeeper</groupId><artifactId>zookeeper</artifactId><version>3.4.6</version></dependency><dependency><groupId>com.github.sgroschupf</groupId><artifactId>zkclient</artifactId><version>0.1</version></dependency><dependency><groupId>javassist</groupId><artifactId>javassist</artifactId><version>3.11.0.GA</version></dependency></dependencies><build>  <plugins><plugin>  <groupId>org.apache.maven.plugins</groupId>  <artifactId>maven-compiler-plugin</artifactId>  <version>2.3.2</version>  <configuration>  <source>1.8</source>  <target>1.8</target>  </configuration>  </plugin><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.2</version><configuration><port>10080</port></configuration></plugin></plugins>  </build>
</project>
  • 第三步:配置web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"><display-name>springmvc</display-name><welcome-file-list><welcome-file>index.html</welcome-file><welcome-file>index.htm</welcome-file><welcome-file>index.jsp</welcome-file><welcome-file>default.html</welcome-file><welcome-file>default.htm</welcome-file><welcome-file>default.jsp</welcome-file></welcome-file-list><!-- 加载spring容器 --><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext*.xml</param-value></context-param><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener></web-app>
  • 第四步:配置applicationContext-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsdhttp://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"><dubbo:application name="dubbox-service"/><dubbo:registry address="zookeeper://192.168.25.129:2181"/><dubbo:annotation package="com.echo.service.impl" /></beans>
  • 第五步:编写接口
package com.echo.service;
public interface UserService {public String getName();
}
  • 第六步:编写实现
package com.echo.service.impl;import com.alibaba.dubbo.config.annotation.Service;
import com.echo.service.UserService;
@Service
public class UserServiceImpl implements UserService{@Overridepublic String getName() {return "echo";}}

注意:要在开发工具上配置一个离线约束http://code.alibabatech.com/schema/dubbo/dubbo.xsd

  • 第七步:编写服务消费方,创建工程
    这里写图片描述

  • 第八步:配置web.xml,注意:两个工程的pom文件都一样,只是服务端口不能相同

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"version="2.5">  <!-- 解决post乱码 --><filter><filter-name>CharacterEncodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>utf-8</param-value></init-param><init-param>  <param-name>forceEncoding</param-name>  <param-value>true</param-value>  </init-param>  </filter><filter-mapping><filter-name>CharacterEncodingFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>   <servlet><servlet-name>springmvc</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><!-- 指定加载的配置文件 ,通过参数contextConfigLocation加载--><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:springmvc.xml</param-value></init-param></servlet><servlet-mapping><servlet-name>springmvc</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping>
</web-app>
  • 第九步:编写控制类
package com.echo.controller;import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import com.alibaba.dubbo.config.annotation.Reference;
import com.echo.service.UserService;@Controller
@RequestMapping("/user")
public class UserController {@Reference//代表远程引用private UserService userServie;@RequestMapping("/showName")@ResponseBodypublic String showName(){return userServie.getName();}
}
  • 第十步:将服务提供方复制到服务消费方
    这里写图片描述

  • 第十一步:保证zookeeper是启动的

  • 第十二步:在maven仓库配置dubbox的支持jar包,注意:要首先保证系统环境变量已经配置了maven
    首先将dubbo-2.8.4放在D盘根目录下,然后执行这条命令:mvn install:install-file -Dfile=d:\dubbo-2.8.4.jar -DgroupId=com.alibaba -DartifactId=dubbo -Dversion=2.8.4 -Dpackaging=jar

  • 第三步:先启动服务提供方,再启动服务消费方,访问服务消费方,看是否是服务提供方返回的信息,如果是demo运行成功(访问路径:http://localhost:10081/user/showName.do)

源码地址:链接:https://pan.baidu.com/s/1t0kGDoFLCll5m8C51YSyvQ 密码:s7bn


做一个有底线的博客主

http://www.jmfq.cn/news/5206159.html

相关文章:

  • 代理登录网站/爱站关键词挖掘查询工具
  • 企业seo顾问公司/深圳关键词优化公司哪家好
  • 武汉汉口做网站公司/网络营销培训机构
  • 做会员卡的网站在线制作/seo搜索引擎专员
  • 网站建设项目的工作分解/网络营销的工具和方法
  • 硬盘做网站空间/网站推广优化教程
  • 在线网站开发/博客推广的方法与技巧
  • 深圳市手机网站建设/北京seo排名优化网站
  • 北京网站建设求职简历/大一网页设计作业成品
  • 西安网站开发建/谷歌推广平台
  • wordpress十大表格插件/衡阳seo快速排名
  • 南山商城网站建设/长尾关键词爱站网
  • 英文网站的首页怎么做/学校教育培训机构
  • 网站首页怎么用dw做/观看b站的广告网站平台
  • wordpress 手机管理员密码/关键词优化seo
  • 高明专业网站建设哪家好/百度搜索优化建议
  • 外贸营销网站建设公司排名/班级优化大师简介
  • 做公司网站需要准备什么/代运营公司是怎么运营的
  • 住房和城乡建设部网站施工员证/seo查询平台
  • 什么软件可以在手机上做装修设计/天津网站seo设计
  • 色一把做最好的看片网站/双滦区seo整站排名
  • 网站多语言建设/网站域名解析ip查询
  • 定制型网站一般价格/宁波做seo推广企业
  • 体彩网站开发/百度推广营销
  • asp.net做网站教程/seo软件全套
  • 免费ppt资源网站/seo托管服务
  • 杭州微网站建设/网站推广关键词排名优化
  • vps做网站用什么系统/天津百度推广公司地址
  • 静态网站模板源码下载/重庆关键词优化平台
  • 网站建设得缺点/成都短视频代运营