aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-15 05:37:18 +0300
committerGravatar Vitaly Takmazov2017-10-15 19:50:15 +0300
commit9a4add44ecbd32dea6ac3d30fd81ae1ac82e3dbc (patch)
tree38b7a4ba01d1fc47841d3ba2787209b2b2a2de9e /juick-api/src/main/java/com
parentaeda9e3733e685f5069b5cfbb16272cd32073fa0 (diff)
api: ImagesService
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java3
-rw-r--r--juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java5
-rw-r--r--juick-api/src/main/java/com/juick/api/configuration/ApiSecurityConfig.java2
3 files changed, 7 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
index f77611e2..c78ea51a 100644
--- a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
+++ b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java
@@ -20,6 +20,8 @@ package com.juick.api.configuration;
import com.juick.api.ApiServer;
import com.juick.api.TelegramBotManager;
import com.juick.server.configuration.BaseWebConfiguration;
+import com.juick.service.ImagesService;
+import com.juick.service.ImagesServiceImpl;
import org.springframework.context.annotation.*;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -69,6 +71,7 @@ public class ApiAppConfiguration extends BaseWebConfiguration {
public ApiServer apiServer() {
return new ApiServer();
}
+
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java b/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
index fa025e56..8f9cb4ed 100644
--- a/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
+++ b/juick-api/src/main/java/com/juick/api/configuration/ApiInitializer.java
@@ -17,7 +17,6 @@
package com.juick.api.configuration;
-import com.juick.configuration.DataConfiguration;
import org.apache.commons.codec.CharEncoding;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@@ -32,13 +31,13 @@ public class ApiInitializer extends AbstractAnnotationConfigDispatcherServletIni
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[]{
- ApiSecurityConfig.class, DataConfiguration.class, MessengerConfiguration.class
+ ApiSecurityConfig.class
};
}
@Override
protected Class<?>[] getServletConfigClasses() {
- return new Class<?>[]{ ApiAppConfiguration.class };
+ return new Class<?>[]{ MessengerConfiguration.class };
}
@Override
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 e4ae4b80..7e3f3345 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
@@ -24,6 +24,7 @@ import com.juick.service.security.deprecated.RequestParamHashRememberMeServices;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
@@ -48,6 +49,7 @@ import java.util.concurrent.TimeUnit;
@Configuration
@EnableWebSecurity
@PropertySource("classpath:juick.conf")
+@Import(ApiAppConfiguration.class)
public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${auth_remember_me_key}")
private String rememberMeKey;