From 02723131139806c761539a42a5fa80b68ecadee8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 29 Jun 2017 14:03:04 +0300 Subject: project structure: split server into jdbc + web --- .../src/main/java/com/juick/api/configuration/ApiSecurityConfig.java | 3 +-- juick-api/src/main/java/com/juick/api/controllers/Messages.java | 2 +- juick-api/src/main/java/com/juick/api/controllers/Notifications.java | 2 +- juick-api/src/main/java/com/juick/api/controllers/Others.java | 2 +- juick-api/src/main/java/com/juick/api/controllers/PM.java | 4 ++-- juick-api/src/main/java/com/juick/api/controllers/Post.java | 5 +---- juick-api/src/main/java/com/juick/api/controllers/Subscriptions.java | 2 +- juick-api/src/main/java/com/juick/api/controllers/Tags.java | 2 +- juick-api/src/main/java/com/juick/api/controllers/Users.java | 4 ++-- 9 files changed, 11 insertions(+), 15 deletions(-) (limited to 'juick-api/src/main/java/com') diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java b/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java index f1dcf30a..969ebd03 100644 --- a/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java +++ b/juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java @@ -1,6 +1,6 @@ package com.juick.api.configuration; -import com.juick.server.security.NotAuthorizedAuthenticationEntryPoint; +import com.juick.service.security.NotAuthorizedAuthenticationEntryPoint; import com.juick.service.UserService; import com.juick.service.security.JuickUserDetailsService; import com.juick.service.security.deprecated.RequestParamHashRememberMeServices; @@ -8,7 +8,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Messages.java b/juick-api/src/main/java/com/juick/api/controllers/Messages.java index 76bbb5be..0d77bb74 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Messages.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Messages.java @@ -9,7 +9,7 @@ import com.juick.server.util.HttpForbiddenException; import com.juick.service.MessagesService; import com.juick.service.TagService; import com.juick.service.UserService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Notifications.java b/juick-api/src/main/java/com/juick/api/controllers/Notifications.java index 2f0dc335..c121efb6 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Notifications.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Notifications.java @@ -9,7 +9,7 @@ import com.juick.server.util.HttpForbiddenException; import com.juick.service.MessagesService; import com.juick.service.PushQueriesService; import com.juick.service.SubscriptionService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Others.java b/juick-api/src/main/java/com/juick/api/controllers/Others.java index 722653a5..4f646af8 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Others.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Others.java @@ -6,7 +6,7 @@ import com.juick.server.util.HttpForbiddenException; import com.juick.server.util.HttpNotFoundException; import com.juick.service.PMQueriesService; import com.juick.service.UserService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/juick-api/src/main/java/com/juick/api/controllers/PM.java b/juick-api/src/main/java/com/juick/api/controllers/PM.java index 9faf05ea..f4bf2763 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/PM.java +++ b/juick-api/src/main/java/com/juick/api/controllers/PM.java @@ -6,8 +6,8 @@ import com.juick.server.util.HttpBadRequestException; import com.juick.server.util.HttpForbiddenException; import com.juick.service.PMQueriesService; import com.juick.service.UserService; -import com.juick.util.UserUtils; -import com.juick.util.WebUtils; +import com.juick.server.util.UserUtils; +import com.juick.server.util.WebUtils; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Post.java b/juick-api/src/main/java/com/juick/api/controllers/Post.java index cbd5ac0c..ffabe9ad 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Post.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Post.java @@ -10,7 +10,7 @@ import com.juick.server.util.ImageUtils; import com.juick.service.MessagesService; import com.juick.service.SubscriptionService; import com.juick.service.UserService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; @@ -28,13 +28,10 @@ import rocks.xmpp.extensions.nick.model.Nickname; import rocks.xmpp.extensions.oob.model.x.OobX; import javax.inject.Inject; -import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import javax.servlet.http.HttpServletRequest; -import java.io.BufferedInputStream; -import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.net.URI; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Subscriptions.java b/juick-api/src/main/java/com/juick/api/controllers/Subscriptions.java index fcae3373..c4a214d9 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Subscriptions.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Subscriptions.java @@ -7,7 +7,7 @@ import com.juick.server.util.HttpForbiddenException; import com.juick.service.MessagesService; import com.juick.service.SubscriptionService; import com.juick.service.UserService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Tags.java b/juick-api/src/main/java/com/juick/api/controllers/Tags.java index 7b1ce313..ab2ee7ce 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Tags.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Tags.java @@ -4,7 +4,7 @@ import com.juick.User; import com.juick.server.helpers.TagStats; import com.juick.service.TagService; import com.juick.service.UserService; -import com.juick.util.UserUtils; +import com.juick.server.util.UserUtils; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/juick-api/src/main/java/com/juick/api/controllers/Users.java b/juick-api/src/main/java/com/juick/api/controllers/Users.java index 3805b2ef..b84f375f 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Users.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Users.java @@ -4,8 +4,8 @@ import com.juick.User; import com.juick.server.util.HttpForbiddenException; import com.juick.server.util.HttpNotFoundException; import com.juick.service.UserService; -import com.juick.util.UserUtils; -import com.juick.util.WebUtils; +import com.juick.server.util.UserUtils; +import com.juick.server.util.WebUtils; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -- cgit v1.2.3