cleanup; fix code formatting

This commit is contained in:
Denis 2019-10-06 19:37:23 +02:00
parent 6839533ec0
commit 56102c9a51
25 changed files with 223 additions and 216 deletions

View File

@ -1,3 +1,3 @@
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> <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> </kmodule>

View File

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?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="idEmployee" class="java.lang.Integer" isForPrompting="false"/> <parameter name="idEmployee" class="java.lang.Integer" isForPrompting="false"/>
<queryString> <queryString>
<![CDATA[SELECT * FROM EMAIL WHERE ID_EMPLOYEE = $P{idEmployee}]]> <![CDATA[SELECT * FROM EMAIL WHERE ID_EMPLOYEE = $P{idEmployee}]]>

View File

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?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="title" class="java.lang.String" isForPrompting="false"/>
<parameter name="condition" class="java.lang.String" isForPrompting="false"> <parameter name="condition" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA[" 1 = 1"]]></defaultValueExpression> <defaultValueExpression><![CDATA[" 1 = 1"]]></defaultValueExpression>
@ -44,7 +48,8 @@
<subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression> <subreportParameterExpression><![CDATA[$F{ID}]]></subreportParameterExpression>
</subreportParameter> </subreportParameter>
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <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> </subreport>
</band> </band>
</detail> </detail>

View File

@ -36,16 +36,16 @@ public class CacheEvictAnnotationIntegrationTest {
} }
@Bean @Bean
public CacheManager cacheManager(){ public CacheManager cacheManager() {
SimpleCacheManager cacheManager = new SimpleCacheManager(); SimpleCacheManager cacheManager = new SimpleCacheManager();
List<Cache> caches = new ArrayList<>(); List<Cache> caches = new ArrayList<>();
caches.add(cacheBean().getObject()); caches.add(cacheBean().getObject());
cacheManager.setCaches(caches ); cacheManager.setCaches(caches);
return cacheManager; return cacheManager;
} }
@Bean @Bean
public ConcurrentMapCacheFactoryBean cacheBean(){ public ConcurrentMapCacheFactoryBean cacheBean() {
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean(); ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
cacheFactoryBean.setName("first"); cacheFactoryBean.setName("first");
return cacheFactoryBean; return cacheFactoryBean;

View File

@ -34,24 +34,24 @@ public class CacheManagerEvictIntegrationTest {
} }
@Bean @Bean
public CacheManager cacheManager(){ public CacheManager cacheManager() {
SimpleCacheManager cacheManager = new SimpleCacheManager(); SimpleCacheManager cacheManager = new SimpleCacheManager();
List<Cache> caches = new ArrayList<>(); List<Cache> caches = new ArrayList<>();
caches.add(cacheBeanFirst().getObject()); caches.add(cacheBeanFirst().getObject());
caches.add(cacheBeanSecond().getObject()); caches.add(cacheBeanSecond().getObject());
cacheManager.setCaches(caches ); cacheManager.setCaches(caches);
return cacheManager; return cacheManager;
} }
@Bean @Bean
public ConcurrentMapCacheFactoryBean cacheBeanFirst(){ public ConcurrentMapCacheFactoryBean cacheBeanFirst() {
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean(); ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
cacheFactoryBean.setName("first"); cacheFactoryBean.setName("first");
return cacheFactoryBean; return cacheFactoryBean;
} }
@Bean @Bean
public ConcurrentMapCacheFactoryBean cacheBeanSecond(){ public ConcurrentMapCacheFactoryBean cacheBeanSecond() {
ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean(); ConcurrentMapCacheFactoryBean cacheFactoryBean = new ConcurrentMapCacheFactoryBean();
cacheFactoryBean.setName("second"); cacheFactoryBean.setName("second");
return cacheFactoryBean; return cacheFactoryBean;

View File

@ -39,11 +39,6 @@
<groupId>org.springframework.retry</groupId> <groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId> <artifactId>spring-retry</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell</artifactId>
<version>${org.springframework.shell.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId> <artifactId>spring-websocket</artifactId>
@ -104,17 +99,6 @@
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>${guava.version}</version> <version>${guava.version}</version>
</dependency> </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 --> <!-- test scoped -->
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
@ -218,7 +202,6 @@
<start-class>org.baeldung.sample.App</start-class> <start-class>org.baeldung.sample.App</start-class>
<!-- Spring --> <!-- Spring -->
<org.springframework.version>5.0.6.RELEASE</org.springframework.version> <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> <annotation-api.version>1.3.2</annotation-api.version>
<!-- persistence --> <!-- persistence -->
<hibernate.version>5.2.5.Final</hibernate.version> <hibernate.version>5.2.5.Final</hibernate.version>
@ -227,7 +210,6 @@
<guava.version>25.1-jre</guava.version> <guava.version>25.1-jre</guava.version>
<easymock.version>3.6</easymock.version> <easymock.version>3.6</easymock.version>
<assertj.version>3.6.1</assertj.version> <assertj.version>3.6.1</assertj.version>
<jasperreports.version>6.6.0</jasperreports.version>
<shedlock.version>2.1.0</shedlock.version> <shedlock.version>2.1.0</shedlock.version>
<javassist.version>3.22.0-GA</javassist.version> <javassist.version>3.22.0-GA</javassist.version>
</properties> </properties>

View File

@ -6,10 +6,10 @@
<bean id="ship" class="org.baeldung.bean.injection.Ship"> <bean id="ship" class="org.baeldung.bean.injection.Ship">
<constructor-arg> <constructor-arg>
<ref bean="helm" /> <ref bean="helm"/>
</constructor-arg> </constructor-arg>
</bean> </bean>
<bean id="helm" class="org.baeldung.bean.injection.Helm" /> <bean id="helm" class="org.baeldung.bean.injection.Helm"/>
</beans> </beans>

View File

@ -6,9 +6,9 @@
<bean id="ship" class="org.baeldung.bean.injection.Ship"> <bean id="ship" class="org.baeldung.bean.injection.Ship">
<property name="helm"> <property name="helm">
<ref bean="helm" /> <ref bean="helm"/>
</property> </property>
</bean> </bean>
<bean id="helm" class="org.baeldung.bean.injection.Helm" /> <bean id="helm" class="org.baeldung.bean.injection.Helm"/>
</beans> </beans>

View File

@ -7,13 +7,13 @@
</encoder> </encoder>
</appender> </appender>
<logger name="org.springframework" level="WARN" /> <logger name="org.springframework" level="WARN"/>
<logger name="org.springframework.transaction" level="WARN" /> <logger name="org.springframework.transaction" level="WARN"/>
<!-- in order to debug some marshalling issues, this needs to be TRACE --> <!-- 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"> <root level="INFO">
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT"/>
</root> </root>
</configuration> </configuration>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-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" <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 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" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
> >

View File

@ -10,8 +10,8 @@
http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd"> http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<context:component-scan base-package="org.baeldung.controller.controller" /> <context:component-scan base-package="org.baeldung.controller.controller"/>
<mvc:annotation-driven /> <mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix"> <property name="prefix">
@ -21,4 +21,4 @@
<value>.jsp</value> <value>.jsp</value>
</property> </property>
</bean> </bean>
</beans> </beans>

View File

@ -6,6 +6,6 @@
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="greeting" class="com.baeldung.contexts.Greeting"> <bean id="greeting" class="com.baeldung.contexts.Greeting">
<property name="message" value="Hello World !!" /> <property name="message" value="Hello World !!"/>
</bean> </bean>
</beans> </beans>

View File

@ -6,11 +6,11 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd"> 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"> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/view/" /> <property name="prefix" value="/WEB-INF/view/"/>
<property name="suffix" value=".jsp" /> <property name="suffix" value=".jsp"/>
</bean> </bean>
</beans> </beans>

View File

@ -8,7 +8,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.baeldung.contexts.services" /> <context:component-scan base-package="com.baeldung.contexts.services"/>
<import resource="greeting.xml" /> <import resource="greeting.xml"/>
</beans> </beans>

View File

@ -6,11 +6,11 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd"> 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"> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/secure/view/" /> <property name="prefix" value="/WEB-INF/secure/view/"/>
<property name="suffix" value=".jsp" /> <property name="suffix" value=".jsp"/>
</bean> </bean>
</beans> </beans>

View File

@ -2,6 +2,6 @@
<head></head> <head></head>
<body> <body>
<h1>This is the body of the sample view</h1> <h1>This is the body of the sample view</h1>
</body> </body>
</html> </html>

View File

@ -1,10 +1,10 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" <%@ 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"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title> <title>Insert title here</title>
</head> </head>
<body> <body>
Data returned is ${data} Data returned is ${data}

View File

@ -26,6 +26,11 @@
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId> <artifactId>spring-aspects</artifactId>
</dependency> </dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${annotation-api.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
@ -33,4 +38,8 @@
</dependency> </dependency>
</dependencies> </dependencies>
<properties>
<annotation-api.version>1.3.2</annotation-api.version>
</properties>
</project> </project>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-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" <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" 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 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/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-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" <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:context="http://www.springframework.org/schema/context"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/task http://www.springframework.org/schema/task/spring-task-4.2.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.2.xsd
@ -18,8 +19,11 @@
<bean id="schedulingWithXmlConfig" class="org.baeldung.scheduling.SchedulingWithXmlConfig"/> <bean id="schedulingWithXmlConfig" class="org.baeldung.scheduling.SchedulingWithXmlConfig"/>
<task:scheduled-tasks scheduler="myScheduler"> <task:scheduled-tasks scheduler="myScheduler">
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedDelayTask" fixed-delay="${fixedDelay.in.milliseconds}" initial-delay="1000"/> <task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedDelayTask"
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedRateTask" fixed-rate="${fixedRate.in.milliseconds}"/> fixed-delay="${fixedDelay.in.milliseconds}" initial-delay="1000"/>
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleTaskUsingCronExpression" cron="${cron.expression}"/> <task:scheduled ref="schedulingWithXmlConfig" method="scheduleFixedRateTask"
fixed-rate="${fixedRate.in.milliseconds}"/>
<task:scheduled ref="schedulingWithXmlConfig" method="scheduleTaskUsingCronExpression"
cron="${cron.expression}"/>
</task:scheduled-tasks> </task:scheduled-tasks>
</beans> </beans>

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <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" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/util http://www.springframework.org/schema/util/spring-util-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"> 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> </beans>