intellij 15 Spring boot tiles problem

I have an Spring boot app that runs in Eclipse and Maven without any problem but not in IntelliJ. IntelliJ failed to load the spring application context, because the tilesConfigurer can't find the defined view definitions.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupTilesConfigurer' defined in class path resource [com/mylab/cromero/controller/controller/WebConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No URL for ServletContext resource [/WEB-INF/layouts/layouts.xml]

My bean config:

 
/**
*
* @return tiles configure layers with every views of pizza app
*/
@Bean
public TilesConfigurer setupTilesConfigurer() {
    TilesConfigurer configurer = new TilesConfigurer();
    configurer.setDefinitions("/WEB-INF/layouts/layouts.xml",
            "/WEB-INF/layouts/views.xml");
    configurer.setCheckRefresh(true);
    return configurer;
}







12 comments
Comment actions Permalink

Please check your classpath in IJ and/or packaging/deployment. How do you package/run the application in IJ?

0
Comment actions Permalink

I am trying to run this project: spring-boot-mvc-web.Here is my github repository:

https://github.com/cristianprofile/spring-boot-mvc-complete-example


When i run my Spring boot app with mvn spring-boot:run in a terminal console Spring boot mvc web with tiles works fine. App starts fine. If i try to run it into eclipse I receive the same result.
I use the  run app button in my Spring boot main class (new intellij 15 feature). The same error is thrown when i configure Spring Boot run configuration:

error1.png

errorn.png


lanzar.png


2015-11-13 12:22:08.415  INFO 725 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2015-11-13 12:22:08.421 ERROR 725 --- [ost-startStop-1] o.a.catalina.loader.WebappClassLoader    : The web application [/pizza] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2015-11-13 12:22:08.433Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupTilesConfigurer' defined in class path resource [com/mylab/cromero/controller/controller/WebConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No URL for ServletContext resource [/WEB-INF/layouts/layouts.xml]
ERROR at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
725 --- [           main]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
o.s.boot.SpringApplication               at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
: at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
Error handling failed
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' is defined
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:759)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:117)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:689)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at com.mylab.cromero.controller.Application.main(Application.java:67)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
 at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:223)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:180)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:117)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:100)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at org.springframework.boot.context.event.EventPublishingRunListener.finished(EventPublishingRunListener.java:95)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
 at org.springframework.boot.SpringApplication.finishWithException(SpringApplication.java:699)
Caused by: java.lang.IllegalArgumentException: No URL for ServletContext resource [/WEB-INF/layouts/layouts.xml]
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:337)
 at com.mylab.cromero.controller.Application.main(Application.java:67)
 at org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext.getResources(SpringWildcardServletTilesApplicationContext.java:96)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.getSources(TilesConfigurer.java:306)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:182)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:137)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createDefinitionsFactory(TilesConfigurer.java:354)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:86)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' is defined
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createContainer(TilesConfigurer.java:297)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
 at org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:114)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:64)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer.afterPropertiesSet(TilesConfigurer.java:271)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 ... 18 more
 at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)
Caused by: java.io.FileNotFoundException: ServletContext resource [/WEB-INF/layouts/layouts.xml] cannot be resolved to URL because it does not exist
 at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1117)
 at org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext.getResources(SpringWildcardServletTilesApplicationContext.java:91)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1012)
 ... 29 more
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
 at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92)
 at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:101)
 at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87)
 at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:69)
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:330)
 at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:293)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:422)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1577)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
 ... 18 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' is defined
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1168)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:281)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
 at org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor.postProcessBeforeInitialization(ConfigurationClassPostProcessor.java:418)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
 ... 41 common frames omitted

2015-11-13 12:22:08.434 ERROR 725 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'setupTilesConfigurer' defined in class path resource [com/mylab/cromero/controller/controller/WebConfig.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No URL for ServletContext resource [/WEB-INF/layouts/layouts.xml]
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:759)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
 at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:117)
 at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:689)
 at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
 at com.mylab.cromero.controller.Application.main(Application.java:67)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:483)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IllegalArgumentException: No URL for ServletContext resource [/WEB-INF/layouts/layouts.xml]
 at org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext.getResources(SpringWildcardServletTilesApplicationContext.java:96)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.getSources(TilesConfigurer.java:306)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createLocaleDefinitionDao(BasicTilesContainerFactory.java:182)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createDefinitionsFactory(BasicTilesContainerFactory.java:137)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createDefinitionsFactory(TilesConfigurer.java:354)
 at org.apache.tiles.factory.BasicTilesContainerFactory.createContainer(BasicTilesContainerFactory.java:86)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer$SpringTilesContainerFactory.createContainer(TilesConfigurer.java:297)
 at org.apache.tiles.startup.AbstractTilesInitializer.createContainer(AbstractTilesInitializer.java:114)
 at org.apache.tiles.startup.AbstractTilesInitializer.initialize(AbstractTilesInitializer.java:64)
 at org.springframework.web.servlet.view.tiles3.TilesConfigurer.afterPropertiesSet(TilesConfigurer.java:271)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
 ... 18 common frames omitted
Caused by: java.io.FileNotFoundException: ServletContext resource [/WEB-INF/layouts/layouts.xml] cannot be resolved to URL because it does not exist
 at org.springframework.web.context.support.ServletContextResource.getURL(ServletContextResource.java:156)
 at org.springframework.web.servlet.view.tiles3.SpringWildcardServletTilesApplicationContext.getResources(SpringWildcardServletTilesApplicationContext.java:91)
 ... 29 common frames omitted

Thank you very much for your fast support!!!!!!

0
Comment actions Permalink

Thanks for the details, I will take a look at this on monday when back in the office.

0
Comment actions Permalink

Thank very much Yann, it is very usefull to be able to run Spring Boot in intellij without useing terminal commands.

0
Comment actions Permalink

The simplest solution is to move the tiles configuration files somewhere below existing /resources and use "classpath:layouts/layouts.xml" in your WebConfig (since you don't need WEB-INF folder anyway in your application).
The underlying problem is that WEB-INF folder is not automatically "deployed" when running the application from IntelliJ IDEA directly. Please note that Spring Boot Maven plugin does some additional steps to make such setups work.

0
Comment actions Permalink

i have just changed this config from web-inf to resources files folder. Now another error is thrown by the Ide (not with terminal with mvn or eclipse), it is impossible to find .ylm files,

error1.png
error2.png



2015-11-17 02:27:24.939  INFO 3264 --- [           main] c.mylab.cromero.controller.Application   : Starting Application on MacBook-Pro-de-CRISTIAN.local with PID 3264 (/Users/cristianromeromatesanz/Documents/spring-boot/spring-boot-mvc-complete-example/spring-boot-mvc-web/target/classes started by cristianromeromatesanz in /Users/cristianromeromatesanz/Documents/spring-boot)
2015-11-17 02:27:24.942 DEBUG 3264 --- [           main] o.s.boot.SpringApplication               : Loading source class com.mylab.cromero.controller.Application
2015-11-17 02:27:25.251 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Activated profiles develop
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.properties' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.xml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yaml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.properties' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.xml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yaml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.properties' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.xml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yaml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.properties' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.xml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yml' resource not found
2015-11-17 02:27:25.252 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yaml' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.properties' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.properties' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.properties' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.xml' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.xml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.xml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yml' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yaml' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yaml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yaml' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.properties' resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.properties' for profile develop resource not found
2015-11-17 02:27:25.253 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.properties' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.xml' resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.xml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.xml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yml' resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yaml' resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yaml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yaml' for profile develop resource not found
2015-11-17 02:27:25.254 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.properties' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.properties' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.properties' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.xml' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.xml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.xml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yml' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yaml' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yaml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yaml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.properties' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.properties' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.properties' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.xml' resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.xml' for profile develop resource not found
2015-11-17 02:27:25.255 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.xml' for profile develop resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yml' resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yml' for profile develop resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yml' for profile develop resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yaml' resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yaml' for profile develop resource not found
2015-11-17 02:27:25.256 DEBUG 3264 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yaml' for profile develop resource not found

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.bean

This bean is created by this ylm configuration in application-develop.ylm:

spring:
    profiles:
develop
    mail:
          host:
localhost
          port: 3600  


Thank you very much Yann for your support.

0
Comment actions Permalink

Why do you have application.properties AND application.yml? Please check the build output if files are really copied. If not, try full rebuild.

0
Comment actions Permalink

It was a prove of concept in a local branch. I have deleted this properties file and  the same error was thrown:


https://github.com/cristianprofile/spring-boot-mvc-complete-example
error3.png

No ylm file is loaded whne i use intellij run button:


2015-11-17 10:19:42.957 DEBUG 4342 --- [           main] o.s.boot.SpringApplication               : Loading source class com.mylab.cromero.controller.Application
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Activated profiles develop
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.properties' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.xml' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yml' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yaml' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.properties' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.xml' resource not found
2015-11-17 10:19:43.334 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yaml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.properties' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.xml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yaml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.properties' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.xml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yaml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.properties' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.properties' for profile develop resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.properties' for profile develop resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.xml' resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.xml' for profile develop resource not found
2015-11-17 10:19:43.335 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.xml' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yml' resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yml' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yml' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yaml' resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application-develop.yaml' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./config/application.yaml' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.properties' resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.properties' for profile develop resource not found
2015-11-17 10:19:43.336 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.properties' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.xml' resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.xml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.xml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yml' resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yaml' resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application-develop.yaml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'file:./application.yaml' for profile develop resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.properties' resource not found
2015-11-17 10:19:43.337 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.properties' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.properties' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.xml' resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.xml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.xml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yml' resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yaml' resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application-develop.yaml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/config/application.yaml' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.properties' resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.properties' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.properties' for profile develop resource not found
2015-11-17 10:19:43.338 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.xml' resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.xml' for profile develop resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.xml' for profile develop resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yml' resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yml' for profile develop resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yml' for profile develop resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yaml' resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application-develop.yaml' for profile develop resource not found
2015-11-17 10:19:43.339 DEBUG 4342 --- [           main] o.s.b.c.c.ConfigFileApplicationListener  : Skipped config file 'classpath:/application.yaml' for profile develop resource not found
.....
.....
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.mail.MailSender com.mylab.cromero.service.MailServiceImpl.mailSender; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.mail.MailSender] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
 ... 19 common frames omitted
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.mail.MailSender] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
 ... 21 common frames omitted






Terminal Spring boot run  invocation result ok:

error4.png

0
Comment actions Permalink

Did you check the YML config files were copied to target? Check the caveats for using YML, see instructions in http://docs.spring.io/spring-boot/docs/1.2.7.RELEASE/reference/html/boot-features-external-config.html

0
Comment actions Permalink

Thank you very much for your helpfull information. I run mvn clean install before running my application and tomcat has started fine. Unfortunately Tiles do not work fine. When i run
with intellij, controller do not find jsp:

Http request:

http://localhost:9090/pizza/

2015-11-17 11:36:22.120  INFO 4628 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9090 (http)
2015-11-17 11:36:22.123  INFO 4628 --- [           main] c.mylab.cromero.controller.Application   : Started Application in 10.198 seconds (JVM running for 10.803)
2015-11-17 11:36:36.887  INFO 4628 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/pizza]  : Initializing Spring FrameworkServlet 'dispatcherServlet'
2015-11-17 11:36:36.930 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Looking up handler method for path /
2015-11-17 11:36:36.931 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Did not find handler method for [/]
2015-11-17 11:36:36.944  INFO 4628 --- [nio-9090-exec-1] c.m.c.c.controller.WebController         : home controller access
2015-11-17 11:36:36.978 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Looking up handler method for path /WEB-INF/views/template/homeTemplate.jsp
2015-11-17 11:36:36.978 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Did not find handler method for [/WEB-INF/views/template/homeTemplate.jsp]
2015-11-17 11:36:36.990 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Looking up handler method for path /404.html
2015-11-17 11:36:36.990 DEBUG 4628 --- [nio-9090-exec-1] o.s.b.a.e.mvc.EndpointHandlerMapping     : Did not find handler method for [/404.html]

error7.png

errror8.png

If i use terminal console with  mvn spring-boot:run

ok.png

0
Comment actions Permalink

Same reason, "WEB-INF" does not simply work out of the box in the IDE.
Please check the Spring Boot documentation, http://docs.spring.io/spring-boot/docs/1.2.7.RELEASE/reference/htmlsingle/#boot-features-jsp-limitations

0
Comment actions Permalink

I have just read this part of Spring boot documentation, because of this Spring boot limitation i could not use intellij to run my tiles app, i would use a terminal console to be able to run my app.

Thank you very much for your time and your patient resolving my problems.

0

Please sign in to leave a comment.