Where can I find the Spring Documentation for Gradle Application Properties Configuration? - spring

Where can I find the Spring Documentation for Gradle Application Properties Configuration? Image below
enter image description here

The Spring properties documentation is scattered across several places, and it depends on which Spring components you're using.
It would be best to open your project with an IDE such as IntelliJ, which will help showing you the properties javadoc directly from your application.properties file.
For the common properties, see this link:
https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html

Spring Gradle Documentation
You can get started with this.

Related

What is the archetype to use to build a SpringBoot project?

For years, I've used Spring Initializr (at https://start.spring.io/) to create the initial SpringBoot application and then modify it to create the app. This works fine.
Is there a maven archetype I can use to create a SpringBoot app? Or is the Spring Initializr the only way to do this.
Searching I found this:
What archetype to choose for a simple java project
Which shows the command:
mvn archetype:generate -Dfilter=org.apache.maven.archetypes:
Which gives me a list of 14 items to choose from. None of them mention SpringBoot.
The closest match is org.apache.maven.archetypes:maven-archetype-webapp, so I tried it and it created a WebApp (*.war) which is not what I'm looking for.
The aim of the Maven archetype is for generating a project skeleton. The Spring Initialiser also does the same but I think you should find it more user friendly to use when compared to executing a maven archetype command.
If you insist to use maven archetype , you can simply search Github to see if there are people share their archetypes (search result at here)
If your aim is just to use command to generate a spring-boot project skeleton , Spring Initializr actually provide an HTTP API to do it.
Also you can checkout JHipster, which is another tool to generate a spring-boot project skeleton.
You could also use Spring Boot CLI to scaffold new Spring Boot projects:
spring init --dependencies=web,data-jpa my-new-project
It works just as Spring Initializr, but on the command line.
See section 2.4 "Initialize a New Project" on Spring Boot CLI documentation here: https://docs.spring.io/spring-boot/docs/current/reference/html/cli.html#cli.using-the-cli.initialize-new-project

How to use IDEA to auto complete YAML configurations

I am currently working on spring boot and exploring the spring configurations for spring cloud using YAML. I always copy and paste the whole configuration from some source to my project, is there a way that IDEA auto-completes or shows suggestions while writing the spring cloud configurations. please help.
You can use spring assistant plugin

Spring Tools 4 for Eclipse info about running app

I am new to Spring and trying to understand a few things. In spring docs read about spring tools and thought to give it a try.
I installed Spring Tools 4.9.0 from Eclipse Marketplace and use it to import a tutorial project (File > New > Other > Import Spring Getting Started Context). Run the app with Boot Dashboard and it works as it should.
Saw in some tutorial videos when the app runs annotations become greenish and if you hover over them you get info like bean id etc.
In my case nothing like that happens. Do i need to configure something in eclipse or am i missing something else?
Thanks in advance.
The feature you are referring to is the "Live Application Information", the user guide section for this is here: https://github.com/spring-projects/sts4/wiki/Live-Application-Information.
In order to have an app showing that live information in the tools, it has to have the spring boot actuators on the classpath: https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html.
Depending on the exact guide that you chose it might not have actuators on the classpath out-of-the-box. In that case, add the actuator dependency to your pom.xml file, do a "Maven -> Update Project" from the context menu and start the app again using the dashboard. Then the green live information highlights should appear.

Mapping missing in Intellij IDEA for Spring Boot application

I am using Spring Boot 2.3.4 , IntelliJ IDEA Ultimate version 2020.2.2 . (Example project can be found here https://github.com/ehmkah/springbootintellij ) I don't see the "mappings" sub-view in IntelliJ IDEA Services View for my springboot-application. It should be right to Health. There are several endpoints configured - they are working I see them in the browser. I guess something is not configured correctly, but I only see errors like
AM Error Loading Project: Cannot load facet Web in EventLog.
Where should I look for errors or are there any known incompatibilities?
Mappings tab as a feature requires Spring MVC bundled plugin. Please make sure it is enabled in Settings(Preferences) | Plugins.
Spring boot application mapping is only accessible with Intellij Ultimate
use plugin Endpoints Explorer, it works well with Intellij Community

Intellij Idea Spring Facet only recognizes resources with application.*

Question states it a lot. Is there a way to let any resource file named other than application.* to be scanned by spring facet?
Version of IntelliJ Idea is: 2017.1.3
Tagging Spring Boot in the question too, may be someone from that community knows configuration as well?
2017.2 allows this: Open Spring Facet, select Spring Boot autodetected fileset and click on "Customize Spring Boot" icon in toolbar and enter custom "spring.config.name" value in dialog.

Resources