Open YongDongWu opened 6 years ago
I found the lack of configuration files in the project, can you provide missing files odata-mapping.xml. Think you.
you can run it with this command while you are in the root directory:
mvn spring-boot:run -P jar
-P tell the maven to use profile.
@binhudakhalid Could you please explain how can I build this project as a 'war' file for deploying in Tomcat.
@mjza If you look at the pom.xml file, you will see that it has two profile tags. One profile to create jar packaging and one to create war.
To create war packaging you need to select the first profile
mvn spring-boot:run -P hcp
we use -P to select a profile.
@binhudakhalid Yes, you are absolutely right. However that is not anymore my problem, and the hcp
is the default as I see in the code.
My problem at the moment is that I cannot deploy it in the Tomcat. Please check this issue: https://github.com/jpenninkhof/odata-boilerplate/issues/8
Thank you Guys. Same problem #8. It works.
I have some exceptions when i import this project. The exceptions is as follows: _SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) at com.penninkhof.odata.Application.main(Application.java:28) Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ... 8 more_ Best Regards!