Skip to content

Commit f2312e5

Browse files
committed
Inicio con datos-deportivos
1 parent 7454f4e commit f2312e5

11 files changed

+10
-168
lines changed

build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ sourceCompatibility = '1.8'
1010

1111
repositories {
1212
mavenCentral()
13+
14+
maven { url 'https://jitpack.io' }
1315
}
1416

1517
dependencies {
1618
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
1719
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
1820
runtimeOnly 'com.h2database:h2'
1921
runtimeOnly 'org.postgresql:postgresql'
22+
implementation project(':datos-deportivos')
2023
testImplementation('org.springframework.boot:spring-boot-starter-test') {
2124
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
2225
}

settings.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
rootProject.name = 'datosdeportivosapi'
2+
3+
includeFlat 'datos-deportivos'

src/main/java/es/lanyu/Test.java

-26
This file was deleted.

src/main/java/es/lanyu/config/JavaConfig.java

-30
This file was deleted.

src/main/java/es/lanyu/datosdeportivosapi/DatosdeportivosapiApplication.java

+1-15
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,17 @@
55
import org.springframework.boot.SpringApplication;
66
import org.springframework.boot.autoconfigure.SpringBootApplication;
77
import org.springframework.context.ConfigurableApplicationContext;
8-
import org.springframework.context.annotation.Import;
9-
import org.springframework.context.annotation.ImportResource;
108
import org.springframework.context.annotation.PropertySource;
119

12-
import es.lanyu.Test;
13-
import es.lanyu.config.JavaConfig;
14-
1510
@SpringBootApplication
16-
@ImportResource({"config.xml"})
17-
@Import({JavaConfig.class})
18-
@PropertySource({"application2.properties"})
11+
@PropertySource({"logging.properties"})
1912
public class DatosdeportivosapiApplication {
2013
private static final Logger log = LoggerFactory.getLogger(DatosdeportivosapiApplication.class);
2114

2215
public static void main(String[] args) {
2316
ConfigurableApplicationContext context =
2417
SpringApplication.run(DatosdeportivosapiApplication.class, args);
2518

26-
Test test;
27-
String nombre = "autowired";//"anotacion";//"test";//"config";//
28-
// test = context.getBean(Test.class);
29-
test = context.getBean(nombre, Test.class);
30-
test.init();
31-
log.debug("Recuperado bean \"{}\" del tipo {}", nombre, test.getClass().getName());
32-
3319
context.close();
3420
}
3521

src/main/java/es/lanyu/datosdeportivosapi/Test.java

-25
This file was deleted.

src/main/java/es/lanyu/datosdeportivosapi/TestAutowired.java

-42
This file was deleted.
-17
Original file line numberDiff line numberDiff line change
@@ -1,17 +0,0 @@
1-
datosdeportivos.testString=String desde "application.properties"
2-
3-
# Prueba con niveles
4-
#logging.level.root=WARN
5-
logging.level.es.lanyu=DEBUG
6-
7-
# Formato fecha
8-
logging.pattern.dateformat=yyyy-MM-dd HH:mm
9-
10-
# Formato propio usando otra propiedad
11-
lanyu.formatofecha=%date{ddMMM HH:mm:ss, UTC}Z
12-
logging.pattern.console=${lanyu.formatofecha} [%thread %clr(${PID:- })] %-5level %logger{15} => %msg %n
13-
14-
# Color (usar la linea 12 o la 15, no los dos a la vez)
15-
#logging.pattern.console=${lanyu.formatofecha} [%thread] %highlight(%-5level) %cyan(%logger{15}) %yellow(=>) %msg %n
16-
17-
#logging.file.name=datosdeportivos.log

src/main/resources/application2.properties

-1
This file was deleted.

src/main/resources/config.xml

-12
This file was deleted.

src/main/resources/logging.properties

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
logging.level.es.lanyu=DEBUG
2+
lanyu.formatofecha=%date{ddMMM HH:mm:ss, UTC}Z
3+
logging.pattern.console=${lanyu.formatofecha} [%thread %clr(${PID:- })] %-5level %logger{15} => %msg %n
4+
#logging.file.name=datosdeportivos.log

0 commit comments

Comments
 (0)