Johnny.sh

Java and Spring Bits

Random bits of information forming into a honeycomb conceptualization of the language, runtime, and framework.

Finding Which Java Version

To find the version of Java used by a particular app, you can check the various gradle files. Look for this:

  sourceCompatibility = 1.8
  targetCompatibility = 1.8

FYI, java v8 is also known as 1.8.

Gradle

  • Versions of dependencies will go in build.gradle under the ext section.
  • The build.gradle also defines the tasks for gradle.
  • Default port in prod mode is 8080; in dev mode 9020
  • Port is specified in application.properties in server.port=8080

Spring

There is a built-in decorator called @Configuration. You use this to instantiate a configuration class, similar to Nest JS actually. Each configuration field could be a getter(injected with @Value) or a method (injected with @Bean).

Last modified: August 23, 2021
/about
/uses
/notes
/talks
/projects
/podcasts
/reading-list
/spotify
© 2022