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 + "]"...
* Where one project containing all the modules (huge code base), that is called Monolithic application. Problem: * Due to this, if we want to change any small piece of code, you need to do full round of testing. And we need to down the whole system. * To avoid this they introduced Microservice Architecture (Heterogenous)
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.
Comments
Post a Comment