Это вовсе не Kotlin, это устаревшая Java-версия. /servlet/config/annotation/WebMvcConfigurerAdapter.html.
Когда вы «Kotlinize» это в свете методов по умолчанию Java 8 ...
package com.climate.squirrel.web
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
import springfox.documentation.swagger2.annotations.EnableSwagger2
import springfox.documentation.builders.PathSelectors
import springfox.documentation.builders.RequestHandlerSelectors
import springfox.documentation.spi.DocumentationType
import springfox.documentation.spring.web.plugins.Docket
@Configuration
@EnableSwagger2
class SwaggerConfiguration {
@Bean
open fun api(): Docket = Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
@Bean
fun forwardToIndex(): WebMvcConfigurer {
return object : WebMvcConfigurer {
override fun addViewControllers(registry: ViewControllerRegistry) {
registry.addViewController("/").setViewName("redirect:/swagger-ui.html")
}
}
}
}
Да, ответ будет тем же на 64-разрядной машине.
В.NET, int
32-разрядное целое число со знаком , независимо от процессора. Его тип платформы.NET System.Int32
.
состояния Спецификации языка C#:
Эти
int
тип представляет подписанные 32-разрядные целые числа со значениями между–2,147,483,648
и2,147,483,647
.
int
просто псевдоним для Int32
- он определяется в спецификации C#. Поэтому int.MaxValue
совпадает с Int32.MaxValue
, который всегда будет 2147483647.