Skip to content

Commit 361d68f

Browse files
committed
Add sample configuration with internal bean method
See spring-projects/spring-framework#31985
1 parent 24ffe8d commit 361d68f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.izeye.helloworld.springbootkotlin
2+
3+
import org.springframework.context.annotation.Bean
4+
import org.springframework.context.annotation.Configuration
5+
6+
/**
7+
* Sample [Configuration].
8+
*
9+
* @author Johnny Lim
10+
*/
11+
@Configuration
12+
class SampleConfiguration {
13+
14+
// This function name will be translated to 'sampleBean$hello_spring_boot_kotlin'.
15+
@Bean
16+
internal fun sampleBean() = SampleBean()
17+
18+
}
19+
20+
/**
21+
* Sample bean.
22+
*
23+
* @author Johnny Lim
24+
*/
25+
class SampleBean

0 commit comments

Comments
 (0)