#Proxies in Java - Dynamic Proxy Springboot

1 messages · Page 1 of 1 (latest)

frail geyser
#

Hey there - would anyone know about proxies in Java?
I'm trying to understand the dynamic proxies in springboot ....

I understand so far that a lot of annotations are proxies under the hood
however suddenly I don't understand all this code in App.js which is basically bringing all components together

Please help. Thank you

quartz kayakBOT
#

<@&1004656351647117403> please have a look, thanks.

frail geyser
#

Pretty much. I don't understand things from ClassLoader and below ... like so many diff functions and things just came in which make very limited sense even though I've asked chatgpt to explain it multiple times

analog loom
#

Proxies in Java in Spring have many features like

#

Aspect-Oriented Programming (AOP)

#

Transaction Management

#

Lazy Initialization

#

Caching

#

Asynchronous Execution

#

we also have different type of dynamic proxies in spring

#

JDK Dynamic Proxies

#

CGLIB Proxies

#

Any spcific part in it which is not clear to you

frail geyser
#
person.java
public interface Person{
  public void introduce (String name);
  public void sayAge (int age);
  public void sayWhereFrom (String city, String country)
}

And then there's a Man.java which is just an implementation of this interface

invocationHandler.java
public class invokeHandler ImvocationHandler{
  private Person person;
  public invokeHandler(Person person){
    this.person = person;
  }

  @Override
  public Object inboke (Object proxy, Method method, Object[] args{
  sysout("Hi");
  return null;
  }
}
quartz kayakBOT
frail geyser
#

Not sure what that is ... but rn I was just learning raw implementation of dynamic proxy in spring ...

analog loom
#

yes

#

as whatever concept you use like AOP which is widely used in any spring project

frail geyser
#

However, couldn't understand like where things are coming from

frail geyser
analog loom
#

First I suggets you go through AOP concept and its usage in spring

frail geyser
#

It's like ... Nginx which I understood - which is like a load balancer + firewall

frail geyser
analog loom
#

NGINX is a server

frail geyser
#

Should I come back after doing AOP and then ask if I'm still confused?

frail geyser
analog loom
#

sure anytime

frail geyser
# analog loom sure anytime

Okay thank you. If you're online for a bit
I'll try to finish AOP and then come back and ask if I'm still confused

analog loom
#

You are in which timezone?

frail geyser
#

I'm in AEST - Australian timezone

#

But I'm awake the whole night today

#

Have uni assignments + want to gain confidence in understand systems like this

#

So will be studying Springboot for a while

analog loom
#

cool no issue

frail geyser
analog loom
#

IST

frail geyser
#

Oh so its 5PM there

#

I'm actually originally indian too and understand hindi
So I was watching this video from lovepreet singh -

https://www.youtube.com/watch?v=fmX84zu-5gs

Complete Java Full Stack: AWS, Spring Boot, Microservices

This course contains three parts that can be found in playlist:- https://www.youtube.com/playlist?list=PL7CBVLpg0zqf_ggig9cOr72oZNGf9RZmZ

=====================
This course is designed for the people:-
📌 who are not able to make projects on their own
📌 who want to prepare for fulls...

▶ Play video
#

And he explains proxies in 5:12:00 to 6:00:00
Is it okay if I watch these with you sometime when you're free in maybe today or next week?

analog loom
#

not today may be next week

#

good to know that

frail geyser
#

Are these concepts mostly intermediate or advanced type?

frail geyser
analog loom
#

nopes not

#

when you work with Spring these are usedby advance concepts

analog loom
#

When you work on Spring project you understanding AOP usage and its importance

frail geyser
#

Are used by more advanced topics?

#

Is that what you meant?

analog loom
#

Yes when I work on enterprise applications I use