dzilajace mapowanie plikow jsp
This commit is contained in:
1 parent
3991b6ebc3
commit
8b8726589e
5 files changed
+161
-2
No files matched your search
@@ -3,12 +3,16 @@ package application;
|
||||
import application.utils.TokensGenerator;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.context.web.SpringBootServletInitializer;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
import org.springframework.web.servlet.view.JstlView;
|
||||
|
||||
/**
|
||||
* Created by lukasgol on 01.04.14.
|
||||
@@ -18,7 +22,7 @@ import org.springframework.scheduling.annotation.Scheduled;
|
||||
@EnableAutoConfiguration
|
||||
@ImportResource("Spring-Module.xml")
|
||||
@EnableScheduling
|
||||
public class Config {
|
||||
public class Config extends SpringBootServletInitializer {
|
||||
|
||||
@Scheduled(fixedRate = 50000)
|
||||
public void generatePassword() {
|
||||
@@ -30,5 +34,15 @@ public class Config {
|
||||
ConfigurableApplicationContext context = SpringApplication.run(Config.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public InternalResourceViewResolver internalResourceViewResolver() {
|
||||
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
|
||||
resolver.setPrefix("WEB-INF/views/");
|
||||
resolver.setSuffix(".jsp");
|
||||
resolver.setViewClass(JstlView.class);
|
||||
return resolver;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user