我没有任何其他问题与Java和STS启动正常,但当我尝试运行我的应用程序"Run as Spring Boot App"(或任何样本),控制台是空的长达5分钟,然后我得到熟悉的"春天启动"ASCII艺术.然后它工作正常.
使用STS,如果我"Rest Service"使用最新的Spring Boot 导入Getting Started项目并选择"Run As Spring Boot App",它会启动,然后立即关闭.
查看调试日志,Spring出于某种原因决定该项目不是Web应用程序,但我不知道为什么.
如果我从Spring Boot切换1.1.1.RELEASE到1.0.1.RELEASE,项目按预期工作,并找到默认的Tomcat嵌入式服务器.
我在1.1.1发行说明中找不到任何暗示存在配置更改或其他内容的内容?
更新:重现和记录输出的步骤
我正在运行STS 3.6.0.M1和Spring 4.0.5以及Spring Boot 1.1.1.通过执行以下操作,我可以轻松地重现这一点:
这是输出:
:: Spring Boot :: (v1.1.1.RELEASE)
2014-06-14 11:08:34.226 INFO 47728 --- [ main] hello.Application : Starting Application on localhost with PID 47728 (/Users/pdrummond/src/sts/gs-rest-service-complete/target/classes started by pdrummond in /Users/pdrummond/src/sts/gs-rest-service-complete)
2014-06-14 11:08:34.257 INFO 47728 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@802b249: startup date [Sat Jun 14 11:08:34 …Run Code Online (Sandbox Code Playgroud)据我了解,当我执行nrepl-jack-inREPL时,会加载project.clj中定义的所有依赖项.如果我然后更新project.clj以添加新的依赖项,我是否需要终止服务器并重新运行nrepl-jack-in或者是否有办法更新当前REPL中的依赖项?
任何人都可以给我一个例子,或者告诉我如何Tabbed Dialog在Android中创建一个简单的每个标签的内容Fragments?我发现的所有示例/教程都是关于片段和标签,但没有具体的内容DialogFragments.
该文档FragmentTabHost显示了如何使用正常片段创建选项卡getChildFragmentManager().我假设当片段是a DialogFragment时它也应该工作但是当我尝试它时我得到:
java.lang.IllegalStateException: Fragment does not have a view at android.support.v4.app.Fragment$1.findViewById(Fragment.java:1425)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:901)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
...
Run Code Online (Sandbox Code Playgroud)
这是我设置视图的代码(然后传递给AlertDialog.setView()):
private void setupView(View v) {
mTabHost = (FragmentTabHost) v.findViewById(android.R.id.tabhost);
mTabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
mTabHost.addTab(mTabHost.newTabSpec("tab1").setIndicator("Tab1"),
MyDialogFragment.class, null);
}
Run Code Online (Sandbox Code Playgroud) android android-fragments android-dialogfragment fragment-tab-host android-nested-fragment
我正在评估Heroku上的Spring 4,到目前为止我对两者都印象深刻.
但是,我无法让我的Spring Boot应用程序在Heroku上运行.一切都运行正常,除了Postgresql(我只是得到Connection Refused错误).
问题肯定与我如何设置有关,DataSource但到目前为止我一直在遵循试错法!我不确定我应该如何设置Heroku的数据源DATABASE_URL,我找不到任何示例.
我发现弹簧云偶然通过搜索谷歌看起来很有前途,但它并没有解释有关的任何事情DATABASE_URL.另外,它甚至没有在Spring.IO上提及,所以我想知道它是否甚至是生产使用的选项?
I am trying to configure web socket support in Spring 4 using RabbitMQ as the external broker, but as soon as I switch to RabbitMQ, I get the following error on start-up in the client:
'/user/queue/changes' is not a valid destination.
Valid destination types are: /temp-queue, /exchange, /topic, /queue, /amq/queue, /reply-queue/.
Run Code Online (Sandbox Code Playgroud)
On the server I am using convertAndSendToUser and this works fine with the simple broker, but as soon as I switch to RabbitMQ, I get this error. Note that …
我正在使用Spring的Eclipse,STS版本3.6.0,它基于Eclipse Kepler SR2(4.3.2).Eclipse性能通常非常好,如果我保存Java文件,它是瞬时的.但是,当我尝试保存JavaScript文件时,保存可能需要3秒钟,整个IDE在此过程中被冻结,这非常烦人,实际上会影响生产力.我已经做了一些挖掘,显然,有一些验证器,这会导致减速,所以我试图关闭这些,但它没有任何区别.
CSS和HTML文件类型也会出现问题,因此我确信它特别适用于Web开发插件.任何人都可以提出一种解决方法吗?如果有必要,我愿意禁用功能以改善保存时间.
注意:我使用STS的库存版本 - 没有额外的插件.
我在Clojure中编写了一个简单的设计auth函数,它对我来说根本不是很惯用.有没有更好的方式来写这个:
(defn auth [username password]
(let [user-record (credential-fn username)]
(if (and user-record (verify-pw password))
(let [user-record (dissoc user-record :password)]
{:status 200 :body user-record})
{:status 401})))
Run Code Online (Sandbox Code Playgroud)
我认为有可能摆脱if使用if-let,但是if正在做一个布尔检查,我需要绑定user-record?卡住!
注意:dissoc正在删除密码,user-record因此它不会在正文中返回.
spring ×5
spring-boot ×4
clojure ×2
java ×2
android ×1
eclipse ×1
emacs ×1
heroku ×1
idiomatic ×1
postgresql ×1
spring-4 ×1
spring-ide ×1