Skip to content
Snippets Groups Projects
Commit 2c5aa223 authored by Christoph Thelen's avatar Christoph Thelen
Browse files

Fix caching: Annotations on CouchDBDao were not working

At least caching of learning progress responses
did not work since commit a59eb75f on March, 6th.

While the exact origin of this problem is unclear,
it seemed like Spring was creating more than one
databaseDao bean. One of these beans had no
working caching annotations.
parent 3160ba15
No related merge requests found
......@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thm.arsnova.dao;
package de.thm.arsnova.cache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
......@@ -24,6 +24,11 @@ import org.springframework.stereotype.Component;
import de.thm.arsnova.events.NovaEvent;
import de.thm.arsnova.events.NovaEventVisitor;
/**
* Listener registration for the cache buster.
*
* Note that this class is necessary in order for the annotations to work.
*/
@Component
public class CacheBustListener implements ApplicationListener<NovaEvent> {
......
......@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thm.arsnova.dao;
package de.thm.arsnova.cache;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Component;
......
......@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thm.arsnova.dao;
package de.thm.arsnova.cache;
/**
* This interface is used as a tag to make Spring dependency injection happy...
......
/**
* Classes and interfaces related to caching
*/
package de.thm.arsnova.cache;
\ No newline at end of file
......@@ -23,7 +23,7 @@
<property name="fileEncoding" value="UTF-8" />
</bean>
<context:component-scan base-package="de.thm.arsnova.dao,de.thm.arsnova.events,de.thm.arsnova.security,de.thm.arsnova.services,de.thm.arsnova.config,de.thm.arsnova.domain" />
<context:component-scan base-package="de.thm.arsnova.dao,de.thm.arsnova.cache,de.thm.arsnova.events,de.thm.arsnova.security,de.thm.arsnova.services,de.thm.arsnova.config,de.thm.arsnova.domain" />
<context:annotation-config />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment