Questions tagged [aspect]

An aspect is a module implemented in an Aspect-Oriented Programming language that contains code for a cross-cutting concern, like logging or security. For questions about the aspect ratio of images, use the aspect-ratio tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Code practice - Spring aop call service from Aspect class [closed]

I have a class that have multiple methods , each method has a parameter of type long. I need to do some logic to replace that parameter based on some condition. I was thinking to use Aspect to ...
Mohammad Karmi's user avatar
1 vote
0 answers
51 views

Aspect AOP not intercepting all methods within pointcut

I have created an aspect for the purpose of error logging and reporting within a microservices system but it is not intercepting all the methods that throw an exception within the pointcut. import ...
nova_rem's user avatar
0 votes
1 answer
49 views

AspectJ in multithreading

Currently im working on a application that runs the same process(with different input parameters in this case TaskInformation) parallelly on 16 threads. I would like to create Aspect from which i ...
DengerZone's user avatar
0 votes
1 answer
114 views

Hibernate filter not getting applied within Async process

I have a hibernate filter defined on my entities which I am injecting using aspect for all repositories which implements my TenantableRepository. The issue is that the filter is not getting injected ...
user11567166's user avatar
0 votes
0 answers
24 views

Retrieving aspect/sun exposition of geographic locations using code (e.g. python, commandline, ...)

I am looking for a tool/way to infer the topographic aspect of a location (https://en.wikipedia.org/wiki/Aspect_(geography)) or its sun exposition in hours of sun/year in an automated way. To further ...
Thomas Huber's user avatar
0 votes
0 answers
19 views

How to obtain all executed sql statements and execution time in jpa through aop or interceptor,

Now I am using cat3 for tracking monitoring. I need to track the springboot using jpa and count the execution statements and duration of sql. I have not found a suitable entrance implementation. Do ...
Kevin Gao's user avatar
0 votes
1 answer
16 views

i cannot see the aspect logs when i run the method to be intercepted

thats my code and this is only showing the logs as method is executed in intellij INFO: Publishing comment: Demo comment. Also added the dependencies but still i cant see whats the error. package com....
alpha's user avatar
  • 21
1 vote
0 answers
43 views

Postsharp aspects reach to HttpContext

I am using PostSharp, and within my aspects, I want to check a header from the incoming request during the entry phase of a method. I am unable to access HttpContext. Is there a way to achieve this? ...
Saruhan's user avatar
  • 91
0 votes
0 answers
62 views

R Shiny determine plot aspect ratio

I'm building a R Shiny application focused around selecting data and creating a variety of plots using the R base plotting procedures, and place in plotOutput elements in Shiny. Since the application ...
Dr Dave's user avatar
  • 461
0 votes
0 answers
30 views

Recharts changing aspect with media queries

I'm trying to make a responsive data visualization dashboard for a personal project. Everything works fine but I need to make my graphs change its aspect property (from the responsive container tag) ...
Federico Moroni's user avatar
1 vote
1 answer
40 views

How do I test private annotation aspect in spring boot?

How do I test private annotation aspect in spring boot ? Example: @Aspect @Component @Slf4j public class AspectClass { @AfterReturning(value = "@annotation(CustomAnnotation)") ...
Ruchi Jain's user avatar
1 vote
1 answer
173 views

How to implement interceptors/aspects in a dotnet Maui app?

I'm implementing a dotnet Maui app, and got to the point when I'd need some aspects to hanlde errors and certain responses. In the past, I implemented interceptors using Castle Windsor, but how can I ...
balintn's user avatar
  • 1,094
0 votes
1 answer
63 views

Does Aspect Oriented Programming require recompilation whenever an aspect changes?

One important design principle is the OCP, which states that we would like our modules to be open for extension but closed to modification. When we use Aspect Oriented Programming, we impact the whole ...
Shaharg's user avatar
  • 979
0 votes
0 answers
11 views

I want to show compilation error or force to above method to use annotation @cacheKey for parameter(userId)

I have below annotation for method: @Retention(RetentionPolicy.RUNTIME) @Target(Element.Method)) public @interface Memcacheable { int expiresAfterSeconds() default -1; String cacheKey(); ...
Sanat Chandravanshi's user avatar
0 votes
0 answers
23 views

Java Aspect oriented - interface Around not working as expected when applied on a class

My interface code; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE}) @Documented @Inherited public @interface JwtTokenRequired { } My ...
Hard Worker's user avatar
  • 1,024
0 votes
0 answers
12 views

How do i keep a div at 16x9 based on height of the window? i am using jw player

i am using jw player and it does not play well with widescreen monitors when put into a div that is 100% height and 100% width. When the page is wider than 16x9, the player just overflows vertically ...
Jody Christian's user avatar
0 votes
0 answers
27 views

How to call another overloading Function using Aspect or Code Generator in .net

I have a question about Aspect or Code Generator. public class Test { public void StartMethod(string str) { ... } public void StartMethod(string str, object obj) { ...
황태현's user avatar
0 votes
1 answer
617 views

Spring AOP with Spring Webflux after authentication

I have a Enabled Spring AOP for my logging purpose and use webflux for the API entrypoint, things work fine if the api does not go through ReactiveAuthenticationManager like my login api but the ...
Akash Jain's user avatar
0 votes
1 answer
81 views

How to change pointCut expression inside an aspect which has been compiled when I use this aspect in other project?

I have a logging aspect like this, it will print args, result or any other exceptions. I use aspectj-maven-plugin to compile this aspect. Then, the compiled result will be packaged to a jar. I will ...
Chuang Hou's user avatar
0 votes
1 answer
109 views

Cannot run ajc compiled class file in the terminal using Java

I trying to learn aspectj for a project. I wish to run the java files from the terminal using ajc and java but I am unable to do so. I have 2 files in my directory HelloWorld.java and HWTracer.aj ...
Dunkan's user avatar
  • 3
0 votes
1 answer
34 views

First time trying to use Aspect. What if I want to output a different value for specific logs?

First of all, I am not 100% sure if my code is correct, since this is the first time I am ever using Aspect in Spring, so I will be happy if you point out any errors. First a little background. I have ...
Maflec's user avatar
  • 41
3 votes
1 answer
259 views

How to labeling text based on aspect term and sentiment

I have coded to label text data by term aspect then sentiment with vader lexicon. But the result is only output -1 which means negative and 1 which means positive, where there should be 3 classes of ...
Annisa Lianda's user avatar
0 votes
0 answers
51 views

Not going inside the Aspect in Aspect-Oriented-Programming

Hello I am new to Aspect Oriented Programming and trying to understand some concepts. I am writing a simple Spring Boot Application where I defined a dummyEndpoint where I am calling a method of a ...
Akshay's user avatar
  • 77
3 votes
1 answer
159 views

Golang tgbotapi v5: sendVideo has wrong aspect ratio on iOS

I am using v5.5.1 of go-telegram-bot-api to send videos with the following code. However, the actual aspect ratio 4:5 is broken and video seems as 1:1 on iOS devices. I also have MacOS and videos have ...
Harun Sasmaz's user avatar
1 vote
1 answer
95 views

Aspect does not triggered

I am trying to implement read-only data source in my application. According to the following repo implementation, this aspect method should be called when a transaction happens but it never triggers ...
user avatar
1 vote
1 answer
158 views

Aspect not getting called on non-spring maven project

I'm using Java 8, testng, maven and selenium for UI automation frame work and trying to use aspectj to execute aspects before and after for switching iframes(entry and exit) when any method in an ...
gamelover's user avatar
0 votes
1 answer
284 views

How to test Aspects

I have found and tried to follow this answer by Roman Puchkovskiy with a detailed example, but I am missing some detail. Here is the aspect I am trying to test: package com.company.reporting.logger....
cptully's user avatar
  • 625
-1 votes
1 answer
41 views

(Unity)Game view and smartphone view are different

In the game view, it appears horizontally as expected, but in the smartphone view, it appears vertically. I do not know what is the problem. How to fix?(My smartphone has 1080 x 2400 pixels, 20:9 ...
Soon's user avatar
  • 491
0 votes
1 answer
268 views

Exception handler is not called when exception is thrown because of Interceptor Around [duplicate]

I have a method handleException that return a ResponseEntity : @ExceptionHandler({Exception.class}) public ResponseEntity handleException(Exception e) { Map<String, String> data = new ...
khalid tounoussi's user avatar
0 votes
2 answers
95 views

Pointcut on annotated method

I'm trying to add a custom annotation for JPA repository methods to have a advice on @Query value. Below is the piece of code I tried MyFilter class @Aspect @Component public class MyFilter { @...
bhargavaravalik's user avatar
0 votes
1 answer
692 views

Aspect Method is not triggered

I'm trying to get my Aspect class to work but it gets completely ignored. I have following files: MyAnnotation.java package annotations; import java.lang.annotation.ElementType; import java.lang....
FER_Viborg's user avatar
0 votes
0 answers
124 views

Is it possible to use @Transactional annotation on aspect method instead of service method?

I have a micro-service project and I am adding a common feature to every service. For that I wrote code in my common service and it works fine as long as I put @Transactional annotation on every ...
Vadym Martsun's user avatar
1 vote
1 answer
685 views

Spring AOP - How to pass in a different number of parameters?

I have an Aspect: @Aspect @Component public class BusinessAspect { @Around("@annotation(Business)") public Object getCorrespondingBusiness(ProceedingJoinPoint joinPoint, Business ...
tommy sylas's user avatar
1 vote
1 answer
634 views

Spring SQS Message Handler - add custom message attributes to existing message before sending it to Dead-Letter-Queue

Currently, the messages on source queue are sent to dead-letter-queue on every exception. My goal is to add custom attributes to the failed message so that engineers have more information about ...
snargul's user avatar
  • 13
0 votes
2 answers
173 views

Window aspect ratio varies depending on window size

I'm trying to understand how a program is determining the new width/height when resizing it. One would think it's merely an aspect ratio like 4:3 (which would lead to a 1.333333 ish value) however as ...
Matías Macotinsky's user avatar
0 votes
1 answer
340 views

Not able to read annotation property inside Aspect when writing pointcut in a method

I have a custom annotation as annotation class MyHandler(val value:String) I wrote an aspect for functions using this annotation, also reading the value within the annotation for my processing. @...
mewan's user avatar
  • 1
3 votes
1 answer
987 views

SwiftUI clipped image still accepts tap gesture [duplicate]

I have trouble clipping the image in SwiftUI Here is the code with minimal wrong-working example: struct TestView: View { var body: some View { Image("iPhone13Pro") ....
Daniel Pustotin's user avatar
1 vote
1 answer
429 views

SpringBoot application fails startup when I have Aspect defined on a Bean Method

Working with Springboot 2.7.0. I had a a working application and I made these changes on top of it Aspect Configuration @Configuration @EnableAspectJAutoProxy @ComponentScan public class AspectConfig {...
Stubborn's user avatar
  • 320
1 vote
1 answer
524 views

Spring AOP, Use only one pointcut when two pointcut match

anyone have an idea of how doing that : I have two pointcut, one generic and an one specific. The two pointcuts will intercept the same method invocation but I want to just call the specific pointcut. ...
Alex's user avatar
  • 11
0 votes
1 answer
483 views

How to interrupt JoinPoint execution in AOP

Is it possible to interrupt invoking the actual method from within the aspect execution? For example: public class CheckPermissionAspect { @Around("@annotation(CheckPermission)") ...
jrg's user avatar
  • 43
1 vote
0 answers
352 views

Write an aspect class for my Dropwizard project?

Trying to write a aspectJ class for my dropwizard project. Below is the class @Aspect public class LoggingAspect { @Around("execution(* javax.servlet.http.HttpServlet.*(..)) *)") public ...
Laodao's user avatar
  • 1,587
0 votes
1 answer
439 views

Is it possible to throw checked exception in Spring AOP?

Hello I'm trying to throw custom Exceptions from my @Aspect, but no matter what exception I throw, my Aspect is throwing UndeclaredThrowableException, My custom exception is public class ...
Boldbayar's user avatar
  • 875
0 votes
0 answers
646 views

Retrieving the response body as an empty string in Spring AOP

I have a requirement wherein I need to save any request and response being passed to a Rest Controller in a database, so I decided to implement Spring AOP for the same. The issue that is now being ...
MysteriousCoder's user avatar
1 vote
1 answer
6k views

as-pect.config.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module"

When I test with as-pect I get an error in CRUD dApp with NEAR. The whole error I get is as follows; yarn test [Error] There was a problem loading [/Users/malibilgin/Documents/Web3/order-management-...
malibil's user avatar
  • 163
0 votes
0 answers
59 views

@AfterReturning for multiple methods in a same controller AOP [duplicate]

I want to call multiple methods included in a same controller. But methods are different from input parameters. So I need to use one aspect method for those three methods included in same controller. ...
Dulani Maheshi's user avatar
1 vote
0 answers
184 views

applying Aspect before spring security

I have an application that use spring security and JWT for Authorization and Authentication. Here you can see my security config @Override protected void configure(HttpSecurity http) throws ...
pooya's user avatar
  • 115
0 votes
1 answer
349 views

Spring AOP with type parameter with annotation Collection<@SomeAnnotation>

I want to advice methods which arguments are annotated. The exact designator I am trying is args(Collection<@SomeAnnotation *>) but it says "error wildcard type pattern not allowed, must ...
Hristo Stefanov's user avatar
1 vote
1 answer
2k views

Can I set the default retention time for log groups created in a AWS CDK v2 created pipeline?

I have an AWS VDK v2 based application stack that sets up a CodePipeline with different stages, application and all that, that works alright. But this setup creates quite some log-groups where the ...
P.J.Meisch's user avatar
  • 18.5k
0 votes
0 answers
428 views

Patchwork is squashing my ggplot that has correct aspect when click zoom?

I've tried to make this question clear and I'm sorry that I have not been able to provide an MRE as I wouldn't even know where to begin to make this a MRE, but let me know if you can identify an ...
Banterny's user avatar
0 votes
1 answer
114 views

Put some variable in json response inside Aspect

We want to add some variabale in json response, but inside aspect. we need to do something similar to what is done in this function but instead of with the request it would be with the response.
miguel lopez's user avatar

1
2 3 4 5
9