Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesHitesh-Java
In this Java Spring Training session, you will learn Spring AOP – Aspect Oriented Programming. Topics covered in this session are:
For more information, visit this link:
• Spring framework
• Inversion of Control
• Dependency Injection – Two types
• Defining beans using XML
• Inheriting beans
• Auto-wiring
• Annotations based configuration
• Java based configuration
https://www.mindsmapped.com/courses/software-development/spring-fundamentals-learn-spring-framework-and-spring-boot/
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesHitesh-Java
In this Java Spring Training session, you will learn Spring AOP – Aspect Oriented Programming. Topics covered in this session are:
For more information, visit this link:
• Spring framework
• Inversion of Control
• Dependency Injection – Two types
• Defining beans using XML
• Inheriting beans
• Auto-wiring
• Annotations based configuration
• Java based configuration
https://www.mindsmapped.com/courses/software-development/spring-fundamentals-learn-spring-framework-and-spring-boot/
Presentation on - How to create custom Burp Suite extensions using Jython to test the web
application / mobile applications with strong encryptions in HTTP requests and responses.
Presentation on - How to create custom Burp Suite extensions using Jython to test the web
application / mobile applications with strong encryptions in HTTP requests and responses.
8. How do you do
for(int i = 1; i < 100; i++) {
System.out.print(i + "+");
}
System.out.println(100);
• 在迴圈中經常犯的兩種錯誤
> 非必要的輸出/輸入
> 非必要的建構物件
Sun Confidential: Internal Only 8
9. How do you do
• 改進了輸出
String output = "";
for(int i = 1; i < 100; i++) {
output = output + i + "+";
} 一次 IO
output += 100;
System.out.println(output);
Sun Confidential: Internal Only 9
10. How do you do
• 物件的重用(一)
StringBuffer output = new StringBuffer();
for(int i = 1; i < 100; i++) {
output.append(i);
output.append("+");
}
output.append(100);
System.out.println(output); 重用物件
Sun Confidential: Internal Only 10
11. How do you do
• 物件的重用(二)
StringBuffer output = new StringBuffer(300);
for(int i = 1; i < 100; i++) {
output.append(i);
output.append("+");
}
output.append(100);
System.out.println(output);
預設16字元
Sun Confidential: Internal Only 11
12. How do you do
• 執行緒議題
StringBuilder output = new StringBuilder(300);
for(int i = 1; i < 100; i++) {
output.append(i);
output.append("+");
}
output.append(100);
System.out.println(output);
JDK 5.0以上
Sun Confidential: Internal Only 12
35. 程式碼分析
• http://pmd.sourceforge.net/
• PMD scans Java source code and looks for
potential problems like:
> Possible bugs - empty try/catch/finally/switch
statements
> Dead code - unused local variables, parameters and
private methods
> Suboptimal code - wasteful String/StringBuffer
usage
> Overcomplicated expressions - unnecessary if
statements, for loops that could be while loops
> Duplicate code - copied/pasted code means
copied/pasted bugs
Sun Confidential: Internal Only 35
41. XSS:Session hijacking
Search <b>foo</b>
Could not find any documents including ‘<b>foo</b>’
Could not find any documents including ‘foo’
Sun Confidential: Internal Only 41