BAEL-20869 Move remaining spring boot modules

This commit is contained in:
mikr 2020-02-02 20:44:54 +01:00
parent 3e26f588fc
commit 06161e1bae
704 changed files with 1303 additions and 1501 deletions

45
pom.xml
View File

@ -637,30 +637,8 @@
<module>spring-batch</module> <module>spring-batch</module>
<module>spring-bom</module> <module>spring-bom</module>
<module>spring-boot</module>
<module>spring-boot-modules</module>
<module>spring-boot-angular</module>
<module>spring-boot-bootstrap</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-config-jpa-error</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<module>spring-boot-jasypt</module>
<module>spring-boot-libraries</module>
<module>spring-boot-mvc-2</module>
<module>spring-boot-parent</module> <module>spring-boot-parent</module>
<module>spring-boot-performance</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-rest</module> <module>spring-boot-rest</module>
<module>spring-boot-runtime</module>
<module>spring-boot-runtime/disabling-console-jul</module>
<module>spring-boot-runtime/disabling-console-log4j2</module>
<module>spring-boot-runtime/disabling-console-logback</module>
<module>spring-boot-security</module> <module>spring-boot-security</module>
<module>spring-caching</module> <module>spring-caching</module>
@ -1159,31 +1137,8 @@
<module>spring-batch</module> <module>spring-batch</module>
<module>spring-bom</module> <module>spring-bom</module>
<module>spring-boot</module>
<module>spring-boot-modules</module>
<module>spring-boot-angular</module>
<module>spring-boot-bootstrap</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-config-jpa-error</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<module>spring-boot-jasypt</module>
<module>spring-boot-libraries</module>
<module>spring-boot-mvc</module>
<module>spring-boot-mvc-2</module>
<module>spring-boot-parent</module> <module>spring-boot-parent</module>
<module>spring-boot-performance</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-rest</module> <module>spring-boot-rest</module>
<module>spring-boot-runtime</module>
<module>spring-boot-runtime/disabling-console-jul</module>
<module>spring-boot-runtime/disabling-console-log4j2</module>
<module>spring-boot-runtime/disabling-console-logback</module>
<module>spring-boot-security</module> <module>spring-boot-security</module>
<module>spring-caching</module> <module>spring-caching</module>

View File

@ -14,21 +14,36 @@
</parent> </parent>
<modules> <modules>
<module>spring-boot</module>
<module>spring-boot-admin</module> <module>spring-boot-admin</module>
<module>spring-boot-angular</module>
<module>spring-boot-artifacts</module> <module>spring-boot-artifacts</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-autoconfiguration</module> <module>spring-boot-autoconfiguration</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-client</module>
<module>spring-boot-config-jpa-error</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-deployment</module>
<module>spring-boot-camel</module> <module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-custom-starter</module> <module>spring-boot-custom-starter</module>
<module>spring-boot-crud</module> <module>spring-boot-crud</module>
<module>spring-boot-data</module> <module>spring-boot-data</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project --> <!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
<module>spring-boot-jasypt</module>
<module>spring-boot-keycloak</module> <module>spring-boot-keycloak</module>
<module>spring-boot-libraries</module>
<module>spring-boot-logging-log4j2</module> <module>spring-boot-logging-log4j2</module>
<module>spring-boot-kotlin</module> <module>spring-boot-kotlin</module>
<module>spring-boot-mvc</module>
<module>spring-boot-mvc-2</module>
<module>spring-boot-mvc-birt</module> <module>spring-boot-mvc-birt</module>
<module>spring-boot-nashorn</module> <module>spring-boot-nashorn</module>
<module>spring-boot-properties</module> <module>spring-boot-properties</module>
<module>spring-boot-property-exp</module>
<module>spring-boot-runtime</module>
<module>spring-boot-springdoc</module> <module>spring-boot-springdoc</module>
<module>spring-boot-testing</module> <module>spring-boot-testing</module>
<module>spring-boot-vue</module> <module>spring-boot-vue</module>

View File

@ -12,7 +12,7 @@
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../../parent-boot-2</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -1,28 +1,28 @@
package com.baeldung.application; package com.baeldung.application;
import com.baeldung.application.entities.User; import com.baeldung.application.entities.User;
import com.baeldung.application.repositories.UserRepository; import com.baeldung.application.repositories.UserRepository;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@SpringBootApplication @SpringBootApplication
public class Application { public class Application {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(Application.class, args);
} }
@Bean @Bean
CommandLineRunner init(UserRepository userRepository) { CommandLineRunner init(UserRepository userRepository) {
return args -> { return args -> {
Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> { Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> {
User user = new User(name, name.toLowerCase() + "@domain.com"); User user = new User(name, name.toLowerCase() + "@domain.com");
userRepository.save(user); userRepository.save(user);
}); });
userRepository.findAll().forEach(System.out::println); userRepository.findAll().forEach(System.out::println);
}; };
} }
} }

View File

@ -1,31 +1,31 @@
package com.baeldung.application.controllers; package com.baeldung.application.controllers;
import com.baeldung.application.entities.User; import com.baeldung.application.entities.User;
import com.baeldung.application.repositories.UserRepository; import com.baeldung.application.repositories.UserRepository;
import java.util.List; import java.util.List;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@CrossOrigin(origins = "http://localhost:4200") @CrossOrigin(origins = "http://localhost:4200")
public class UserController { public class UserController {
private final UserRepository userRepository; private final UserRepository userRepository;
public UserController(UserRepository userRepository) { public UserController(UserRepository userRepository) {
this.userRepository = userRepository; this.userRepository = userRepository;
} }
@GetMapping("/users") @GetMapping("/users")
public List<User> getUsers() { public List<User> getUsers() {
return (List<User>) userRepository.findAll(); return (List<User>) userRepository.findAll();
} }
@PostMapping("/users") @PostMapping("/users")
void addUser(@RequestBody User user) { void addUser(@RequestBody User user) {
userRepository.save(user); userRepository.save(user);
} }
} }

View File

@ -1,43 +1,43 @@
package com.baeldung.application.entities; package com.baeldung.application.entities;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
@Entity @Entity
public class User { public class User {
@Id @Id
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(strategy = GenerationType.AUTO)
private long id; private long id;
private final String name; private final String name;
private final String email; private final String email;
public User() { public User() {
this.name = ""; this.name = "";
this.email = ""; this.email = "";
} }
public User(String name, String email) { public User(String name, String email) {
this.name = name; this.name = name;
this.email = email; this.email = email;
} }
public long getId() { public long getId() {
return id; return id;
} }
public String getName() { public String getName() {
return name; return name;
} }
public String getEmail() { public String getEmail() {
return email; return email;
} }
@Override @Override
public String toString() { public String toString() {
return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}';
} }
} }

View File

@ -1,9 +1,9 @@
package com.baeldung.application.repositories; package com.baeldung.application.repositories;
import com.baeldung.application.entities.User; import com.baeldung.application.entities.User;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
@Repository @Repository
public interface UserRepository extends CrudRepository<User, Long>{} public interface UserRepository extends CrudRepository<User, Long>{}

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -7,11 +7,11 @@
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="spring-boot-angular/src/main/js/application/src/favicon.ico">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous"> crossorigin="anonymous">
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>
</body> </body>
</html> </html>

Some files were not shown because too many files have changed in this diff Show More