Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are confusing root web <a href="https://stackoverflow.com/questions/3652090/difference-between-applicationcontext-and-spring-servlet-xml-in-spring">application context with Servlet context</a>. Your DAO classes and Services belong to the root application context and should be declared there(the same goes to the transaction manager).</p> <p><code>&lt;tx:annotation-driven/&gt;</code> in your case is declared in the root application context, and it can't modify beans in the servlet context to create transaction proxies with AOP.</p> <p>If you use autoscanning, you should consider putting your classes to the respective java packages and configure <code>&lt;context:component-scan&gt;</code> to use more specific filters, like it's described <a href="https://stackoverflow.com/questions/5269450/multiple-packages-in-contextcomponent-scan-spring-config">here</a>. </p> <p><strike><strong>update</strong>:it seems that <code>&lt;component:scan</code> is fine - it's likely the missing transaction manager in the root context. </strike></p> <p><strong>update 2</strong>: to avoid the creation of the DAO bean in the servlet context you need either</p> <ul> <li>to add <code>use-default-filters="false"</code> to your <code>&lt;context:component-scan&gt;</code> in the servlet spring config or </li> <li>to move your controllers to a more specific base package and change <code>&lt;context:component-scan&gt;</code> in the servlet spring config to reflect the changes.</li> </ul> <p><strong>update 3</strong> to resolve the dependency on repository, you should add <code>repository</code> package to auto scan in the root context.</p> <p>p.s. also don't forget that package names in java should <a href="http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html" rel="nofollow noreferrer">conform to convention</a> </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload