Java 创建名为';healthScoreCardController';:自动关联依赖项的注入失败
我正在尝试运行一个小样本健康服务项目,但它抛出了以下我无法解决的错误:Java 创建名为';healthScoreCardController';:自动关联依赖项的注入失败,java,spring,hibernate,web-services,spring-mvc,Java,Spring,Hibernate,Web Services,Spring Mvc,我正在尝试运行一个小样本健康服务项目,但它抛出了以下我无法解决的错误: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ldap="http://www.springframework.org/schema
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ldap="http://www.springframework.org/schema/ldap"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/ldap
http://www.springframework.org/schema/ldap/spring-ldap.xsd">
<context:component-scan base-package="com.clinic.healthscorecard" />
<context:annotation-config />
<mvc:annotation-driven />
<mvc:default-servlet-handler />
<aop:aspectj-autoproxy />
<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="" />
<property name="suffix" value=".jsp" />
</bean>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="90000000" />
</bean>
<bean id="consumerDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:jboss/datasources/CONSUMERDBDS" />
</bean>
<bean id="consumerSessionFactory" primary="true"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="consumerDataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.default_schema">consumer_db</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="packagesToScan" value="com.clinic.healthscorecard.model" />
</bean>
<bean id="globalDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:jboss/datasources/GlobalDS" />
</bean>
<bean id="globalSessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="globalDataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.default_schema">public</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="packagesToScan" value="com.clinic.healthscorecard.global.model" />
</bean>
<tx:annotation-driven transaction-manager="consumerTransactionManager" />
<tx:annotation-driven transaction-manager="globalTransactionManager" />
<bean id="consumerTransactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="consumerSessionFactory" />
<qualifier value="consumerSessionFactory" />
</bean>
<bean id="globalTransactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="globalSessionFactory" />
<qualifier value="globalSessionFactory" />
</bean>
<!-- Aspects -->
<bean id="validationAspect" class="com.clinic.healthscorecard.utility.ValidationAspect" />
<bean id="simpleDirContextAuthenticationStrategy"
class="org.springframework.ldap.core.support.SimpleDirContextAuthenticationStrategy" />
<ldap:context-source url="ldap://52.66.84.156:389"
base="dc=hpp,dc=com" username="cn=Directory Manager,dc=hpp,dc=com"
password="secret" authentication-strategy-ref="simpleDirContextAuthenticationStrategy"
native-pooling="true" />
<ldap:ldap-template id="ldapTemplate" />
<bean id="swagger2Config"
class="springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration" />
<mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/" />
<mvc:resources mapping="/webjars/**"
location="classpath:/META-INF/resources/webjars/" />
</beans>
显示错误:
18:09:35,209 INFO [springfox.documentation.spring.web.OperationsKeyGenerator] (ServerService Thread Pool -- 72) Cache key generated: /updateMyWeightGoal.com.thp.consumer.logger.api.controller.ConsumerWeightController.updateMyWeightGoal.DefaultGenericTypeNamingStrategy
18:09:35,209 INFO [springfox.documentation.spring.web.caching.CachingAspect] (ServerService Thread Pool -- 72) Caching aspect applied for cache operations with key /updateMyWeightGoal.com.thp.consumer.logger.api.controller.ConsumerWeightController.updateMyWeightGoal.DefaultGenericTypeNamingStrategy
18:09:35,209 INFO [springfox.documentation.swagger.web.ClassOrApiAnnotationResourceGrouping] (ServerService Thread Pool -- 72) Group for method updateMyWeightGoal was consumer-weight-controller
18:09:35,210 INFO [springfox.documentation.swagger.web.ClassOrApiAnnotationResourceGrouping] (ServerService Thread Pool -- 72) Group for method updateMyWeightGoal was consumer-weight-controller
18:09:35,223 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 72) WFLYUT0021: Registered web context: /ConsumerLogger
18:09:35,236 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "healthscorecard.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./healthscorecard" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./healthscorecard: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.service.HealthScoreCardService com.thp.clinic.healthscorecard.controller.HealthScoreCardController.healthScoreCardService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.service.HealthScoreCardService com.thp.clinic.healthscorecard.controller.HealthScoreCardController.healthScoreCardService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.service.HealthScoreCardService com.thp.clinic.healthscorecard.controller.HealthScoreCardController.healthScoreCardService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
Caused by: java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./healthscorecard"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
18:09:35,304 INFO [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010: Deployed "healthscorecard.war" (runtime-name : "healthscorecard.war")
18:09:35,305 INFO [org.jboss.as.server] (ServerService Thread Pool -- 36) WFLYSRV0010: Deployed "ConsumerLogger.war" (runtime-name : "ConsumerLogger.war")
18:09:35,306 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./healthscorecard: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./healthscorecard: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.service.HealthScoreCardService com.thp.clinic.healthscorecard.controller.HealthScoreCardController.healthScoreCardService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthScoreCardServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.thp.clinic.healthscorecard.dao.HealthScoreCardDao com.thp.clinic.healthscorecard.service.HealthScoreCardServiceImpl.healthScoreCardDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HealthScoreCardDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.thp.clinic.healthscorecard.dao.HealthScoreCardDaoImpl.factory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerSessionFactory' defined in ServletContext resource [/WEB-INF/healthscorecard-servlet.xml]: Cannot resolve reference to bean 'consumerDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumerDataSource': Post-processing of the FactoryBean's object failed; nested exception is java.lang.IllegalArgumentException: warning can't determine implemented interfaces of missing type springfox.documentation.spring.web.caching.CachingAspect
[Xlint:cantFindType]
18:09:35,563 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9991/management
18:09:35,563 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9991
18:09:35,563 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 152589ms - Started 747 of 1005 services (2 services failed or missing dependencies, 434 services are lazy, passive or on-demand)
18:09:35,625 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0019: Stopped Driver service with driver-name = healthscorecard.war_org.postgresql.Driver_9_4
18:09:35,713 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment healthscorecard.war (runtime-name: healthscorecard.war) in 97ms
18:09:35,799 WARN [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
18:09:35,800 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0009: Undeployed "healthscorecard.war" (runtime-name: "healthscorecard.war")
18:09:35,801 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit."healthscorecard.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."healthscorecard.war".deploymentCompleteService]
service jboss.deployment.unit."healthscorecard.war".component."com.thp.clinic.healthscorecard.servlet.AppSessionFilter".START (missing) dependents: [service jboss.deployment.unit."healthscorecard.war".deploymentCompleteService]
service jboss.deployment.unit."healthscorecard.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."healthscorecard.war".deploymentCompleteService]
service jboss.deployment.unit."healthscorecard.war".component."org.springframework.web.servlet.DispatcherServlet".START (missing) dependents: [service jboss.deployment.unit."healthscorecard.war".deploymentCompleteService]
我的servlet xml是:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ldap="http://www.springframework.org/schema/ldap"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/ldap
http://www.springframework.org/schema/ldap/spring-ldap.xsd">
<context:component-scan base-package="com.clinic.healthscorecard" />
<context:annotation-config />
<mvc:annotation-driven />
<mvc:default-servlet-handler />
<aop:aspectj-autoproxy />
<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="" />
<property name="suffix" value=".jsp" />
</bean>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="90000000" />
</bean>
<bean id="consumerDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:jboss/datasources/CONSUMERDBDS" />
</bean>
<bean id="consumerSessionFactory" primary="true"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="consumerDataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.default_schema">consumer_db</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="packagesToScan" value="com.clinic.healthscorecard.model" />
</bean>
<bean id="globalDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="java:jboss/datasources/GlobalDS" />
</bean>
<bean id="globalSessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="globalDataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.default_schema">public</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="packagesToScan" value="com.clinic.healthscorecard.global.model" />
</bean>
<tx:annotation-driven transaction-manager="consumerTransactionManager" />
<tx:annotation-driven transaction-manager="globalTransactionManager" />
<bean id="consumerTransactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="consumerSessionFactory" />
<qualifier value="consumerSessionFactory" />
</bean>
<bean id="globalTransactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="globalSessionFactory" />
<qualifier value="globalSessionFactory" />
</bean>
<!-- Aspects -->
<bean id="validationAspect" class="com.clinic.healthscorecard.utility.ValidationAspect" />
<bean id="simpleDirContextAuthenticationStrategy"
class="org.springframework.ldap.core.support.SimpleDirContextAuthenticationStrategy" />
<ldap:context-source url="ldap://52.66.84.156:389"
base="dc=hpp,dc=com" username="cn=Directory Manager,dc=hpp,dc=com"
password="secret" authentication-strategy-ref="simpleDirContextAuthenticationStrategy"
native-pooling="true" />
<ldap:ldap-template id="ldapTemplate" />
<bean id="swagger2Config"
class="springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration" />
<mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/" />
<mvc:resources mapping="/webjars/**"
location="classpath:/META-INF/resources/webjars/" />
</beans>
org.hibernate.dialogue.PostgreSqlDialogue
消费者数据库
真的
org.hibernate.dialogue.PostgreSqlDialogue
公众的
真的
有人能帮我纠正一下,我在这里遗漏了什么吗?您使用的是哪个版本的Spring?@Plog:Spring 4.0可能值得更新到新版本。但我认为更重要的是你使用的是什么版本的Swagger 2?