Giter VIP home page Giter VIP logo

Comments (9)

nightswimmings avatar nightswimmings commented on June 16, 2024 1

Because if we want to customize only one argument then we don't have to deal with and research internal mechanisms for table prefix
I mean I think it makes sense to assume that as long as you don't pass the tablePrefix as argument, you want to benefit from the default properties mechanism

Think somebody that just wants to pass a custom datasource, then he performs

public CustomTaskConfigurer(@BatchDataSource DataSource dataSource) {
        super(dataSource); 
}

But then he realises that the tables are being created in another place (when using latest SpringBoot3-enabled SCDF, for instance), he or she needs to research the implementation and understand that you need to reproduce the previous default

public CustomTaskConfigurer(@BatchDataSource DataSource dataSource, TaskProperties taskProperties) {
        super(dataSource, taskProperties.getTablePrefix(), null); 
    }

It's an undersirable side-effect, because you are extending DefaultTaskConfigurer, so everything yoo don't explicitly touch, should remain as the Default configuration according to the name

Indeed ideally IMO it should be something like

(@EnabledConfigurationProperties TaskProperties) ? taskProperties.getTablePrefix() : DEFAULT_TABLE_PREFIX

from spring-cloud-task.

cppwfs avatar cppwfs commented on June 16, 2024

Thank you for the comment and good catch on the javax.
But, I'm a little confused, as to why we'd want to pass in the TaskProperties to obtain the prefix when other constructors allow for the setting of the prefix?

from spring-cloud-task.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.