Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- title=jdbcTemplate.queryForList("SELECT distinct title from UD_REGGRESSION where delete_flag='N'",String.class);
- @Configuration
- @ConfigurationProperties(prefix = "oracle")
- public class OracleConfiguration {
- @NotNull
- private String username;
- @NotNull
- private String password;
- @NotNull
- private String url;
- @NotNull
- private String decryptionKey;
- public String getDecryptionKey() {
- return decryptionKey;
- }
- public void setDecryptionKey(String decryptionKey) {
- this.decryptionKey = decryptionKey;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public String getUsername() {
- return username;
- }
- public String getPassword() {
- return password;
- }
- public String getUrl() {
- return url;
- }
- @Bean
- public DataSource dataSource() throws SQLException {
- OracleDataSource dataSource = new OracleDataSource();
- dataSource.setUser(username);
- dataSource.setPassword(password);
- dataSource.setURL(url);
- dataSource.setImplicitCachingEnabled(true);
- dataSource.setFastConnectionFailoverEnabled(true);
- return dataSource;
- }
- @PostConstruct
- public void decrypt() {
- this.password = DecryptUtility.decrypt(this.password,
- this.decryptionKey);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement