From 50e4a68d28373695790bf7244372fc0bb78e235d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 19 Nov 2023 08:05:38 -0800 Subject: [PATCH] More classes to annotation. --- .../com/wisemapping/dao/LabelManagerImpl.java | 2 +- .../com/wisemapping/dao/MindmapManagerImpl.java | 2 +- .../com/wisemapping/dao/UserManagerImpl.java | 4 +++- wise-webapp/src/main/webapp/WEB-INF/web.xml | 1 - .../main/webapp/WEB-INF/wisemapping-model.xml | 17 ----------------- 5 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java index 01012bc8..92f39492 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/LabelManagerImpl.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Repository; import java.util.List; -@Repository +@Repository("labelManager") public class LabelManagerImpl implements LabelManager { @Resource diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java index 646d403e..4892391c 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/MindmapManagerImpl.java @@ -34,7 +34,7 @@ import org.springframework.stereotype.Repository; import java.util.Calendar; import java.util.List; -@Repository +@Repository("mindmapManager") public class MindmapManagerImpl implements MindmapManager { @Resource diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java index c71d89f8..d47bc41b 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java @@ -28,6 +28,7 @@ import org.hibernate.SessionFactory; import org.hibernate.query.SelectionQuery; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Repository; @@ -38,9 +39,10 @@ import java.util.concurrent.CopyOnWriteArraySet; @Repository public class UserManagerImpl implements UserManager { - @Resource + @Autowired private SessionFactory sessionFactory; + @Autowired private PasswordEncoder passwordEncoder; public void setEncoder(PasswordEncoder passwordEncoder) { diff --git a/wise-webapp/src/main/webapp/WEB-INF/web.xml b/wise-webapp/src/main/webapp/WEB-INF/web.xml index a724fbf6..4b04bc68 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/web.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/web.xml @@ -27,7 +27,6 @@ /WEB-INF/wisemapping-datasource.xml /WEB-INF/wisemapping-dao.xml /WEB-INF/wisemapping-service.xml - /WEB-INF/wisemapping-model.xml /WEB-INF/wisemapping-servlet.xml diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml deleted file mode 100644 index b56a8723..00000000 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file