You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.4 KiB
42 lines
1.4 KiB
package com.mousetech.gourmetj;
|
|
|
|
import javax.inject.Qualifier;
|
|
import javax.servlet.ServletContext;
|
|
import javax.servlet.ServletException;
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|
import org.springframework.boot.web.servlet.ServletContextInitializer;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.web.filter.HiddenHttpMethodFilter;
|
|
|
|
@SpringBootApplication
|
|
@EntityScan(value = {"com.mousetech.gourmetj.persistence.model"})
|
|
public class SpringPrimeFacesApplication {
|
|
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(SpringPrimeFacesApplication.class, args);
|
|
}
|
|
|
|
@Bean
|
|
public ServletContextInitializer initializer() {
|
|
return new ServletContextInitializer() {
|
|
@Override
|
|
public void onStartup(ServletContext servletContext)
|
|
throws ServletException {
|
|
servletContext.setInitParameter(
|
|
"primefaces.THEME", "afternoon");
|
|
servletContext.setInitParameter(
|
|
"javax.faces.FACELETS_SKIP_COMMENTS",
|
|
"true");
|
|
servletContext.setInitParameter(
|
|
"com.sun.faces.expressionFactory",
|
|
"com.sun.el.ExpressionFactoryImpl");
|
|
servletContext.setInitParameter(
|
|
"primefaces.UPLOADER", "native");
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|