How to set Java Object into JaxBElement ? * In JaxBElement we are having setValue(T t) method. this will help us to solve this problem. * java.xml.bind.JAXBElement.setValue() Eg. Lets Use College Class as Bean. MainJaxBElement class as main class to process the College Class. package com.javavirus.jaxbelement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class College{ private int id; private String name; public College(int id, String name) { super(); this.id = id; this.name = name; } public int getId() { return id; } @XmlAttribute public void setId(int id) { this.id = id; } public String getName() { return name; } @XmlElement public void setName(String name) { this.name = name; } @Override public String toString() { return "College [id=" + id + ", name=" + name + "]"...
Two Argument(Bi) Functional Interfaces - BiPredicate, BiFunction and BiConsumer * Predicate, Function and Consumer can access only one input values. * BiPredicate can access two input values. * BiFunction can access two input values. * BiConsumer can access two input values.
Pipeline: * Group of jobs executed in Stages. * All of the jobs executed in parallel in stage. * if all jobs succeed, pipeline move to next stage. * if any one job failed, next stage is not executed. Types of Pipeline: * CI Pipeline build and test stages defined (.gitlab-ci.yml) * Deploy Pipeline: define in .gitlab-ci.yml. Flow of deploying code to server thru various stages. * Project Pipeline: Specially for microservices. Cross project CI depencies, triggered via API. GitLab Architecture: * GitLab Server and atleast one GitLab Runner. * Runner is the one will start the job. * Project Setting -CICD - * GitLab Runner is automatically provided by GitLab Server. * We can also configured our own runners. Why GITLab CI: * Simple Architecture * Docker first approach. * Pipeline as code. * Merge request with CI support. Eg. Build file location: /builds/kumarvinothjoseph/spring-boot-integration-watch-directory/target/spring-integration-moni...
Comments
Post a Comment