Spring Framwork Core Technologies v5.3.36 SNAPSHOTconfigured instance val service = context.getBean("petStore") // use configured instance var userList = service.getUsernameList() With Groovy configuration, bootstrapping looks very similar. // a late-initialized property so that the Spring container can inject a MovieFinder lateinit var movieFinder: MovieFinder // business logic that actually uses the injected MovieFinder is omitted this.i = i; } } Kotlin class ExampleBean { lateinit var beanOne: AnotherBean lateinit var beanTwo: YetAnotherBean var i: Int = 0 } In the preceding example, setters are declared to 0 码力 | 485 页 | 6.31 MB | 1 年前3
Spring Framwork Testing v5.3.36 SNAPSHOT@RecordApplicationEvents ① class OrderServiceTests { @Autowired lateinit var orderService: OrderService @Autowired lateinit var events: ApplicationEvents ② @Test fun submitOrder() { the ApplicationContext. Kotlin @SpringJUnitConfig class MyTest { @Autowired ① lateinit var applicationContext: ApplicationContext // class body... } 54 ① Injecting the ApplicationContext WebApplicationContext. Kotlin @SpringJUnitWebConfig ① class MyWebAppTest { @Autowired ② lateinit var wac: WebApplicationContext // class body... } ① Configuring the WebApplicationContext. ② Injecting0 码力 | 193 页 | 2.53 MB | 1 年前3
Spring Boot 3.0.0-M4 Reference GuideMyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 832 页 | 14.77 MB | 1 年前3
Spring Boot 3.1.0-RC1 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 906 页 | 16.28 MB | 1 年前3
Spring Boot 3.1.0-M2 Reference GuideMyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 884 页 | 15.88 MB | 1 年前3
Spring Boot 3.0.1 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 877 页 | 15.68 MB | 1 年前3
Spring Boot 2.7.2 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 865 页 | 15.45 MB | 1 年前3
Spring Boot 2.7.5 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 866 页 | 15.50 MB | 1 年前3
Spring Boot 2.7.13 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 871 页 | 15.57 MB | 1 年前3
Spring Boot 3.0.13 Reference Documentation MyProperties { var isEnabled = false var remoteAddress: InetAddress? = null val security = Security() class Security { var username: String? = null var password: String String? = null var roles: List= ArrayList(setOf("USER")) } } The preceding POJO defines the following properties: • my.service.enabled, with a value of false by default. • my.service ConfigurationProperties @ConfigurationProperties(prefix = "my.main-project.person") class MyPersonProperties { var firstName: String? = null } With the preceding code, the following properties names can all be used: 0 码力 | 891 页 | 15.91 MB | 1 年前3
共 300 条
- 1
- 2
- 3
- 4
- 5
- 6
- 30













