Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

SpringBoot Demo

 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I just imported the Spring boot initializer zip file, unzipped it and imported it as a Maven project into my IntelliJ. I am getting a lot of errors and I don't know how to resolve those! It seems like Maven isn't dowloading anything.


  • Error:(3, 32) java: package org.springframework.boot does not exist
    Error:(4, 46) java: package org.springframework.boot.autoconfigure does not exist
    Error:(6, 2) java: cannot find symbol
     symbol: class SpringBootApplication
    Error:(10, 17) java: cannot find symbol
     symbol:   variable SpringApplication
     location: class com.example.demo.DemoApplication


  • Could someone please help? I thought it'd just be a simple import!!
     
    Prasanna Raman
    Ranch Hand
    Posts: 442
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I now got past this error. I had to go through proxy, so I added proxy in settings.xml file and it worked.

    Now I added a simple controller but still keep getting the error page:

    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

    Wed Dec 27 12:51:37 CST 2017
    There was an unexpected error (type=Not Found, status=404).
    No message available

    This is my controller:



    I am trying to access http://localhost:8080/hello. I see that the app is started

    2017-12-27 12:51:23.358  INFO 24196 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
    2017-12-27 12:51:23.478  INFO 24196 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
    2017-12-27 12:51:23.488  INFO 24196 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 5.157 seconds (JVM running for 5.665)
     
    Bartender
    Posts: 1868
    81
    Android IntelliJ IDE MySQL Database Chrome Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    There may be other lines in your logs, which is not shown, which tells you what the valid paths are.
    The lines could be something kind of like this:
    From these log lines I can tell that I can access the following paths:
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!