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
| <setHeader headerName="JMSExpiration"> | |
| <javaScript>java.lang.System.currentTimeMillis() + 5000</javaScript> | |
| </setHeader> |
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
| import org.apache.camel.Expression; | |
| import org.apache.camel.model.ExpressionNode; | |
| import org.apache.camel.model.ProcessorDefinitionHelper; | |
| import org.apache.camel.model.RouteDefinition; | |
| import org.apache.camel.model.language.ExpressionDefinition; | |
| import org.apache.camel.spi.NamespaceAware; | |
| class CamelService { | |
| public void addNamespace(RouteDefinition route, String prefix, String url) { |
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
| import java.lang.annotation.ElementType; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| import java.lang.annotation.Target; | |
| @Retention(RetentionPolicy.RUNTIME) | |
| @Target({ElementType.FIELD}) | |
| public @interface Backup { | |
| } |
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
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.stereotype.Service; | |
| @Service | |
| class SimpleService { | |
| @Value("${MY_VARIABLE_IN_SIMPLE_SERVICE}") | |
| private String simpleValue; | |
| public String getSimpleValue() { |
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
| package my.company.package; | |
| import org.apache.camel.spring.handler.CamelNamespaceHandler; | |
| public class CustomNamespaceHandler extends CamelNamespaceHandler { | |
| public FactorNamespaceHandler() { | |
| super(); | |
| this.endpointParser = new CustomNamespaceHandler.CustomEndpointDefinitionParser(); | |
| } |
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
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.core.Ordered; | |
| import org.springframework.security.config.annotation.web.builders.WebSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
| import org.springframework.security.web.firewall.DefaultHttpFirewall; | |
| import org.springframework.security.web.firewall.HttpFirewall; | |
| import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; |
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
| import com.google.common.collect.Lists; | |
| import java.util.ArrayList; | |
| class Bartlet { | |
| public static void main(String[] args) { | |
| ArrayList<Test> tests = Lists.newArrayList( | |
| new Test(4, 128.4, 22.3), | |
| new Test(4, 63.8, 15.2), | |
| new Test(5, 21.5, 7.5), |