dubbo Java parent通用配置,Eclipse项目处理中遇到的问题

edu-common-parent->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>wusc.edu.common</groupId>
   <artifactId>edu-common-parent</artifactId>
   <version>1.0-SNAPSHOT</version>
   <packaging>pom</packaging>

   <name>edu-common-parent</name>
   <url>http://maven.apache.org</url>

edu-demo中引用 edu-common-parent->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/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <parent>
      <groupId>wusc.edu.common</groupId>
      <artifactId>edu-common-parent</artifactId>
      <version>1.0-SNAPSHOT</version>
      <relativePath>../edu-common-parent</relativePath>
   </parent>

   <groupId>wusc.edu.demo</groupId>
   <artifactId>edu-demo</artifactId>
   <version>${edu-demo.version}</version>
   <packaging>war</packaging>

   <name>edu-demo</name>
   <url>http://maven.apache.org</url>








父pom.xml文件,部分修改如下,适应于新版本dubbo

 

<properties>
   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

   <edu-demo.version>1.0-SNAPSHOT</edu-demo.version>
   <edu-facade-user.version>1.0-SNAPSHOT</edu-facade-user.version>
   <edu-service-user.version>1.0-SNAPSHOT</edu-service-user.version>
   <edu-web-boss.version>1.0-SNAPSHOT</edu-web-boss.version>


   <org.springframework.version>3.2.4.RELEASE</org.springframework.version>
   <org.apache.struts.version>2.3.15.1</org.apache.struts.version>
      <source.level>1.8</source.level>
       <target.level>1.8</target.level>
       <dubbo.version>2.7.5</dubbo.version>
       <spring.version>4.3.16.RELEASE</spring.version>
       <junit.version>4.12</junit.version>
       <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
       <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
       <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
       <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
       <image.name>${project.artifactId}:${dubbo.version}</image.name>
       <java-image.name>openjdk:8</java-image.name>
       <dubbo.port>20880</dubbo.port>
</properties>
src->main->resources->spring-dubbo-provider.xml文件,由于阿里官网关闭,需要修改如下内容
xmlns:dubbo的内容必须与下列两处相同
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
http://dubbo.apache.org/schema/dubbo
http://dubbo.apache.org/schema/dubbo/dubbo.xsd

<?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:dubbo="http://dubbo.apache.org/schema/dubbo"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://dubbo.apache.org/schema/dubbo
            http://dubbo.apache.org/schema/dubbo/dubbo.xsd"> ,可以下载,Eclipse中加入也可以

   <!-- 提供方应用信息,用于计算依赖关系 -->
   <dubbo:application name="gw-service-user" />

   <!-- 使用zookeeper注册中心暴露服务地址 -->
   <dubbo:registry protocol="zookeeper" address="192.168.3.71:2181" />

   <!-- 用dubbo协议在20880端口暴露服务 -->
   <dubbo:protocol name="dubbo" port="20880" />

   <!-- 用户服务接口 -->
   <dubbo:service interface="wusc.edu.facade.user.service.PmsUserFacade" ref="pmsUserFacade" />

</beans>


出现mybatis-config.xml文件中出现
<!DOCTYPE configuration
    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
    "http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>



出现mybatis-config.xml文件中出现
mybatis 配置文件报错:"Referenced file contains errors(file:/D:/config/mybatis-3-config.dtd
<!DOCTYPE configuration
    PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
    "http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>


Eclipse Build Validating比较慢,去掉Validating
windows -> Preferences->输入valida ->Validation
Build->只保留(Classpath Dependency Validation)这一项,其它Build中全部去掉,
->Manual不要改动保持原样


语法检查,拼写错误
在此我去掉了语法检查,为了简单(网上有做字典的)
windows -> Preferences->Spelling->Enable spell checking(我把这个选项去掉)

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值