Define the enable function in BindingsPropertiesProcessor
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 55/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 50
- Forks
- 33
- Merge moyen
- 6 j 2 h
- PR mergées (30 j)
- 2
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de spring-cloud/spring-cloud-bindings
-
Difficulté 3/5 Une demi-journée Accessibilité débutants 45/100
spring-cloud/spring-cloud-bindings#116 · 2 commentaires · 1 réaction ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
-
SCS Configuration Help NeededOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
-
Make bindings enabled by defaultOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
Toutes les issues de spring-cloud/spring-cloud-bindings
Issues similaires
-
area:cpan-port area:performance bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#2230 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoOuverteBug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour