Advertisement
Guest User

Untitled

a guest
Nov 18th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. title=jdbcTemplate.queryForList("SELECT distinct title from UD_REGGRESSION where delete_flag='N'",String.class);
  2.  
  3. @Configuration
  4. @ConfigurationProperties(prefix = "oracle")
  5. public class OracleConfiguration {
  6. @NotNull
  7. private String username;
  8. @NotNull
  9. private String password;
  10. @NotNull
  11. private String url;
  12. @NotNull
  13. private String decryptionKey;
  14.  
  15. public String getDecryptionKey() {
  16. return decryptionKey;
  17. }
  18.  
  19. public void setDecryptionKey(String decryptionKey) {
  20. this.decryptionKey = decryptionKey;
  21. }
  22.  
  23. public void setUsername(String username) {
  24. this.username = username;
  25. }
  26.  
  27. public void setPassword(String password) {
  28. this.password = password;
  29. }
  30.  
  31. public void setUrl(String url) {
  32. this.url = url;
  33. }
  34.  
  35. public String getUsername() {
  36. return username;
  37. }
  38.  
  39. public String getPassword() {
  40. return password;
  41. }
  42.  
  43. public String getUrl() {
  44. return url;
  45. }
  46.  
  47. @Bean
  48. public DataSource dataSource() throws SQLException {
  49.  
  50. OracleDataSource dataSource = new OracleDataSource();
  51. dataSource.setUser(username);
  52. dataSource.setPassword(password);
  53. dataSource.setURL(url);
  54. dataSource.setImplicitCachingEnabled(true);
  55. dataSource.setFastConnectionFailoverEnabled(true);
  56. return dataSource;
  57. }
  58.  
  59. @PostConstruct
  60. public void decrypt() {
  61. this.password = DecryptUtility.decrypt(this.password,
  62. this.decryptionKey);
  63. }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement