在maven项目中使用spring boot(using spring boot in a maven project)
我正在开始一个带有maven和spring boot的新项目,并且在一开始就遇到了问题:-)最后它现在有效,但我想知道我做错了什么:
我只是想通过添加maven依赖项来将spring引导添加到我的项目中:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-build</artifactId> <version>1.5.9.RELEASE</version> </dependency>
可以在Maven-Central找到。 这不起作用。
然后我发现,正确的依赖关系没有“-build”:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot</artifactId> <version>1.5.9.RELEASE</version> </dependency>
我想了解,问题出在哪里:
我是否在错误的地方获取信息并且maven central错了? 或者为什么我从一开始就遇到问题。 什么是正确的方法?
I am starting a new project with maven and spring boot and got problems already at the very beginning :-) Finally it works now, but I would like to know what I did wrong:
I simply wanted to add spring boot to my project by adding the maven dependencies:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-build</artifactId> <version>1.5.9.RELEASE</version> </dependency>
which can be found in Maven-Central. This doesn't work.
Then I found out, that the correct dependency is without "-build":
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot</artifactId> <version>1.5.9.RELEASE</version> </dependency>
I would like to understand, where is the problem:
Do I get the info on the wrong place and maven central is wrong ? Or why did I get problems from beginning. What is the correct aproach ?
原文:https://stackoverflow.com/questions/47825663
相关问答
更多-
Xcode - >编辑器 - >显示原始标记 Xcode -> Editor -> Show Raw Markup
-
Swift 3 Playground URLSession异步中的UIImage Gray(A UIImage Gray in Swift 3 Playground URLSession Async)[2023-03-20]
我想出了你所看到的问题,并在这里创建了一个游乐场来说明: https : //github.com/dtweston/Bach.playground import UIKit import PlaygroundSupport // Toggle the code below to fade the image out or display it properly //PlaygroundPage.current.needsIndefiniteExecution = true let image = UI ... -
确保您的图像在Playground Resource文件夹中,然后从Xcode编辑菜单中选择Show Rendered Markup。 Make sure that your image in the Playground Resource folder and then select the Show Rendered Markup from the Xcode editing menu.
-
Xcode应该是.playground文件的默认开放应用程序。 所以下面的命令应该工作: open trees.playground 如果它仍然没有,你可以强迫终端用Xcode打开它,如下所示: open -a Xcode trees.playground 为了让你理解上面提到的命令,我将分解它: open [Open something] -a [With application] Xcode [Name of desired application] trees.playground [This f ...
-
我想说这是Xcode 8.3中的一个错误。 它在Xcode 8.3中给了我相同的结果。 我刚刚在Xcode 8.2.1中尝试了你的代码,它在快速浏览窗口中绘制了一条线。 这应该作为错误报告提交给Apple。 在此期间,要么使用较旧版本的Xcode,要么在视图中嵌入贝塞尔曲线路径并快速查看视图。 I would say this is a bug in Xcode 8.3. It gave me the same result in Xcode 8.3. I just tried your code in X ...
-
Xcode 8.2 Playground中描述的“PAGE”格式是什么?(Which is the format described 'PAGE' in Xcode 8.2 Playground?)[2022-11-02]
这是用于注释文档的标记语言。 这就是Apple说:“游乐场标记包括标题和其他元素的页面级格式化,格式化字符跨度,显示内嵌图像以及其他一些功能。” 小例子: 原始和渲染标记 要从raw更改为渲染,可以从Xcode编辑菜单中选择Show Rendered Markup。 游乐场中的标记确实是创建精彩文档的强大工具。 您可以阅读完整的Apple文档 This is Markup language for annotating a document. That is Apple says: "Markup for ... -
在Mac上,Xcode的“Playgrounds”对于快速实验非常有用,但由于它们的性质,对于“真实”任务来说非常慢。 如果您的代码长度超过几页,和/或涉及使用UI,就像使用SpriteKit一样,Playground可能变得非常慢,有时甚至没有响应。 “Playgrounds”是Xcode的一部分,运行在iOS模拟器之上 - 这就是他们在“Assitant Editor”中显示图形和UI的方式。 iOS模拟器也不是很快就知道。 另一方面,iOS上的“Swift Playgrounds”是一个完全不同的应用 ...
-
最好不要使用多部分MIME,特别是当您考虑其他认知服务属性(即Face和Emotion)不支持它时。 let subscriptionKey = "YOUR-KEY" let image = #imageLiteral(resourceName:"monkey.jpg") let imageData = UIImageJPEGRepresentation(image, 1.0)! let endpoint = ("https://westus.api.cognitive.microsoft.com/vi ...
-
我试着评论我的大部分代码,只是有一个打印(“Hello World”)行,但这也产生了同样的错误。 所以我打开了一个新的游乐场并将我的代码复制到其中。 它现在运行。 不是一个非常令人满意的解决方案,但至少它允许我继续工作。 我认为我的操场文件已损坏。 I tried commenting out most of my code and just having a print("Hello World") line, but that produced the same error as well. So I ...
-
UINavigationBar不会在Playground中显示项目部分(UINavigationBar doesn’t display item parts in Playground)[2022-06-15]
适用于我。 你试过打开实时视图吗? 你是否设置了操场页面的liveView? Works for me. Have you tried to open the Live View? Have you set the liveView of the playground page?