maven+jetty,提示 Transaction manager not found
[INFO] --- jetty-maven-plugin:8.1.14.v20131031:run (default-cli) @ CMS-mweb ---
[INFO] Configuring Jetty for project: CMS-mweb Maven Webapp
[INFO] webAppSourceDirectory not set. Defaulting to E:\MyWorkspace\CMS-mweb\src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = E:\MyWorkspace\CMS-mweb\target\classes
[INFO] Context path = /cms
[INFO] Tmp directory = E:\MyWorkspace\CMS-mweb\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] web.xml file = file:/E:/MyWorkspace/CMS-mweb/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = E:\MyWorkspace\CMS-mweb\src\main\webapp
2014-02-26 18:02:49.925:INFO:oejs.Server:jetty-8.1.14.v20131031
2014-02-26 18:02:50.941:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-02-26 18:02:55.050:INFO:/cms:No Spring WebApplicationInitializer types detected on classpath
2014-02-26 18:02:55.347:INFO:/cms:Initializing Spring root WebApplicationContext
2014-02-26 18:02:57.535:INFO:/cms:Initializing Spring FrameworkServlet 'cms'
2014-02-26 18:02:58.207:WARN:oejsh.RequestLogHandler:!RequestLog
2014-02-26 18:02:58.238:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8888
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.
Maven构建的小项目,但是jetty:run启动后提示了上述的警告,
然后更新、删除操作时候,不能执行,查询没有问题?
请教各位如何解决这个问题?
(网上有说 设置web.xml 的metadata-complete="true",但是好像没效果)
------解决方案--------------------service层加上事务控制
可对整个service或某个单独的方法进行事务控制
都是加上@Transactional注解