java - Spring NoSuchBeanDefinitationException throw after exporting jar file -
I have spring project to me and I can get Spring bean spring terms prior to export JAR file. I export the jar file and run that jar file on the CRD. I found the Edit In Beam in the spring configuration file When I tested this project with Jebis IDE, it will also have fully functional but when I export project in the jar file and run the CMD. I got the following error My project is zip file late update I'm sorry to do However, a specific problem statement to answer is very wide, so you can do the following: And if something jumps out, trace your whole stack and not just the piece and also how your jar is structured so paste we see the same big picture as you do . NoschBean Definition Exceptions . Project Spring Bean can not be found in the spring configuration file
& lt; Context: component-scan & gt; I used to know what is the problem?
Package Com Example. User Profile; @Service ( "UserProfileManager") applies @Transactional public square UserProfileManagerImpl UserProfileManager {@Autowired private UserProfileDao userProfileDao;
& lt; Reference: component-scan base-package = "com.example" /> & Lt; Tx: annotation-driven transaction-manager = "transaction manager" /> & Lt; Bean class = "org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" /> & Lt; Bean id = "transactionManager" class = "org.springframework.orm.hibernate4.HibernateTransactionManager" P: sessionFactory- ref = "sessionFactory" / & gt; & Lt; Bean id = "data source" class = "org.springframework.jdbc.datasource.DriverManagerDataSource" P: DriverClassName = "ComkmysqlkjdbckDriver" P: url = "JDBC: mysql: // localhost: 3309 / test "P: Username =" Route "page: Password =" Basic "/> & Lt; Bean id = "sessionFactory" class = "org.springframework.orm.hibernate4.LocalSessionFactoryBean" & gt; & Lt; Property Name = "Data Source" Riff = "Data Sources" / & gt; & Lt; Property Name = "Configuration Location" & gt; & Lt; Price & gt; Hibernate.cfg.xml & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; Property Name = "Hibernate Properties" & gt; & Lt; Theater Content & gt; & Lt; Prop key = "hibernate.dialect" & gt; Org.hibernate.dialect.MySQLDialect & lt; / Prop & gt; & Lt; Prop key = "hibernate.show_sql" & gt; True & lt; / Prop & gt; & Lt; Prop key = "hibernate.format_sql" & gt; True & lt; / Prop & gt; & Lt; Prop key = "hibernate.hbm2ddl.auto" & gt; Update & lt; / Prop & gt; & Lt; / Theater & gt; & Lt; / Property & gt; & Lt; / Bean & gt;
Comments
Post a Comment