File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
shenyu-admin/src/main/java/org/apache/shenyu/admin Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,6 @@ static class HttpLongPollingListener {
91
91
public HttpLongPollingDataChangedListener httpLongPollingDataChangedListener (final HttpSyncProperties httpSyncProperties ) {
92
92
return new HttpLongPollingDataChangedListener (httpSyncProperties );
93
93
}
94
-
95
- @ Bean
96
- @ ConditionalOnMissingBean (ConfigController .class )
97
- public ConfigController configController (final HttpLongPollingDataChangedListener httpLongPollingDataChangedListener ) {
98
- return new ConfigController (httpLongPollingDataChangedListener );
99
- }
100
94
}
101
95
102
96
/**
Original file line number Diff line number Diff line change 23
23
import org .apache .shenyu .admin .utils .ShenyuResultMessage ;
24
24
import org .apache .shenyu .common .dto .ConfigData ;
25
25
import org .apache .shenyu .common .enums .ConfigGroupEnum ;
26
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
27
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
26
28
import org .springframework .web .bind .annotation .ResponseBody ;
27
29
import org .springframework .web .bind .annotation .RequestMapping ;
28
30
import org .springframework .web .bind .annotation .GetMapping ;
31
33
import jakarta .servlet .http .HttpServletRequest ;
32
34
import jakarta .servlet .http .HttpServletResponse ;
33
35
import jakarta .validation .constraints .NotNull ;
36
+ import org .springframework .web .bind .annotation .RestController ;
37
+
34
38
import java .util .Map ;
35
39
36
40
/**
37
41
* This Controller only when HttpLongPollingDataChangedListener exist, will take effect.
38
42
*/
39
- @ ResponseBody
43
+ @ RestController
40
44
@ RequestMapping ("/configs" )
45
+ @ ConditionalOnBean (HttpLongPollingDataChangedListener .class )
41
46
public class ConfigController {
42
47
43
48
private final HttpLongPollingDataChangedListener longPollingListener ;
You can’t perform that action at this time.
0 commit comments