vidakovic commented on a change in pull request #1975:
URL: https://github.com/apache/fineract/pull/1975#discussion_r756009170



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/filter/TenantAwareBasicAuthenticationFilter.java
##########
@@ -59,33 +58,34 @@
  *
  * If multi-tenant and basic auth credentials are invalid, a http error 
response is returned.
  */
-@Service
+
 @Profile("basicauth")
 public class TenantAwareBasicAuthenticationFilter extends 
BasicAuthenticationFilter {
 
     private static boolean firstRequestProcessed = false;
     private static final Logger LOG = 
LoggerFactory.getLogger(TenantAwareBasicAuthenticationFilter.class);
 
-    private final BasicAuthTenantDetailsService basicAuthTenantDetailsService;
-    private final ToApiJsonSerializer<PlatformRequestLog> toApiJsonSerializer;
-    private final ConfigurationDomainService configurationDomainService;
-    private final CacheWritePlatformService cacheWritePlatformService;
-    private final NotificationReadPlatformService 
notificationReadPlatformService;
+    @Autowired

Review comment:
       A compromise here could be to use Lombok with 
"RequiredArgsConstructor"... then we can keep the same dependency injection 
strategy without being annoying (aka having to write all the constructor 
boilerplate code). Personally the "@Autowired" are OK for me... not sure if 
others have an opinion here.
   
   If we introduce Lombok (I really would like) then I prefer the combination 
of "@RequiredArgsConstructor" and final class attributes.
   
   My 2 cents.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to