Dave Syer 5e3cc95ccf Adjust security.basic.enabled=false behaviour
Actually the web-secure sample is misusing
security.basic.enabled=false (IMO) - it should be a flag
to say that you want to temporarily disable the basic security
fallback on application endpoins, not  way to disable all
security autoconfiguration.

Added test case to web-secure sample to ensure a user
can log in.

Fixes gh-979
2014-05-29 13:25:01 +01:00

48 lines
662 B
Groovy

package org.test
import java.util.concurrent.CountDownLatch
@EnableReactor
@Log
class Runner implements CommandLineRunner {
@Autowired
Reactor reactor
private CountDownLatch latch = new CountDownLatch(1)
@PostConstruct
void init() {
log.info "Registering consumer"
}
void run(String... args) {
reactor.notify("hello", Event.wrap("Phil"))
log.info "Notified Phil"
latch.await()
}
@Bean
CountDownLatch latch() {
latch
}
}
@Consumer
@Log
class Greeter {
@Autowired
Reactor reactor
@Autowired
private CountDownLatch latch
@Selector(value="hello")
void receive(String data) {
log.info "Hello ${data}"
latch.countDown()
}
}