Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
289 additions
and
74 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
8 changes: 0 additions & 8 deletions
8
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/MessageListener.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/message/ReleaseMessageListener.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.biz.message; | ||
|
||
import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; | ||
|
||
/** | ||
* @author Jason Song(song_s@ctrip.com) | ||
*/ | ||
public interface ReleaseMessageListener { | ||
void handleMessage(ReleaseMessage message, String channel); | ||
} |
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
22 changes: 22 additions & 0 deletions
22
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/ReleaseMessageService.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,22 @@ | ||
package com.ctrip.framework.apollo.biz.service; | ||
|
||
import com.ctrip.framework.apollo.biz.entity.ReleaseMessage; | ||
import com.ctrip.framework.apollo.biz.repository.ReleaseMessageRepository; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* @author Jason Song(song_s@ctrip.com) | ||
*/ | ||
@Service | ||
public class ReleaseMessageService { | ||
@Autowired | ||
private ReleaseMessageRepository releaseMessageRepository; | ||
|
||
public ReleaseMessage findLatestReleaseMessageForMessages(Collection<String> messages) { | ||
return releaseMessageRepository.findTopByMessageInOrderByIdDesc(messages); | ||
} | ||
} |
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
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
Oops, something went wrong.