小编Ama*_*sta的帖子

创建与特定所有者/组的链接

我正在尝试与特定所有者/组创建一些符号链接,但它始终是使用owner=root 和group=root 创建的。为什么?

这是我的代码:

- name: Get the directories to create symbolic links
  find:
    paths: /myPath/
  register: result

- name: Creation of symbolic links 
  file:
    src: "{{ item.path }}" 
    dest: /Path_Dest/{{ item.path | basename }}
    owner: 'owner1'
    group: 'group1'
    state: link
  with_items: "{{ result.files }}"   
Run Code Online (Sandbox Code Playgroud)

笔记 :

  • 所有者 1 和组 1 存在。
  • Ansible 日志中没有错误

ansible

6
推荐指数
1
解决办法
1973
查看次数

Spring Batch:如何更改默认隔离级别?

我在文档中读到:

“默认值为 ISOLATION_SERIALIZABLE,这可以防止同一作业意外并发执行”

但是,当我同时启动不同的作业(默认隔离级别为可串行化)时,出现错误:ORA-08177: can't serialize access for this transaction.这正常吗?

其次,要将默认隔离级别更改为 READ_COMMITTED,我知道我们无法在 application.properties 中更改此级别,并且我必须重新定义 BatchConfigurer。精确的 ?

使用 BasicBatchConfigurer,我必须定义一个显式构造函数(默认构造函数未定义隐式超级构造函数 BasicBatchConfigurer())。但是,我有错误:

 Parameter 0 of constructor in MyBatchConfigurer required a bean of type 'org.springframework.boot.autoconfigure.batch.BatchProperties' that could not be found.
Run Code Online (Sandbox Code Playgroud)

如何创建:BatchProperties 属性、DataSource dataSource 和 TransactionManagerCustomizers transactionManagerCustomizers ?

这是我的代码:

PeopleApplication.java

@SpringBootApplication
@EnableAutoConfiguration(exclude = { BatchAutoConfiguration.class })
public class PeopleApplication {
    
    
    public static void main(String[] args) throws Exception {
        
        ConfigurableApplicationContext ctx =  new SpringApplicationBuilder(PeopleApplication.class)
        .web(WebApplicationType.NONE) 
        .run(args);
        
        int exitValue = SpringApplication.exit(ctx);
        System.exit(exitValue);
    }
}
Run Code Online (Sandbox Code Playgroud)

MyBatchConfigurer.java …

spring-batch spring-boot

5
推荐指数
1
解决办法
5333
查看次数

标签 统计

ansible ×1

spring-batch ×1

spring-boot ×1