2020-03-19 21:01:20 +01:00
|
|
|
package com.baeldung;
|
2019-10-31 20:43:47 -05:00
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Main Application Class - uses Spring Boot. Just run this as a normal Java
|
|
|
|
* class to run up a Jetty Server (on http://localhost:8080)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
@SpringBootApplication
|
|
|
|
public class SampleLDAPApplication extends SpringBootServletInitializer {
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
SpringApplication.run(SampleLDAPApplication.class, args);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
public WebMvcConfigurerAdapter adapter() {
|
|
|
|
return new WebMvcConfigurerAdapter() {
|
|
|
|
@Override
|
|
|
|
public void addViewControllers(ViewControllerRegistry registry) {
|
|
|
|
registry.addViewController("/login")
|
|
|
|
.setViewName("login");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|