operators – Difference between & and && in Java?

  let’s suppose that the startDate is null   if(element.getStartDate()!=null & element.getStartDate().length()>0){ //Treatment1 is not executed a nullPointerException is fired } & ,tests both left and right operand even if the left is false in this example if we use the &&  » wich controle the right and the left operand » we can get a … Lire la suite operators – Difference between & and && in Java?

Évaluez ceci :

Ignore json property when deserializing with jackson and @JsonIgnore

Suppose we have this variable @JsonProperty(« prop1 ») private String prop1; and it’s getter an setter   @JsonProperty(« prop1 ») public String getProp1() { return role; } @JsonProperty(« prop1 ») public void setProp1(String prop1) { this.prop1= prop1; } here we serialize and deserialisze our prop1 cleaner from the classe that embedd it How to say don’t deserializ/get ( from pojo to … Lire la suite Ignore json property when deserializing with jackson and @JsonIgnore

Évaluez ceci :

Start a new project with bitbucket or gitlab and push it to a repository

Votre dépôt est vide Pour commencer, vous devez exécuter ces commandes dans votre terminal. Nouveau sur Git ? Apprendre les commandes de base de Git Configure Git pour la première fois git config –global user.name « Bilel Khaled » git config –global user.email « Bilel.KHALED.ext@eulerhermes.com » En train de travailler avec ton dépôt Je veux juste cloner ce dépôt Si … Lire la suite Start a new project with bitbucket or gitlab and push it to a repository

Évaluez ceci :

Create IAM policy and attach it to a role

[code language="javascript"] { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow",   //nom de l'action allow or deny "Action": [ "ssm:DescribeParameters" // nomRessource(service ici ):functionDeLaRessource ], "Resource": "*" // specifier la ressource du service (nom de host ou password Db example)}, [/code]   Cette stratégie dit allow tout appel à la methode DescribeParameter (sur n’importe quel ressource … Lire la suite Create IAM policy and attach it to a role

Évaluez ceci :

How to use Jersey client to make restfull api’s calls

    This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters Search HOME RESUME PYTHON SAAS GIT OTHER POEMS LOG IN JERSEY CLIENT … Lire la suite How to use Jersey client to make restfull api’s calls

Évaluez ceci :

GET PROPERTIES FILE KEY/VALUES in java

The properties file needs to reside anywhere on the classpath (use src/main/java) 1) create this class and pass the name of your properties file   This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden … Lire la suite GET PROPERTIES FILE KEY/VALUES in java

Évaluez ceci :

Git does not show remote branches after fresh creation?

After creation of a new branch in bitbucket Github Gitlab … when we make git branch -r to display   new branches we don’t see them we have to make git fetch   that git client update the config file with the new branches linkes   git branch -r  will diplay the ew branches with the masters … Lire la suite Git does not show remote branches after fresh creation?

Évaluez ceci :

HQL vs criteria API vs pure criteria API

You have three options: 1) If you are not pinned to Critera api, I recommend to use HQL instead of Criteria API Date d = new SimpleDateFormat(« yyyy-MM-dd »).parse(« 2014-10-12 »); Query query = session.createQuery(« select count(*) from Visit v where trunc(v.date)=:date and v.visitor.id=:visitorId »); query.setParameter(« date », d); query.setParameter(« visitorId », 1L); Long count = (Long) query.uniqueResult(); 2) If you want to use Criteria … Lire la suite HQL vs criteria API vs pure criteria API

Évaluez ceci :

Overrid the http status codes returned by Amazon API Gateway in a POST method ?

We have  to create an integration response that maps the default response to 201 method response. Follow these steps to fix that: 1. Create a method response with status code 201. Delete the method response with status code 200 if that is not required. 2. Delete the default integration response (that maps default HTTP status to 200 … Lire la suite Overrid the http status codes returned by Amazon API Gateway in a POST method ?

Évaluez ceci :