BAEL-1749 Spring @Order
* A new rest controller has been added to demonstrate the real-time event streaming using Spring WebFlux * delete * Delete WebfluxController.java * BAEL-658 (#4150) * Review changes * BAEL-1749 Test name change
This commit is contained in:
committed by
Predrag Maric
parent
0b8f6175fe
commit
29d9b56434
@@ -0,0 +1,15 @@
|
||||
package org.baeldung.order;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Order(Ordered.LOWEST_PRECEDENCE)
|
||||
public class Average implements Rating {
|
||||
|
||||
@Override
|
||||
public int getRating() {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.baeldung.order;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
||||
@Component
|
||||
@Order(1)
|
||||
public class Excellent implements Rating {
|
||||
|
||||
@Override
|
||||
public int getRating() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.baeldung.order;
|
||||
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Order(2)
|
||||
public class Good implements Rating {
|
||||
|
||||
@Override
|
||||
public int getRating() {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package org.baeldung.order;
|
||||
|
||||
public interface Rating {
|
||||
|
||||
int getRating();
|
||||
}
|
||||
Reference in New Issue
Block a user