Skip to content
Snippets Groups Projects
Commit f9aff5ac authored by 李平's avatar 李平
Browse files

reslove conficts

parents d530be14 014d1bc6
No related branches found
No related tags found
No related merge requests found
Showing
with 177 additions and 7 deletions
.idea
.gradle
*.iml
dependency-reduced-pom.xml
out/
build/
target/
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>consul</groupId>
<artifactId>java-server</artifactId>
<version>1.0.0</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>2.7.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ecwid.consul</groupId>
<artifactId>consul-api</artifactId>
<version>1.4.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>dubbo.server.Main</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package dubbo;
public interface DubboService {
String SayHello(String message);
}
package dubbo.server.Impl;
import dubbo.DubboService;
public class DubboServiceImpl implements DubboService {
@Override
public String SayHello(String message) {
return "hello " + message;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dubbo.server;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.ProtocolConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.ServiceConfig;
import dubbo.DubboService;
import dubbo.server.Impl.DubboServiceImpl;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
ApplicationConfig applicationConfig = new ApplicationConfig();
applicationConfig.setName("java-server");
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("consul://127.0.0.1:8500");
ProtocolConfig protocolConfig = new ProtocolConfig();
protocolConfig.setName("dubbo");
protocolConfig.setHost("127.0.0.1");
protocolConfig.setPort(12345);
ServiceConfig<DubboService> serviceConfig = new ServiceConfig<>();
serviceConfig.setApplication(applicationConfig);
serviceConfig.setRegistry(registryConfig);
serviceConfig.setProtocol(protocolConfig);
serviceConfig.setInterface(DubboService.class);
serviceConfig.setRef(new DubboServiceImpl());
serviceConfig.export();
System.in.read();
}
}
log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.Stdout.layout.conversionPattern=[%p] %c | %m\n
log4j.rootLogger=INFO,Stdout
\ No newline at end of file
......@@ -11,6 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.ikurento.user;
import java.util.List;
......
......@@ -12,6 +12,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
......
......@@ -12,6 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......
......@@ -13,7 +13,6 @@
limitations under the License.
-->
<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">
......
......@@ -17,7 +17,6 @@
package com.ikurento.user;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
......
......@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
APP_NAME="APPLICATION_NAME"
APP_ARGS=""
SLEEP_INTERVAL=5
......
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
......
......@@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
rm -rf target/
PROJECT_HOME=`pwd`
......
......@@ -16,7 +16,6 @@
# limitations under the License.
set -e
export GOOS=linux
......
......@@ -16,7 +16,6 @@
# limitations under the License.
set -e
export GOOS=darwin
......
......@@ -16,6 +16,7 @@
# limitations under the License.
set -e
export GOOS=darwin
......
......@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# jdb -classpath /Users/alex/tmp/us/conf:/Users/alex/tmp/us/lib/*:/Users/alex/test/java/dubbo/2.5.4/dubbo-remoting/dubbo-remoting-api/src/main/java/ com.alibaba.dubbo.container.Main
jdb -classpath /Users/alex/tmp/us/conf:/Users/alex/tmp/us/lib/* -sourcepath /Users/alex/test/java/dubbo/2.5.4/dubbo-remoting/dubbo-remoting-api/src/main/java/:/Users/alex/tmp/java-server/src/main/java com.alibaba.dubbo.container.Main
# jdb stop at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec:76
......
......@@ -12,6 +12,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
......
......@@ -15,7 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
APP_NAME="APPLICATION_NAME"
APP_ARGS=""
SLEEP_INTERVAL=5
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment