草庐IT

Spring-Boot

全部标签

java - 什么 IDE 用于 Spring Framework Web 应用程序?

在我们公司,我们正在转向Java。我们想使用Spring框架开发Web应用程序。我们进行了4天的培训,培训师使用基于Eclipse的Springsource工具套件向我们展示了Java。但是我以前使用NetBeans开发PHP应用程序。与使用SpringsourceToolSuite2.7.0相比,使用NetBeans7.0有什么损失?考虑到我们是Java新手,使用专用Springsource工具套件开发SpringFrameworkWeb应用程序真的值得吗?更新提供更多信息:我们想使用以下技术:-Spring框架3-JPA(hibernate)-Apachewicket-专家

java - 没有配置 CurrentSessionContext

抱歉英语不好。我从spring-boot1.1.8开始我的项目,遇到异常NoCurrentSessionContextconfigured,然后我做了一些搜索,添加属性org.hibernate.context.ThreadLocalSessionContext可以解决这个问题,但是如何使用java类配置此属性?更新:我改用Hibernate4.x方式来定义SessionFactory,还是报同样的错误,求助!使用java1.8和speingboot1.1.8这是我的pom.xmlUTF-81.8${basedir}/../..../org.springframework.bootsp

java - spring bean怎么可能有工厂方法但没有工厂?

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭9年前。Improvethisquestion在调查代码后我发现:这怎么可能?谢谢。

java - 导入 Spring 上下文注释时出错

当我在Spring上导入Controller注解时,出现以下错误:Theimportorg.springframework.stereotype.Controllerconflictswithatypedefinedinthesamefile这是我开始的web-MVC项目的(非常简单的)代码:packagecom.company.project.servlet;importorg.springframework.stereotype.Controller;@ControllerpublicclassController{publicStringexecute(){System.out.

java - 使用 REST 访问 JPA 数据失败 找不到合适的 HttpMessageConverter

我已经为此苦苦挣扎了一段时间,但找不到解决方案。我正在运行SpringBoot指南,使用REST访问JPA数据(http://spring.io/guides/gs/accessing-data-rest/)不工作。只要下载并运行它就可以正常运行,允许GET调用http://localhost:8080/people使用postman。但是,每当我尝试PUT或POST时,我都会收到以下错误{"cause":null,"message":"NosuitableHttpMessageConverterfoundtoreadrequestbodyintoobjectoftypeclasshe

java - Spring @Autowired 无法连接 Jpa 存储库

我显然在这里遗漏了一些东西。我正在制作一个简单的springboot应用程序,其中包含springdatajpa并面临以下错误:Causedby:org.springframework.beans.factory.NoSuchBeanDefinitionException:Noqualifyingbeanoftype[locassa.domain.repository.PersonRepository]foundfordependency:expectedatleast1beanwhichqualifiesasautowirecandidateforthisdependency.Dep

java - Spring Security Role Hierarchy 无法使用 Java Config

首先,我是JavaSpringFramework的新手。如果我没有提供足够的信息,请原谅我。我试图将RoleHierarchy添加到我的应用程序中,但它没有用。以下是我尝试过的代码。SecurityConfig.java//TheseconfigistrytosetupauserRoleHierarchy@BeanpublicRoleHierarchyroleHierarchy(){System.out.println("arrivepublicRoleHierarchyroleHierarchy()");RoleHierarchyImplr=newRoleHierarchyImpl(

java - 配置问题 : spring-security-web classes are not available. 你需要这些才能使用 <filter-chain-map>

我正在尝试使用Maven在我的springweb应用程序上运行一些单元测试。该应用程序安装并运行良好,它生成一个可部署的war文件一切正常(全部使用Maven)。我的测试类(位于src/test/java):@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations={"file:C:/myProjects/myWebapp/src/main/webapp/WEB-INF/applicationContext-test.xml"})@TransactionalpublicclassMyTest{...但是

java - Spring:如何使用@Value 注释注入(inject)内联字符串列表

这个问题在这里已经有了答案:ReadingaListfrompropertiesfileandloadwithspringannotation@Value(17个答案)关闭7年前。如何使用@Value注释注入(inject)字符串值列表。我正在使用Spring4.1.2。我试过:@Value(value="top,person,organizationalPerson,user")privateListuserObjectClasses然后基于springeldocumentationforinlinelists:@Value(value="{top,person,organizati

java - Spring 的Aspectj

当我尝试在spring中自动连接aspectj时出现以下错误org.xml.sax.SAXParseException:Theprefix"aop"forelement"aop:aspectj-autoproxy"isnotbound.我的appContext.xml条目看起来像..........关于如何消除此错误的一些帮助..不幸的是网站http://forum.springsource.org被网络防火墙阻止..任何快速帮助将不胜感激。这就是我添加行后得到的结果SEVERE:Exceptionsendingcontextinitializedeventtolistenerinst