Created
March 5, 2023 15:33
-
-
Save malinduDeAlwis90/782e609690176e73ef7f77423dd1d323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.springconditionalbeans; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.annotation.Conditional; | |
import org.springframework.stereotype.Component; | |
import java.io.File; | |
@Component | |
@Conditional(CloudCondition.class) | |
class CloudFileServiceImpl extends FileServiceImpl { | |
private static final Logger logger = LoggerFactory.getLogger(CloudFileServiceImpl.class); | |
public CloudFileServiceImpl() { | |
logger.info("CloudFileServiceImpl constructed."); | |
} | |
public File loadFile() { | |
// This method was added to implement cloud specific functionality. | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment