Robert Jaros
10/08/2019, 1:39 PMRobert Jaros
10/09/2019, 5:13 PMSlackbot
10/11/2019, 9:32 AMbjonnh
10/11/2019, 7:46 PMRobert Menke
10/11/2019, 10:37 PMxenoterracide
10/11/2019, 10:43 PMmyMethod Function { foo -> bar }
in kotlin to pass the function, in java that would just be myMethod( foo -> bar )
rrader
10/13/2019, 10:07 AMGabriel Machado
10/14/2019, 3:50 PMspring-boot-starter-webflux
with the new coroutines support? Or I need to manually include dependencies such as 'spring-webflux', version: '5.2.0.M2'
?Marko Mitic
10/15/2019, 11:41 AMjmfayard
10/16/2019, 8:59 AMBernhard
10/17/2019, 2:45 PMbjonnh
10/18/2019, 6:08 PMPeter
10/22/2019, 6:01 PMbjonnh
10/22/2019, 7:34 PMmister11
10/23/2019, 8:02 AMSchedulers.boundedElastic()
scheduler? At the moment, I have only some DB calls using JOOQ, but I might use some other blocking library. I've added BlockHound
to the project and once I moved DB calls to a separate scheduler it stoped reporting blocking calls, but I'm aware that number of available threads is much smaller in Netty than in Tomcat which might cause scalability issues down the road.Marcel Overdijk
10/31/2019, 10:34 PMclass MdcTaskDecorator implements TaskDecorator {
@Override
public Runnable decorate(Runnable runnable) {
// Right now: Web thread context !
// (Grab the current thread MDC data)
Map<String, String> contextMap = MDC.getCopyOfContextMap();
return () -> {
try {
// Right now: @Async thread context !
// (Restore the Web thread context's MDC data)
MDC.setContextMap(contextMap);
runnable.run();
} finally {
MDC.clear();
}
};
}
}
Marcel Overdijk
10/31/2019, 10:36 PM@Configuration
@EnableAsync
class AsynchConfig : AsyncConfigurerSupport() {
override fun getAsyncExecutor(): Executor {
val executor = ThreadPoolTaskExecutor()
executor.setTaskDecorator(MDCTaskDecorator())
executor.initialize()
return executor
}
}
Or Cohen
11/03/2019, 12:50 PMWebMvc.fn
instead of using @RequestMapping
annotations.
Since I’m now using request handlers rather than controllers, my controller unit tests (MockMvc
with standalone setup) are obviously failing 🙂
I’m trying to fix my unit tests but I’m struggling making things work. Seems like every request I’m making using MockMvc
(without standalone steup this time) ends up with 404.
When I run my app or my integration tests, everything works just fine, so I’m guessing it’s somehow related to the routes bean not being loaded to the app context. Failed to work around it though.
Any ideas? am I missing something?cpe
11/04/2019, 9:09 PM<form name="users" action="POST">
<input type="text" name="someInfo">
<input type="text" name="users[name][0]">
<input type="text" name="users[surname][0]">
<input type="text" name="users[name][1]">
<input type="text" name="users[surname][1]">
</form>
data class InputForm(val someInfo: String, val users: Map<String, List<String>)
which could be wired like this:
@PostMapping("/users")
fun updateUsers(inputForm: InputForm) {
// access input form data like "someInfo" and the map "user"
}
With the migration I have something like:
router {
POST("/users", userController::updateUsers)
}
fun updateUsers(request: ServerRequest): ServerResponse {
val inputForm = request.body<InputForm>()
// do some stuff
return ServerResponse.ok().render("success.html")
}
This is causing the following exception: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
What is the correct way to read the message in an automated way like it was possible with the traditional mapping? Or do I need to write a custom HttpMessageConverter?joshr
11/05/2019, 2:49 AMjoshr
11/05/2019, 2:50 AMHullaballoonatic
11/05/2019, 7:05 PM@Configuration
class FooConfiguration {
@Value("\${foo.bar}")
lateinit var bar: String
}
This just seems really verbose, even compared to the java way, and I tend to prefer lazy delegation val over lateinit var for immutable properties like this.nicholasnet
11/07/2019, 12:16 PMHullaballoonatic
11/07/2019, 6:55 PMFrodrigues
11/13/2019, 9:17 AMDariusz Kuc
11/13/2019, 7:00 PMmyProps:
configs:
someName:
x: "foo"
y: 1
anotherName:
x: "bar"
y: 2
that can be mapped to something like
@ConstructorBinding
@ConfigurationProperties(prefix = "myProps")
data class MyProperties(val configs: Map<String, MyCustomProperties>)
data class MyCustomProperties(val x: String, val y: Int)
This seems to work fine and properties are loaded correctly in the application context but I don't get any auto-completion in the yml/properties files for MyCustomProperties
. Anyone knows whether it is possible to somehow provide the configuration metadata for the above that IntelliJ is able to understand?Gary
11/14/2019, 4:59 AMWebflux
project to Co-routines. Loving the increased readability of co-routines and the simplicity of async/await
, great job @sdeleuzeand team. But under the hood we're wondering should we expect any performance differences? If so in what circumstances is this likely to be evident?soudmaijer
11/14/2019, 12:47 PMthiagoretondar
11/14/2019, 9:35 PM./gradlew bootJar
? (not using intellij, it is in my CI/CD)
* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.1.4.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.1.4.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository
magisu
11/17/2019, 7:03 PM