code manipulation : dynamic proxy(proxy pattern)

This commit is contained in:
haerong22
2021-02-21 22:12:00 +09:00
parent 705a4dcbd3
commit edc5bf337b
6 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package org.example.proxy;
import org.junit.Test;
public class BookServiceTest {
BookService bookService = new BookServiceProxy(new DefaultBookService());
@Test
public void proxy() {
Book book = new Book();
book.setTitle("spring");
bookService.rent(book);
}
}