getting the error in eclipse specifying spring profiles in single yml file

78 Views Asked by At
12:43:08.877 [main] ERROR org.springframework.boot.SpringApplication -- Application run failed org.springframework.boot.context.config.InvalidConfigDataPropertyException: Property 'spring.profiles' imported from location 'class path resource [application.yml]' is invalid and should be replaced with 
spring:
   profiles:
      active: test
---
  spring:
     profiles: dev
        
     datasource:
        driver-class-name: com.mysql.cj.jdbc.Driver
        password: root
        type: org.apache.commons.dbcp2.BasicDataSource
        url: jdbc:mysql:///ntspbms615db
        username: root
---    
  spring: 
     profiles: prod
     
     datasource:
        driver-class-name: oracle.jdbc.driver.OracleDriver
        password: sam
        url: jdbc:oracle:thin:@localhost:1521:orcl
        username: mydb6pm
     
---
  spring:
     profiles: test
     
     datasource:
           driver-class-name: com.mysql.cj.jdbc.Driver
           password: root
           type: org.apache.tomcat.jdbc.pool.DataSource
           url: jdbc:mysql:///ntspbms615db
           username: root        
           
---    
   spring:
      profiles: uat
      datasource:
         driver-class-name: oracle.jdbc.driver.OracleDriver
         password: sam
         url: jdbc:oracle:thin:@localhost:1521:orcl
         username: mydb6pm       
           

getting the above error in eclipse ide by specifying spring profiles in single yml file.

0

There are 0 best solutions below