| 1 | |
package com.ctrip.framework.apollo.configservice; |
| 2 | |
|
| 3 | |
import com.ctrip.framework.apollo.biz.message.ReleaseMessageScanner; |
| 4 | |
import com.ctrip.framework.apollo.configservice.controller.NotificationController; |
| 5 | |
|
| 6 | |
import org.springframework.beans.factory.annotation.Autowired; |
| 7 | |
import org.springframework.context.annotation.Bean; |
| 8 | |
import org.springframework.context.annotation.Configuration; |
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
@Configuration |
| 14 | 1 | public class ConfigServiceAutoConfiguration { |
| 15 | |
@Autowired |
| 16 | |
private NotificationController notificationController; |
| 17 | |
|
| 18 | |
@Bean |
| 19 | |
public ReleaseMessageScanner releaseMessageScanner() { |
| 20 | 1 | ReleaseMessageScanner releaseMessageScanner = new ReleaseMessageScanner(); |
| 21 | 1 | releaseMessageScanner.addMessageListener(notificationController); |
| 22 | 1 | return releaseMessageScanner; |
| 23 | |
} |
| 24 | |
|
| 25 | |
} |