Вот тестовый класс (по умолчанию):
Код: Выделить всё
package com.example.businesslogicserver;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class BusinessLogicServerApplicationTests {
@Test
void contextLoads() {
}
}
Код: Выделить всё
package com.example.businesslogicserver;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SpringBootApplication
public class BusinessLogicServerApplication {
private static final Logger logger = LoggerFactory.getLogger(BusinessLogicServerApplication.class);
public static void main(String[] args) {
SpringApplication.run(BusinessLogicServerApplication.class, args);
logger.info("Your Spring Boot Application has started successfully...");
}
}
Код: Выделить всё
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.4.1
com.example
business-logic-server
0.0.1-SNAPSHOT
business-logic-server
Project for Handling a list of items
1.8
org.springframework.boot
spring-boot-starter-data-jpa
org.springframework.boot
spring-boot-starter-data-rest
org.springframework.boot
spring-boot-starter-security
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-devtools
runtime
true
mysql
mysql-connector-java
runtime
io.jsonwebtoken
jjwt-api
0.11.2
io.jsonwebtoken
jjwt-impl
0.11.2
runtime
io.jsonwebtoken
jjwt-jackson
0.11.2
runtime
org.springframework.boot
spring-boot-starter-test
test
org.springframework.security
spring-security-test
test
org.springframework.boot
spring-boot-maven-plugin
Код: Выделить всё
server.port=9090
auth.server.base.url=http://localhost:8080
jwt.signing.key=very1secure2secret3key_10264564684846d4fdfhdfsasa1235saa23154asas
spring.jpa.show-sql=true
spring.datasource.url=jdbc:mysql://localhost:3306/itemlist?serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=password
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=update
spring.data.rest.basePath=/api
Подробнее здесь: https://stackoverflow.com/questions/659 ... tioncontex