Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库从pgsql修改为h2,不再需要连接本地数据库,方便下载demo使用;解决编译失败:AuthApi类中引入ParseExceptio… #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions leave-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,12 @@
<scope>compile</scope>
</dependency>

<!-- 内存数据库,不再需要连接本地数据库,方便下载demo使用 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package ddd.leave.interfaces.facade;

import ddd.leave.application.service.LoginApplicationService;
import ddd.leave.domain.person.entity.Person;
import ddd.leave.infrastructure.common.api.Response;
import ddd.leave.interfaces.assembler.LeaveAssembler;
import ddd.leave.interfaces.assembler.PersonAssembler;
import ddd.leave.interfaces.dto.LeaveDTO;
import ddd.leave.interfaces.dto.PersonDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

@RestController
@RequestMapping("/auth")
@Slf4j
Expand Down
9 changes: 6 additions & 3 deletions leave-service/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/leave
driver-class-name: org.h2.Driver
username: leave
password: leave
jpa:
Expand All @@ -11,4 +10,8 @@ spring:
hibernate:
temp:
use_jdbc_metadata_defaults: false
show-sql: true
show-sql: true
h2:
console:
enabled: true
path: /h2-console