1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

import changes from master

reorganizing modules
This commit is contained in:
theonefx
2020-04-02 16:52:12 +08:00
parent 5acdce7f4d
commit c579109d2a
714 changed files with 11386 additions and 17320 deletions

View File

@@ -3,14 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-examples</artifactId>
<groupId>com.alibaba.cloud</groupId>
<version>2.0.1.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus-rocketmq-example</artifactId>
<name>Spring Cloud Bus RocketMQ Example</name>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.examples.rocketmq;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -31,7 +32,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* RocketMQ Bus Spring Application
* RocketMQ Bus Spring Application.
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
* @since 0.2.1
@@ -64,8 +65,7 @@ public class RocketMQBusApplication {
private ObjectMapper objectMapper;
/**
* Publish the {@link UserRemoteApplicationEvent}
*
* Publish the {@link UserRemoteApplicationEvent}.
* @param name the user name
* @param destination the destination
* @return If published
@@ -82,8 +82,7 @@ public class RocketMQBusApplication {
}
/**
* Listener on the {@link UserRemoteApplicationEvent}
*
* Listener on the {@link UserRemoteApplicationEvent}.
* @param event {@link UserRemoteApplicationEvent}
*/
@EventListener
@@ -98,4 +97,5 @@ public class RocketMQBusApplication {
System.out.printf("Server [port : %d] listeners on %s\n", localServerPort,
objectMapper.writeValueAsString(event));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.examples.rocketmq;
/**
* User Domain
* User Domain.
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
* @since 0.2.1
@@ -47,4 +48,5 @@ public class User {
public String toString() {
return "User{" + "id=" + id + ", name='" + name + '\'' + '}';
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.cloud.examples.rocketmq;
import org.springframework.cloud.bus.event.RemoteApplicationEvent;
/**
* {@link User} {@link RemoteApplicationEvent}
* {@link User} {@link RemoteApplicationEvent}.
*
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
* @since 0.2.1
@@ -43,4 +44,5 @@ public class UserRemoteApplicationEvent extends RemoteApplicationEvent {
public User getUser() {
return user;
}
}

View File

@@ -1,4 +1,4 @@
spring.application.name=spring-cloud-bus-rocketmq-example
spring.cloud.stream.rocketmq.binder.name-server=127.0.0.1:9876
server.port=8080
spring.cloud.bus.id=${spring.application.name}:${server.port}
spring.cloud.bus.id=${spring.application.name}:${server.port}