Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ver cómo se crean todas las dependencias de las tres formas
- Loading branch information
1 parent
89ff427
commit 90bae09
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package es.lanyu.datosdeportivosapi; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class JavaConfig { | ||
|
||
@Bean(name="config") | ||
public Test miTest() { | ||
Test test = new Test() { | ||
int llamadas = 0; | ||
|
||
@Override | ||
public void init() { | ||
System.out.printf("Llamado %s veces", ++llamadas); | ||
System.out.println(); | ||
} | ||
|
||
}; | ||
test.init(); | ||
|
||
return test; | ||
} | ||
} |