diff --git a/spring-core-3/static-value-injection/README.md b/spring-core-3/static-value-injection/README.md deleted file mode 100644 index 06dfa29f80..0000000000 --- a/spring-core-3/static-value-injection/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Inject a value to a static field - -## How to run -```sh -mvn clean install -mvn spring-boot:run -``` - -## Request - -**GET** -http://localhost:8080/properties - - -## Response -```json -[ - "Inject a value to a static field", - "Inject a value to a static field", - null -] -``` diff --git a/spring-core-3/static-value-injection/pom.xml b/spring-core-3/static-value-injection/pom.xml deleted file mode 100644 index aa45fde886..0000000000 --- a/spring-core-3/static-value-injection/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.2.4.RELEASE - - - com.baeldung - static.value.injection - 0.0.1-SNAPSHOT - static.value.injection - Demo project for Spring Boot - - - 1.8 - - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java b/spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java deleted file mode 100644 index c1875216b5..0000000000 --- a/spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.baeldung; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - -} diff --git a/spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java b/spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java deleted file mode 100644 index 03a2518117..0000000000 --- a/spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.baeldung.controller; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.Arrays; -import java.util.List; - -@RestController -public class PropertyController { - - @Value("${name}") - private String name; - - @Value("${name}") - private static String NAME_NULL; - - private static String NAME_STATIC; - - @Value("${name}") - public void setNameStatic(String name){ - PropertyController.NAME_STATIC = name; - } - - @GetMapping("/properties") - public List getProperties(){ - return Arrays.asList(this.name, NAME_STATIC, NAME_NULL) ; - } -} diff --git a/spring-core-3/static-value-injection/src/main/resources/application.properties b/spring-core-3/static-value-injection/src/main/resources/application.properties deleted file mode 100644 index 828fa9cd2a..0000000000 --- a/spring-core-3/static-value-injection/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -name = Inject a value to a static field diff --git a/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java b/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java deleted file mode 100644 index 4ad83bc539..0000000000 --- a/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.baeldung; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class ApplicationTests { - - @Test - void contextLoads() { - } - -}