From ebd334c9c59f956ebc54640b7e37f4b8d5e22808 Mon Sep 17 00:00:00 2001 From: Loredana Date: Thu, 20 Aug 2020 19:46:25 +0300 Subject: [PATCH] removed spring-all module --- spring-all/README.md | 3 - .../org/baeldung/scopes/ScopesConfig.java | 61 ------------------- 2 files changed, 64 deletions(-) delete mode 100644 spring-all/README.md delete mode 100644 spring-all/src/main/java/org/baeldung/scopes/ScopesConfig.java diff --git a/spring-all/README.md b/spring-all/README.md deleted file mode 100644 index 9ad78aa1ee..0000000000 --- a/spring-all/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Spring All - -This module contains articles about Spring diff --git a/spring-all/src/main/java/org/baeldung/scopes/ScopesConfig.java b/spring-all/src/main/java/org/baeldung/scopes/ScopesConfig.java deleted file mode 100644 index 11d3806b6e..0000000000 --- a/spring-all/src/main/java/org/baeldung/scopes/ScopesConfig.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.baeldung.scopes; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; -import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.view.JstlView; -import org.springframework.web.servlet.view.UrlBasedViewResolver; - -@Configuration -@ComponentScan("org.baeldung.scopes") -@EnableWebMvc -public class ScopesConfig { - @Bean - public UrlBasedViewResolver setupViewResolver() { - final UrlBasedViewResolver resolver = new UrlBasedViewResolver(); - resolver.setPrefix("/WEB-INF/view/"); - resolver.setSuffix(".jsp"); - resolver.setViewClass(JstlView.class); - return resolver; - } - - @Bean - @Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS) - public HelloMessageGenerator requestScopedBean() { - return new HelloMessageGenerator(); - } - - @Bean - @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS) - public HelloMessageGenerator sessionScopedBean() { - return new HelloMessageGenerator(); - } - - @Bean - @Scope(value = WebApplicationContext.SCOPE_APPLICATION, proxyMode = ScopedProxyMode.TARGET_CLASS) - public HelloMessageGenerator applicationScopedBean() { - return new HelloMessageGenerator(); - } - - @Bean - @Scope(scopeName = "websocket", proxyMode = ScopedProxyMode.TARGET_CLASS) - public HelloMessageGenerator websocketScopedBean() { - return new HelloMessageGenerator(); - } - - @Bean - @Scope("prototype") - public Person personPrototype() { - return new Person(); - } - - @Bean - @Scope("singleton") - public Person personSingleton() { - return new Person(); - } -}