code manipulation : dynamic proxy(proxy pattern)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user