cleanup; fix code formatting
This commit is contained in:
parent
6839533ec0
commit
56102c9a51
|
@ -1,3 +1,3 @@
|
|||
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
|
||||
<kbase name="kbase" packages="com.baeldung.process" />
|
||||
<kbase name="kbase" packages="com.baeldung.process"/>
|
||||
</kmodule>
|
|
@ -1,17 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="employeeReport" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
|
||||
<parameter name="idEmployee" class="java.lang.Integer" isForPrompting="false"/>
|
||||
<queryString>
|
||||
<![CDATA[SELECT * FROM EMAIL WHERE ID_EMPLOYEE = $P{idEmployee}]]>
|
||||
</queryString>
|
||||
<field name="ADDRESS" class="java.lang.String"/>
|
||||
<detail>
|
||||
<band height="20" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="156" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{ADDRESS}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
|
||||
name="employeeReport" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20"
|
||||
topMargin="20" bottomMargin="20">
|
||||
<parameter name="idEmployee" class="java.lang.Integer" isForPrompting="false"/>
|
||||
<queryString>
|
||||
<![CDATA[SELECT * FROM EMAIL WHERE ID_EMPLOYEE = $P{idEmployee}]]>
|
||||
</queryString>
|
||||
<field name="ADDRESS" class="java.lang.String"/>
|
||||
<detail>
|
||||
<band height="20" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="156" height="20"/>
|
||||
<textElement/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{ADDRESS}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
</jasperReport>
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="employeeReport" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
|
||||
name="employeeReport" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20"
|
||||
topMargin="20" bottomMargin="20">
|
||||
<parameter name="title" class="java.lang.String" isForPrompting="false"/>
|
||||
<parameter name="condition" class="java.lang.String" isForPrompting="false">
|
||||
<defaultValueExpression><![CDATA[" 1 = 1"]]></defaultValueExpression>
|
||||
</parameter>
|
||||
<parameter name="minSalary" class="java.lang.Double" isForPrompting="false"/>
|
||||
<queryString>
|
||||
<![CDATA[SELECT * FROM EMPLOYEE WHERE SALARY >= $P{minSalary} AND $P!{condition}]]>
|
||||
<![CDATA[SELECT * FROM EMPLOYEE WHERE SALARY >= $P{minSalary} AND $P!{condition}]]>
|
||||
</queryString>
|
||||
<field name="FIRST_NAME" class="java.lang.String"/>
|
||||
<field name="LAST_NAME" class="java.lang.String"/>
|
||||
|
@ -44,7 +48,8 @@
|
|||
<subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression>
|
||||
</subreportParameter>
|
||||
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
|
||||
<subreportExpression class="java.lang.String"><![CDATA["employeeEmailReport.jasper"]]></subreportExpression>
|
||||
<subreportExpression class="java.lang.String">
|
||||
<![CDATA["employeeEmailReport.jasper"]]></subreportExpression>
|
||||
</subreport>
|
||||
</band>
|
||||
</detail>
|
||||
|
|
|
@ -26,54 +26,54 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||
@ContextConfiguration
|
||||
public class CacheEvictAnnotationIntegrationTest {
|
||||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class ContextConfiguration {
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
static class ContextConfiguration {
|
||||
|
||||
@Bean
|
||||
public CachingService cachingService() {
|
||||
return new CachingService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CacheManager cacheManager(){
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
List<Cache> caches = new ArrayList<>();
|
||||
caches.add(cacheBean().getObject());
|
||||
cacheManager.setCaches(caches );
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBean(){
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("first");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
}
|
||||
@Bean
|
||||
public CachingService cachingService() {
|
||||
return new CachingService();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
CachingService cachingService;
|
||||
@Bean
|
||||
public CacheManager cacheManager() {
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
List<Cache> caches = new ArrayList<>();
|
||||
caches.add(cacheBean().getObject());
|
||||
cacheManager.setCaches(caches);
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
cachingService.putToCache("first", "key1", "Baeldung");
|
||||
cachingService.putToCache("first", "key2", "Article");
|
||||
}
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBean() {
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("first");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenFirstCache_whenSingleCacheValueEvictRequested_thenEmptyCacheValue() {
|
||||
cachingService.evictSingleCacheValue("key1");
|
||||
String key1 = cachingService.getFromCache("first", "key1");
|
||||
assertThat(key1, is(nullValue()));
|
||||
}
|
||||
@Autowired
|
||||
CachingService cachingService;
|
||||
|
||||
@Test
|
||||
public void givenFirstCache_whenAllCacheValueEvictRequested_thenEmptyCache() {
|
||||
cachingService.evictAllCacheValues();
|
||||
String key1 = cachingService.getFromCache("first", "key1");
|
||||
String key2 = cachingService.getFromCache("first", "key2");
|
||||
assertThat(key1, is(nullValue()));
|
||||
assertThat(key2, is(nullValue()));
|
||||
}
|
||||
@Before
|
||||
public void before() {
|
||||
cachingService.putToCache("first", "key1", "Baeldung");
|
||||
cachingService.putToCache("first", "key2", "Article");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenFirstCache_whenSingleCacheValueEvictRequested_thenEmptyCacheValue() {
|
||||
cachingService.evictSingleCacheValue("key1");
|
||||
String key1 = cachingService.getFromCache("first", "key1");
|
||||
assertThat(key1, is(nullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenFirstCache_whenAllCacheValueEvictRequested_thenEmptyCache() {
|
||||
cachingService.evictAllCacheValues();
|
||||
String key1 = cachingService.getFromCache("first", "key1");
|
||||
String key2 = cachingService.getFromCache("first", "key2");
|
||||
assertThat(key1, is(nullValue()));
|
||||
assertThat(key2, is(nullValue()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,39 +24,39 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
public class CacheManagerEvictIntegrationTest {
|
||||
|
||||
@Configuration
|
||||
static class ContextConfiguration {
|
||||
|
||||
@Bean
|
||||
public CachingService cachingService() {
|
||||
return new CachingService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CacheManager cacheManager(){
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
List<Cache> caches = new ArrayList<>();
|
||||
caches.add(cacheBeanFirst().getObject());
|
||||
caches.add(cacheBeanSecond().getObject());
|
||||
cacheManager.setCaches(caches );
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBeanFirst(){
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("first");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBeanSecond(){
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("second");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
}
|
||||
@Configuration
|
||||
static class ContextConfiguration {
|
||||
|
||||
@Bean
|
||||
public CachingService cachingService() {
|
||||
return new CachingService();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CacheManager cacheManager() {
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
List<Cache> caches = new ArrayList<>();
|
||||
caches.add(cacheBeanFirst().getObject());
|
||||
caches.add(cacheBeanSecond().getObject());
|
||||
cacheManager.setCaches(caches);
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBeanFirst() {
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("first");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ConcurrentMapCacheFactoryBean cacheBeanSecond() {
|
||||
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
|
||||
cacheFactoryBean.setName("second");
|
||||
return cacheFactoryBean;
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
CachingService cachingService;
|
||||
|
|
|
@ -39,11 +39,6 @@
|
|||
<groupId>org.springframework.retry</groupId>
|
||||
<artifactId>spring-retry</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.shell</groupId>
|
||||
<artifactId>spring-shell</artifactId>
|
||||
<version>${org.springframework.shell.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-websocket</artifactId>
|
||||
|
@ -104,17 +99,6 @@
|
|||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.jasperreports</groupId>
|
||||
<artifactId>jasperreports</artifactId>
|
||||
<version>${jasperreports.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- test scoped -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
@ -218,7 +202,6 @@
|
|||
<start-class>org.baeldung.sample.App</start-class>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>5.0.6.RELEASE</org.springframework.version>
|
||||
<org.springframework.shell.version>1.2.0.RELEASE</org.springframework.shell.version>
|
||||
<annotation-api.version>1.3.2</annotation-api.version>
|
||||
<!-- persistence -->
|
||||
<hibernate.version>5.2.5.Final</hibernate.version>
|
||||
|
@ -227,7 +210,6 @@
|
|||
<guava.version>25.1-jre</guava.version>
|
||||
<easymock.version>3.6</easymock.version>
|
||||
<assertj.version>3.6.1</assertj.version>
|
||||
<jasperreports.version>6.6.0</jasperreports.version>
|
||||
<shedlock.version>2.1.0</shedlock.version>
|
||||
<javassist.version>3.22.0-GA</javassist.version>
|
||||
</properties>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="ship" class="org.baeldung.bean.injection.Ship">
|
||||
<constructor-arg>
|
||||
<ref bean="helm" />
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
<bean id="ship" class="org.baeldung.bean.injection.Ship">
|
||||
<constructor-arg>
|
||||
<ref bean="helm"/>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<bean id="helm" class="org.baeldung.bean.injection.Helm" />
|
||||
<bean id="helm" class="org.baeldung.bean.injection.Helm"/>
|
||||
|
||||
</beans>
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="ship" class="org.baeldung.bean.injection.Ship">
|
||||
<property name="helm">
|
||||
<ref bean="helm" />
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="ship" class="org.baeldung.bean.injection.Ship">
|
||||
<property name="helm">
|
||||
<ref bean="helm"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="helm" class="org.baeldung.bean.injection.Helm" />
|
||||
<bean id="helm" class="org.baeldung.bean.injection.Helm"/>
|
||||
</beans>
|
|
@ -7,13 +7,13 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework" level="WARN" />
|
||||
<logger name="org.springframework.transaction" level="WARN" />
|
||||
<logger name="org.springframework" level="WARN"/>
|
||||
<logger name="org.springframework.transaction" level="WARN"/>
|
||||
|
||||
<!-- in order to debug some marshalling issues, this needs to be TRACE -->
|
||||
<logger name="org.springframework.web.servlet.mvc" level="WARN" />
|
||||
<logger name="org.springframework.web.servlet.mvc" level="WARN"/>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
</configuration>
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="personSingleton" class="org.baeldung.scopes.Person" scope="singleton"/>
|
||||
|
||||
|
||||
<bean id="personPrototype" class="org.baeldung.scopes.Person" scope="prototype"/>
|
||||
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
|
||||
>
|
||||
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
|
||||
<context:component-scan base-package="org.baeldung.controller.controller" />
|
||||
<mvc:annotation-driven />
|
||||
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix">
|
||||
<value>/WEB-INF/</value>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<value>.jsp</value>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
||||
<context:component-scan base-package="org.baeldung.controller.controller"/>
|
||||
<mvc:annotation-driven/>
|
||||
|
||||
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix">
|
||||
<value>/WEB-INF/</value>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<value>.jsp</value>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version = "1.0" encoding = "UTF-8"?>
|
||||
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
|
||||
<bean id="greeting" class="com.baeldung.contexts.Greeting">
|
||||
<property name="message" value="Hello World !!" />
|
||||
</bean>
|
||||
|
||||
<bean id="greeting" class="com.baeldung.contexts.Greeting">
|
||||
<property name="message" value="Hello World !!"/>
|
||||
</bean>
|
||||
</beans>
|
|
@ -1,16 +1,16 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:component-scan base-package="com.baeldung.contexts.normal" />
|
||||
<context:component-scan base-package="com.baeldung.contexts.normal"/>
|
||||
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
|
||||
<property name="prefix" value="/WEB-INF/view/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
||||
<property name="prefix" value="/WEB-INF/view/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
</beans>
|
|
@ -1,14 +1,14 @@
|
|||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
|
||||
|
||||
<context:component-scan base-package="com.baeldung.contexts.services" />
|
||||
|
||||
<import resource="greeting.xml" />
|
||||
<context:component-scan base-package="com.baeldung.contexts.services"/>
|
||||
|
||||
<import resource="greeting.xml"/>
|
||||
</beans>
|
|
@ -1,16 +1,16 @@
|
|||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:component-scan base-package="com.baeldung.contexts.secure" />
|
||||
<context:component-scan base-package="com.baeldung.contexts.secure"/>
|
||||
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
|
||||
<property name="prefix" value="/WEB-INF/secure/view/" />
|
||||
<property name="suffix" value=".jsp" />
|
||||
</bean>
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
|
||||
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
|
||||
<property name="prefix" value="/WEB-INF/secure/view/"/>
|
||||
<property name="suffix" value=".jsp"/>
|
||||
</bean>
|
||||
</beans>
|
|
@ -2,6 +2,6 @@
|
|||
<head></head>
|
||||
|
||||
<body>
|
||||
<h1>This is the body of the sample view</h1>
|
||||
<h1>This is the body of the sample view</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -2,9 +2,9 @@
|
|||
<head></head>
|
||||
|
||||
<body>
|
||||
<h1>Bean Scopes Examples</h1>
|
||||
<br> Previous Message: ${previousMessage }
|
||||
<br> Current Message: ${currentMessage }
|
||||
<br>
|
||||
<h1>Bean Scopes Examples</h1>
|
||||
<br> Previous Message: ${previousMessage }
|
||||
<br> Current Message: ${currentMessage }
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +1,11 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Spring Web Contexts</title>
|
||||
<title>Spring Web Contexts</title>
|
||||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<div style="padding: 10px; border-radius: 10px; font-size: 30px; text-align: center;">
|
||||
Normal Web Application : ${message}
|
||||
</div>
|
||||
<br>
|
||||
<div style="padding: 10px; border-radius: 10px; font-size: 30px; text-align: center;">
|
||||
Normal Web Application : ${message}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -15,10 +15,10 @@
|
|||
org.springframework.web.context.ContextLoaderListener
|
||||
</listener-class>
|
||||
</listener>-->
|
||||
<!--<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/rootApplicationContext.xml</param-value>
|
||||
</context-param>-->
|
||||
<!--<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>/WEB-INF/rootApplicationContext.xml</param-value>
|
||||
</context-param>-->
|
||||
<!--<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>org.springframework.web.context.support.AnnotationConfigWebApplicationContext</param-value>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<param-value>org.baeldung.bean.config</param-value>
|
||||
</context-param>-->
|
||||
|
||||
<!-- secure web app context -->
|
||||
<!-- secure web app context -->
|
||||
<!--<servlet>
|
||||
<servlet-name>secure-webapp</servlet-name>
|
||||
<servlet-class>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<servlet-name>secure-webapp</servlet-name>
|
||||
<url-pattern>/s/api/*</url-pattern>
|
||||
</servlet-mapping>-->
|
||||
|
||||
|
||||
<!-- normal web app context -->
|
||||
<!--<servlet>
|
||||
<servlet-name>normal-webapp</servlet-name>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
pageEncoding="UTF-8" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
Data returned is ${data}
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aspects</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${annotation-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
|
@ -33,4 +38,8 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<annotation-api.version>1.3.2</annotation-api.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,7 +1,8 @@
|
|||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
|
||||
>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?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:task="http://www.springframework.org/schema/task"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns="http://www.springframework.org/schema/beans"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
|
||||
|
@ -18,8 +19,11 @@
|
|||
<bean id="schedulingWithXmlConfig" class="org.baeldung.scheduling.SchedulingWithXmlConfig"/>
|
||||
|
||||
<task:scheduled-tasks scheduler="myScheduler">
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedDelayTask" fixed-delay="${fixedDelay.in.milliseconds}" initial-delay="1000"/>
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedRateTask" fixed-rate="${fixedRate.in.milliseconds}"/>
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleTaskUsingCronExpression" cron="${cron.expression}"/>
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedDelayTask"
|
||||
fixed-delay="${fixedDelay.in.milliseconds}" initial-delay="1000"/>
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedRateTask"
|
||||
fixed-rate="${fixedRate.in.milliseconds}"/>
|
||||
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleTaskUsingCronExpression"
|
||||
cron="${cron.expression}"/>
|
||||
</task:scheduled-tasks>
|
||||
</beans>
|
|
@ -1,12 +1,13 @@
|
|||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
|
||||
|
||||
<context:component-scan base-package="org.baeldung.shell.simple" />
|
||||
<context:component-scan base-package="org.baeldung.shell.simple"/>
|
||||
|
||||
</beans>
|
Loading…
Reference in New Issue