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,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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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}