Could not run simple spring boot application() generated by STS tool -


i new java , spring, have latest sts tool , java 1.6, able create , run spring mvc project.

started looking in spring boot, created spring starter project selected 'web' , picked default

had multiple error in application.java file(see below) fixed adding jre in build path. try run getting run time exception (see below).

question : why ide not able add jre in build path spring boot? why still can't run application. missing configuration because of ide not generating correct project.

help appreciated.

thanks

*************** error in application.java multiple markers @ line - type java.lang.string cannot resolved. indirectly referenced required .class files - type java.lang.object cannot resolved. indirectly referenced required .class files - type java.lang.class cannot resolved. indirectly referenced required .class files

multiple markers @ line - occurrence of 'application' - implicit super constructor object() undefined default constructor. must define explicit


******** run time exception***********************

exception in thread "main" java.lang.noclassdeffounderror: demo/application caused by: java.lang.classnotfoundexception: demo.application  caused by: java.lang.classnotfoundexception: demo.application @ java.net.urlclassloader$1.run(urlclassloader.java: 202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.j ava:190) @ java.lang.classloader.loadclass(classloader.java:3 06) @ sun.misc.launcher$appclassloader.loadclass(launche r.java:301) @ java.lang.classloader.loadclass(classloader.java:2 47) 

you need update start class in pom.xml file.

in pom.xml below section , update correct location of start-class correct package.

<properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <start-class>com.demoapplication</start-class>     <java.version>1.7</java.version> </properties> 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -