Maybe @Conditional would work. I'm not sure if we want to treat codec as a special case or allow other beans defined in that context to be overridden as it stands now. I'm not crazy about adding another context. But @Conditional might work in the same context.