Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!

Philip Fuster

+ Follow
since Nov 02, 2016
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philip Fuster

Hello everybody!

I am relatively new to the Spring framework and Gradle, and I am currently working on a multi module project. I'm having an issue with my Run Configuration. I feel it may stem from my build.gradle files being incorrect. I am seeing two run configurations, TripdatApplication and TripdatApplication(1) [devtools]. tripdat is just the name of my project. The run config TripdatApplication is not working and it is linked to my TripdatApplication class, where my @SpringBootApplication annotation is at. I have my project on github here:

I would really appreciate it if someone could look it over (Maybe checking the build.gradle files for each project and my config folder in my web module.) If there is anything I can provide that will clarify my question or anything please let me know!

Thank you so much for your time!


Campbell Ritchie wrote:
What does lvl mean? Please read this FAQ. Such abbreviations can seriously confuse non‑English‑speakers who rely on translation tools.
The term top‑level class has nothing to do with the class having a main method or not. It means the class is not inside another class.
If you are writing Java®, beware of what you learnt in C++. The two languages are different and things which appear to be the same can behave differently.

Thank you!

I will be sure to keep everything you have stated in mind!
2 years ago

Fred Kleinschmidt wrote:Yes, you should create the instance parameters in your constructor. For example, you might have:

Thank you!
A follow up question here.
For all data members that are not primitives I must use the new operator to initialize them before use outside of the class and in a top lvl class that runs the program correct?
2 years ago

So I have a class which has 2 other programmer defined classes in it as private data members. (The classes have separate files)

In c++ I read from various sources that doing any work(like calling another constructor) in a constructor is not a good idea because of compilation at run time and some code not being compiled yet. (Something to that affect)

I was wondering when the best time to initialize these data members that are programmer defined classes would be, if not in the constructor? (Maybe that issues does not apply to Java but, I think it would)

I ask because the constructor of the top level class will take parameters that are needed to initialize these data members.

Thank you!

This is my first time ever posting in a forum haha
Feels empowering!

2 years ago