Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
send msg to mq when namespace published
- Loading branch information
Showing
6 changed files
with
326 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/MQService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.ctrip.framework.apollo.portal.spi; | ||
|
||
import com.ctrip.framework.apollo.core.enums.Env; | ||
import com.ctrip.framework.apollo.portal.entity.bo.ReleaseHistoryBO; | ||
|
||
public interface MQService { | ||
|
||
void sendPublishMsg(Env env, ReleaseHistoryBO releaseHistory); | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...al/src/main/java/com/ctrip/framework/apollo/portal/spi/configuration/MQConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.ctrip.framework.apollo.portal.spi.configuration; | ||
|
||
import com.ctrip.framework.apollo.portal.spi.ctrip.CtripMQService; | ||
import com.ctrip.framework.apollo.portal.spi.defaultimpl.DefaultMQService; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
|
||
@Configuration | ||
public class MQConfiguration { | ||
|
||
@Configuration | ||
@Profile("ctrip") | ||
public static class CtripMQConfiguration { | ||
|
||
@Bean | ||
public CtripMQService mqService() { | ||
return new CtripMQService(); | ||
} | ||
} | ||
|
||
/** | ||
* spring.profiles.active != ctrip | ||
*/ | ||
@Configuration | ||
@Profile({"!ctrip"}) | ||
public static class DefaultMQConfiguration { | ||
|
||
@Bean | ||
public DefaultMQService mqService() { | ||
return new DefaultMQService(); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.