This file contains 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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>no.citrus.example</groupId> | |
<artifactId>car</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>car</name> |
This file contains 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
<% if (modernized.isActive()) { %> | |
<jsp:include page="page_modernized.jsp" /> | |
<% } else { %> | |
<jsp:include page="page_legacy.jsp" /> | |
<% } %> | |
This file contains 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
<% if (featureX.isActive()) { %> | |
<jsp:include page="featureX.jsp" /> | |
<% } %> |
This file contains 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
@Configuration | |
public class ToggledBeans { | |
@Bean | |
public Repository bean() { | |
return featureX.isActive() ? new JDBCRepository() : new HibernateRepository(); | |
} | |
} |
This file contains 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
<h1> | |
Old | |
</h1> |
This file contains 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
<h1> | |
New | |
</h1> |
This file contains 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
public class ConcreteFormValidator extends FormValidator<FormDTO> { | |
private NumericStringValidator numericStringValidator; | |
public ConcreteFormValidator(NumericStringValidator numericStringValidator) { | |
this.numericStringValidator = numericStringValidator; | |
} | |
@Override | |
public List<Message> validate(FormDTO form) { | |
return collectMessages(this.numericStringValidator.validate(form.getA(), "first"), |
This file contains 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
public class MyApplication extends Application { | |
@Override | |
public Set<Object> getSingletons() { | |
HashSet<Object> objects = new HashSet<Object>(); | |
objects.add(new ProductResource(new ProductRepository())); | |
return objects; | |
} |