Initial commit
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
32
src/main/resources/application.yaml
Normal file
32
src/main/resources/application.yaml
Normal 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
|
15
src/main/resources/configs/todo-service.yaml.example
Normal file
15
src/main/resources/configs/todo-service.yaml.example
Normal 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
|
||||
|
||||
|
||||
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user