英文:
Spring Boot Application.properties has no autocomplete suggestions
问题
我是一个Spring Boot初学者
我使用Spring Initializer创建了一个示范项目
在application.properties文件中,我想要修改服务器端口,但是编辑器不识别它
完全一无所知
问题是什么
英文:
I'm a spring boot beginner
I created a sample project using the spring initializer
in the application.properties I want to change the server. port but editor doesn't know that
doesn't know anything at all
what's the problem
答案1
得分: 5
InteliJ IDEA的Community Edition不支持application.properties的自动补全功能。这是Ultimate版的特性。
根据这个支持主题
> Spring Boot框架仅在IntelliJ IDEA的Ultimate版本中可用。它作为捆绑插件提供,并默认情况下已启用。
英文:
Community Edition of InteliJ IDEA doesn't support autocompletion for application.properties. It is ultimate edition feature.
From this support thread
> Spring Boot framework is available in the Ultimate edition of IntelliJ IDEA only. It comes as a bundled plugin and is enabled by default.
答案2
得分: 2
IntelliJ社区版不支持Spring Boot,因此您无法获得自动补全功能,这是一种“企业”功能(仅在IntelliJ企业版中支持)。
总的来说,有一个特殊的JSON文件,IntelliJ可以解析它(同样,只有企业版支持),根据在该文件中找到的信息,它可以为属性/YAML配置文件生成自动补全。
您还可以通过使用注解处理器为自己的配置文件创建这样的JSON:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
参见此教程作为示例,还有许多其他教程。但是再次强调,这一切仅在IntelliJ的企业版中有效。
英文:
IntelliJ community edition doesn't support spring boot hence you don't have autocompletion, its an "enterprise" feature (read supported only in the IntelliJ enterprise edition).
All-in-all, there is a special JSON file that IntelliJ can parse (again, only the enterprise edition) and based on the information found in this file it can produce auto-completion for the properties / YAML configuration files.
You can also create such a JSON for your own configuration files by using an annotation processor:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
See this tutorial for example, there are many others. But again, this all works only in the enterprise edition of IntelliJ.
答案3
得分: 0
<h4>你好</h4>
有一个适用于IntelliJ IDEA Community Edition的插件,可能会在自动完成和其他一些方面非常有帮助,这是它的网站:<a href="https://plugins.jetbrains.com/plugin/17747-spring-boot-assistant">Spring Boot Assistant</a>。<br>
您可以从上面的链接获取插件,或直接从IDE获取:<ul>
<li>转到文件 -> 设置(在Windows上为Ctrl + Alt + S)
<li>搜索“插件”
<li>进入市场
<li>搜索“Spring Boot Assistant”
<li>安装并重新启动您的IDE
<li>享受自动完成</ul><p>希望它能帮助您学习,继续加油,伙计 :D
英文:
<h4>Hello</h4>
There is a plugin for IntelliJ IDEA Community Edition which might be very helpful with autocomplete and few more things, here is it's website: <a href="https://plugins.jetbrains.com/plugin/17747-spring-boot-assistant">Spring Boot Assistant</a>.<br>
You can get the plugin from the link above or directly from the IDE:<ul>
<li>go to File -> Settings (Ctrl + Alt + S on Windows)
<li>search for "Plugins"
<li>go to Marketplace
<li>search for "Spring Boot Assistant"
<li>install it and restart your IDE
<li>enjoy autocomplete</ul><p>Hope it will help you learning, keep working, mate
答案4
得分: 0
对于那些仍在寻找IntelliJ IDEA社区版上自动补全功能的人,可以在此处找到一个插件。
> 此插件为Spring Boot配置文件(application.yml、application.properties)添加了自动补全支持。
我已经测试过了,它在这里的截图中展示出正常工作。
英文:
For those who are still looking for the autocomplete feature on the IntelliJ IDEA Community Edition, there is a plugin for that found here.
> This plugin adds auto-completion support for Spring Boot configuration files (application.yml, application.properties).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论