Define the enable function in BindingsPropertiesProcessor
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with the BindingsPropertiesProcessor interface and its process method, then find the existing implementations that check conditions inside process. Add the default enable(Environment) method from the issue and move those checks into it. Done when the interface has the default method and the implementations use it instead of their inline checks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Define the enable function in BindingsPropertiesProcessor like this:
/**
* An interface for types that transform the contents of a {@link Bindings} into properties for injection into a
* {@link org.springframework.core.env.PropertySource}.
*/
@FunctionalInterface
public interface BindingsPropertiesProcessor {
/**
* Transform the currently accumulated {@link Bindings}-related properties.
*
* @param environment the {@link Environment} that the processor is executing with.
* @param bindings the {@code Bindings} exposed to the application.
* @param properties the currently accumulated properties.
*/
void process(Environment environment, Bindings bindings, Map<String, Object> properties);
/**
* Whether it is enabled the processor.
* @param environment the {@link Environment} that the processor is executing with.
* @return if true the to execute process.
*/
default boolean enable(Environment environment) {
return true;
}
}
Processing the verification operations coupled in the process through the enable function is more reasonable in design, and the implementation of subclasses will also be more elegant.
- Lingua principale
- Java
- Stelle
- 50
- Fork
- 33
- Merge medio
- 6g 2h
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spring-cloud/spring-cloud-bindings
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
spring-cloud/spring-cloud-bindings#116 · 2 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
Tutte le issue di spring-cloud/spring-cloud-bindings
Issue simili
-
area:cpan-port area:performance bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#2230 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoApertaBug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno