File tree Expand file tree Collapse file tree
work8test/src/main/java/io/nononi/starter/startertest Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 第5周作业
2+ ---
3+ ## 作业2
4+
5+ #### 写代码实现 Spring Bean 的装配
6+
7+ 实现代码:https://github.com/nononi105/JavaCourseCodes/tree/main/04fx/homework2/src/main/java/io/nononi/week5
8+
9+ ---
10+ ## 作业8
11+
12+ #### 给Student/Klass/School 实现自动配置和 Starter
13+ 实现代码:https://github.com/nononi105/JavaCourseCodes/tree/main/04fx/homework8/src/main/java/io/nononi/starter
14+
15+ ---
16+ ## 作业10
17+
18+ #### 研究一下 JDBC 接口和数据库连接池
19+ 实现代码:https://github.com/nononi105/JavaCourseCodes/tree/main/04fx/homework10/src/main/java/io/nononi/db/dbdemo/jdbc
Original file line number Diff line number Diff line change 1+ package io .nononi .starter .startertest ;
2+
3+ import io .nononi .starter .School ;
4+ import org .springframework .beans .factory .annotation .Autowired ;
5+ import org .springframework .stereotype .Controller ;
6+ import org .springframework .web .bind .annotation .GetMapping ;
7+ import org .springframework .web .bind .annotation .ResponseBody ;
8+
9+ @ Controller ()
10+ public class TestController {
11+ @ Autowired
12+ private School school ;
13+
14+ @ GetMapping ("/test" )
15+ @ ResponseBody
16+ public String test (){
17+ return school .toString ();
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments