Initial commit

This commit is contained in:
2022-04-30 12:57:41 +02:00
commit 04797b7efd
11 changed files with 765 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package at.dergeorg.todoconfig.todoconfigserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
@EnableConfigServer
@SpringBootApplication
@EnableEurekaClient
public class TodoConfigserverApplication {
public static void main(String[] args) {
SpringApplication.run(TodoConfigserverApplication.class, args);
}
}

View File

@ -0,0 +1,32 @@
server:
port: ${CONFIGPORT:1111}
encrypt:
key: ${KEY:mysuperkey}
spring:
application:
name: todo-config
security:
user:
name: admin
password: '{cipher}367f874ef1761f9fb5dd7da7dbe66ea1211a51e45153dfcd3ae58e68f4adfc33'
profiles:
active: native
cloud:
config:
server:
native:
search-locations: classpath:configs
encrypt:
enabled: false
eureka:
client:
service-url:
defaultZone: http://${HOSTNAME:localhost}:${EUREKAPORT:8761}/eureka
instance:
ip-address: ${HOSTNAME:localhost}
hostname: ${HOSTNAME:localhost}
instance-id: ${spring.application.name}:${random.value}
prefer-ip-address: true

View File

@ -0,0 +1,15 @@
server:
port: 2222
spring:
jpa:
hibernate:
ddl-auto: update
datasource:
url: jdbc:mariadb://<MY IP>/<DB>
username: <MY USERNAME>
password: '<MY PASSWORD>'
driver-class-name: org.mariadb.jdbc.Driver

View File

@ -0,0 +1,13 @@
package at.dergeorg.todoconfig.todoconfigserver;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class TodoConfigserverApplicationTests {
@Test
void contextLoads() {
}
}