Initial State
start point
This commit is contained in:
committed by
Gunnar Hillert
parent
e90ea836d7
commit
dbd1be3579
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:int="http://www.springframework.org/schema/integration"
|
||||
xmlns:int-twitter="http://www.springframework.org/schema/integration/twitter"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:int-jmx="http://www.springframework.org/schema/integration/jmx"
|
||||
xmlns:int-groovy="http://www.springframework.org/schema/integration/groovy"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/integration/jmx http://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd
|
||||
http://www.springframework.org/schema/integration/groovy http://www.springframework.org/schema/integration/groovy/spring-integration-groovy-2.1.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration/twitter http://www.springframework.org/schema/integration/twitter/spring-integration-twitter.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:component-scan base-package="org.springframework.integration.service" />
|
||||
|
||||
<int-twitter:search-inbound-channel-adapter id="twitter" query="#springintegration"
|
||||
channel="twitterChannel" auto-startup="true">
|
||||
<int:poller fixed-rate="30000" max-messages-per-poll="10" />
|
||||
</int-twitter:search-inbound-channel-adapter>
|
||||
|
||||
<int:service-activator id="twitterServiceActivator" input-channel="twitterChannel"
|
||||
ref="twitterService" method="addTwitterMessages" />
|
||||
|
||||
<bean id="twitterService" class="_org.springframework.integration.service.impl.DefaultTwitterService"/>
|
||||
|
||||
<int:channel id="twitterChannel">
|
||||
<int:interceptors>
|
||||
<int:wire-tap channel="logger" />
|
||||
</int:interceptors>
|
||||
</int:channel>
|
||||
|
||||
<int:publish-subscribe-channel id="logger" />
|
||||
|
||||
<int:logging-channel-adapter id="loggingAdapter" channel="logger" level="INFO"
|
||||
expression="'Id:' + payload.id + '; Date:' + payload.createdAt + '; FromUser: ' + payload.fromUser" />
|
||||
|
||||
<int:bridge input-channel="logger" output-channel="queue"/>
|
||||
|
||||
<int:channel id="queue">
|
||||
<int:queue/>
|
||||
</int:channel>
|
||||
|
||||
<int:channel id="controlBusChannel"/>
|
||||
|
||||
<int:control-bus id="controlBus" input-channel="controlBusChannel"/>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<!-- Scans within the base package of the application for @Components to configure as beans -->
|
||||
<context:component-scan base-package="org.springframework.integration.mvc.controller" />
|
||||
|
||||
<!-- <mvc:default-servlet-handler /> -->
|
||||
|
||||
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
|
||||
|
||||
<!-- Enables the Spring MVC @Controller programming model -->
|
||||
<mvc:annotation-driven />
|
||||
|
||||
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/css directory -->
|
||||
<mvc:resources mapping="/css/**" location="/css/" />
|
||||
<mvc:resources mapping="/js/**" location="/js/" />
|
||||
|
||||
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
|
||||
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<beans:property name="prefix" value="/WEB-INF/views/" />
|
||||
<beans:property name="suffix" value=".jsp" />
|
||||
</beans:bean>
|
||||
</beans>
|
||||
36
intermediate/monitoring/src/main/resources/log4j.xml
Normal file
36
intermediate/monitoring/src/main/resources/log4j.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<!-- Appenders -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p [%.10t][%.10c] %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- Loggers -->
|
||||
<logger name="org.springframework">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.integration">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.integration.mvc.controller">
|
||||
<level value="warn" />
|
||||
</logger>
|
||||
|
||||
<logger name="org.springframework.integration.samples">
|
||||
<level value="info" />
|
||||
</logger>
|
||||
|
||||
<!-- Root Logger -->
|
||||
<root>
|
||||
<priority value="warn" />
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
Reference in New Issue
Block a user