草庐IT

spring-transactions

全部标签

java - hsqldb 的 spring applicationContext 中的数据源

我正在我的应用程序中加载Spring3.2.2,在applicationContext.xml中:但是,我收到以下异常:344[main]INFOorg.springframework.beans.factory.support.DefaultListableBeanFactory-Destroyingsingletonsinorg.springframework.beans.factory.support.DefaultListableBeanFactory@120d62b:definingbeans[org.springframework.aop.config.internalAu

xml - Spring Servlet-Context.xml 报错Cannot locate BeanDefinitionParser for element [import]

我有一个由Eclipse中的STS插件生成的spring项目,我试图导入一个与servlet-context.xml位于同一目录中的spring-ws文件,但出现错误。下面列出了servlet上下文文件我得到的错误是在此行找到多个注释:配置问题:找不到元素[import]的BeanDefinitionParser 最佳答案 在您的XML中,您已将spring-mvc.xsd作为前导。mvc命名空间不包含元素import,但是spring-beans.xsd包含。您需要将beans前缀添加到import元素以使其工作。就像来自同一命名

xml - 与元素类型 "xsi"关联的属性 "xsi:schemaLocation"的前缀 "beans"未绑定(bind)。在tomcat上运行spring时

请帮助我摆脱这个错误,我没有得到我该如何解决这个问题?这是我的web.xml和Dispatcher-servlet.xml文件:AngSpringindex.htmlindex.htmindex.jspdefault.htmldefault.htmdefault.jspSpringMVCAngularApplicationDispatcherorg.springframework.web.servlet.DispatcherServlet1Dispatcher/*和Dispatcher-servlet.xml:/WEB-INF/jsp/.jsp尝试在tomcat上运行应用程序时出现此错

java - Spring Security XML 配置与 Java 配置

我有SpringSecurity的XML配置,这是我通过大量指南完成的。它应该拦截url并使用自定义过滤器提供ldap身份验证管理器的身份验证。所以这里是:现在我正在尝试用JavaConfig重写它。但我不知道如何在那里使用自定义过滤器。有.addFilterBefore但我不能只把before="LAST"或before="PRE_AUTH_FILTER"放在那里。因为没有这样的东西。我该如何重写它?@Configuration@EnableWebSecuritypublicclassSecurityConfigextendsWebSecurityConfigurerAdapter{

java - 在 Spring Security Oauth2 中使用 RemoteTokenServices 配置资源服务器

我正在尝试使用springsecurityoauth2实现授权服务器和资源服务器。到目前为止,我已经设法设置了授权服务器,并且由于我不想共享jdbctoken存储,所以我正在尝试使用remoteTokenService来验证我的token@资源服务器。但是每次我尝试访问资源REST方法时都会收到401错误。由于项目的性质,我正在使用xml配置来设置spring安全性。我试过另一个使用Javaconfig的示例项目,它运行良好。这是我在资源服务器中的配置。网络.xmlrest-projectrestprojectImplementationcontextConfigLocationcla

java - Spring LDA : Problem with contextSource Bean

我正在编写一个使用LDAP的Spring应用程序。这是我的beans文件。这是我的beans创建代码:ApplicationContextfac=newClassPathXmlApplicationContext("a/b/c/ldap.xml");HelloLdaphello=(HelloLdap)fac.getBean("helloLdap");这是我的错误信息:Exceptioninthread"main"org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'contex

java - Spring XML View 解析器配置

我正在尝试使用spring-mvc将一些模型数据输出到pdf。它不起作用,我想知道是否有人可以提供一些建议。我有一个包含以下内容的spring-servlet.xml文件:/WEB-INF/spring-pdf-views.xml在spring-pdf-views.xml文件中我有这个:这是我的MyPDFView类:publicclassMyPDFViewextendsAbstractPdfView{@OverrideprotectedvoidbuildPdfDocument(Mapmodel,Documentdocument,PdfWriterwriter,HttpServletRe

Spring-Gateway与Nacos相关配置

文章目录一、NacosConfig配置项动态刷新1、介绍与环境引入1.1简介1.2环境引入2、NacosConfig本地配置项2.1配置项举例2.2配置项详解3、NacosConfigServer文件配置4、动态配置推送二、基于Nacos实现GateWay动态路由1、前言2、实现思路2.1思路分析2.2实现流程3、动态路由实战3.1自定义动态路由(法一)3.2自定义动态路由(法二)3.3配置创建与修改一、NacosConfig配置项动态刷新1、介绍与环境引入1.1简介Nacos官方手册:https://nacos.io/zh-cn/docs/quick-start.html动态刷新通过线上的配

java - Apache Camel/Spring DSL 中 header 值的 xpath 内的子字符串

我的流程是这样的,我的问题是我在第二个header上得到了错误的值://kred:assigment_GetRq/nrb//kred:assigment_GetRq/nrb/text()substring(${headers.nrbPE},3,6)${properties:apiEsb.assigment.bpCode}${headers.subNrbPE}=${headers.kod}日志:08:26:47,067|INFO|Esb|Assigment_Get||68-org.apache.camel.camel-core-2.6.0.fuse-03-01|headernrb:999

java - 与 XML 配置相比,为什么 Java Config 在 spring boot 中更受欢迎?

我是spring-boot的新手。我正在使用spring-boot构建一个基于rest的应用程序,并且正在使用spring-security设置安全性。据我所知,我可以使用xml配置或Java配置来设置spring-security。但是,我在spring-boot文档中发现了以下内容。https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-configuration-classes.html它赞成使用JavaConfig而不是XML配置。Java配置的更改需要重新编译。然而,这让我想到为什么文