Merge branch 'Fix-boot-mvc-2' into JAVA-841-new

This commit is contained in:
mikr 2020-03-15 16:53:06 +01:00
commit b92b5d2065
31 changed files with 38 additions and 44 deletions

View File

@ -222,16 +222,15 @@
</profiles>
<properties>
<start-class>org.baeldung.custom.Application</start-class>
<!--If you want to run the example with the multiple logins, comment
the tag above and uncomment the one below -->
<!--<start-class>org.baeldung.multiplelogin.MultipleLoginApplication</start-class> -->
<!-- <start-class>com.baeldung.jdbcauthentication.postgre.PostgreJdbcAuthenticationApplication</start-class>-->
<!--This runs the example with the multiple logins application -->
<start-class>com.baeldung.multiplelogin.MultipleLoginApplication</start-class>
<!--If you want to run the example with the multiple http elements,
comment the tag above and uncomment the one below -->
<!--<start-class>org.baeldung.multipleentrypoints.MultipleEntryPointsApplication</start-class> -->
<!--<start-class>com.baeldung.multipleentrypoints.MultipleEntryPointsApplication</start-class> -->
<!--If you want to run the example with the Https enabled endpoints,
comment the tag above and uncomment the one below -->
<!-- <start-class>org.baeldung.ssl.HttpsEnabledApplication</start-class> -->
<!-- <start-class>com.baeldung.ssl.HttpsEnabledApplication</start-class> -->
<taglibs-standard.version>1.1.2</taglibs-standard.version>
<cargo-maven2-plugin.version>1.6.1</cargo-maven2-plugin.version>

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.h2;
package com.baeldung.jdbcauthentication.h2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.mysql;
package com.baeldung.jdbcauthentication.mysql;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.postgre;
package com.baeldung.jdbcauthentication.postgre;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleauthproviders;
package com.baeldung.multipleauthproviders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleauthproviders;
package com.baeldung.multipleauthproviders;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleauthproviders;
package com.baeldung.multipleauthproviders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleentrypoints;
package com.baeldung.multipleentrypoints;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleentrypoints;
package com.baeldung.multipleentrypoints;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.multipleentrypoints;
package com.baeldung.multipleentrypoints;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,4 +1,4 @@
package org.baeldung.multiplelogin;
package com.baeldung.multiplelogin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -7,7 +7,6 @@ import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
@PropertySource("classpath:application-defaults.properties")
@ComponentScan("org.baeldung.multiplelogin")
public class MultipleLoginApplication {
public static void main(String[] args) {
SpringApplication.run(MultipleLoginApplication.class, args);

View File

@ -1,4 +1,4 @@
package org.baeldung.multiplelogin;
package com.baeldung.multiplelogin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -6,14 +6,12 @@ import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;
import org.springframework.context.annotation.ComponentScan;
@EnableWebMvc
@Configuration
@ComponentScan("org.baeldung.controller")
public class MultipleLoginMvcConfig implements WebMvcConfigurer {
public MultipleLoginMvcConfig() {

View File

@ -1,4 +1,4 @@
package org.baeldung.multiplelogin;
package com.baeldung.multiplelogin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -1,4 +1,4 @@
package org.baeldung.multiplelogin;
package com.baeldung.multiplelogin;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

View File

@ -1,4 +1,4 @@
package org.baeldung.ssl;
package com.baeldung.ssl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.ssl;
package com.baeldung.ssl;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

View File

@ -1,8 +1,7 @@
package org.baeldung.ssl;
package com.baeldung.ssl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class WelcomeController {

View File

@ -1,6 +1,5 @@
package org.baeldung.jdbcauthentication.h2;
package com.baeldung.jdbcauthentication.h2;
import org.baeldung.jdbcauthentication.h2.H2JdbcAuthenticationApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.h2.web;
package com.baeldung.jdbcauthentication.h2.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.mysql.web;
package com.baeldung.jdbcauthentication.mysql.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

View File

@ -1,4 +1,4 @@
package org.baeldung.jdbcauthentication.postgre.web;
package com.baeldung.jdbcauthentication.postgre.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

View File

@ -1,10 +1,10 @@
package org.baeldung.web;
package com.baeldung.web;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContextBuilder;
import org.baeldung.ssl.HttpsEnabledApplication;
import com.baeldung.ssl.HttpsEnabledApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;

View File

@ -1,10 +1,10 @@
package org.baeldung.web;
package com.baeldung.web;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collections;
import org.baeldung.multipleauthproviders.MultipleAuthProvidersApplication;
import com.baeldung.multipleauthproviders.MultipleAuthProvidersApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package org.baeldung.web;
package com.baeldung.web;
import org.junit.Before;
import org.junit.Test;
@ -15,7 +15,7 @@ import org.springframework.web.context.WebApplicationContext;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import org.baeldung.multipleentrypoints.MultipleEntryPointsApplication;
import com.baeldung.multipleentrypoints.MultipleEntryPointsApplication;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*;