Skip to content

Instantly share code, notes, and snippets.

View verissimor's full-sized avatar

Verissimo Joao Ribeiro verissimor

View GitHub Profile
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor
import java.util.concurrent.Executors
@Configuration
class ConcurrentTaskConfiguration {
@Bean("myTaskExecutor")
fun myTaskExecutor(): ConcurrentTaskExecutor {
@Id
@GeneratedValue
@Column(name = "id", updatable = false, nullable = false)
private Long id;