Skip to content

Commit

Permalink
Uso varios ficheros properties con @propertysource
Browse files Browse the repository at this point in the history
  • Loading branch information
Awes0meM4n committed Mar 14, 2020
1 parent dabe14d commit bad376f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;

import es.lanyu.Test;
import es.lanyu.config.JavaConfig;

@SpringBootApplication
@ImportResource({"config.xml"})
@Import({JavaConfig.class})
@PropertySource({"application2.properties"})
public class DatosdeportivosapiApplication {

public static void main(String[] args) {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
datosdeportivos.testString=String desde "application.properties"
valor.parametro=String por constructor
1 change: 1 addition & 0 deletions src/main/resources/application2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
valor.parametro=String por constructor

0 comments on commit bad376f

Please sign in to comment.