mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2025-12-05 18:46:44 -05:00
Compare commits
2 Commits
d7ae362c23
...
346ccc3813
| Author | SHA1 | Date | |
|---|---|---|---|
| 346ccc3813 | |||
| 9779bdb5c0 |
39
action1.yaml
Normal file
39
action1.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
# File: .gitea/workflows/build-and-upload.yml
|
||||
name: Build and Upload Artifact
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Step 1: Check out repository code
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Step 2: Set up Node.js (example for a JS project; adjust for your stack)
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
# Step 3: Install dependencies
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# Step 4: Build project
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
|
||||
# Step 5: Upload build output as artifact
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-output
|
||||
path: dist/ # Change to your build output directory
|
||||
retention-days: 7 # Optional: how long to keep artifact
|
||||
9
pom.xml
9
pom.xml
@@ -30,8 +30,8 @@
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<connection></connection>
|
||||
<developerConnection>scm:git:https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git</developerConnection>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
@@ -45,10 +45,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-rest</artifactId>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
@@ -79,6 +79,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.7.7</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -2,6 +2,9 @@ package group.goforward.ballistic;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @param <T>
|
||||
*/
|
||||
public class ApiResponse<T> {
|
||||
|
||||
private static final String API_SUCCESS = "success";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package group.goforward.ballistic.controllers;
|
||||
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.services.PsaService;
|
||||
import group.goforward.ballistic.services.impl.PsaServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -14,10 +14,10 @@ import java.util.UUID;
|
||||
@RequestMapping("/api/psa")
|
||||
public class PsaController {
|
||||
|
||||
private final PsaService psaService;
|
||||
private final PsaServiceImpl psaService;
|
||||
|
||||
@Autowired
|
||||
public PsaController(PsaService psaService) {
|
||||
public PsaController(PsaServiceImpl psaService) {
|
||||
this.psaService = psaService;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package group.goforward.ballistic.model;
|
||||
package group.goforward.ballistic.repos;
|
||||
|
||||
import group.goforward.ballistic.model.Account;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
import java.util.UUID;
|
||||
@@ -1,40 +1,17 @@
|
||||
package group.goforward.ballistic.services;
|
||||
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.repos.PsaRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class PsaService implements group.goforward.ballistic.services.impl.PsaService {
|
||||
public interface PsaService {
|
||||
List<Psa> findAll();
|
||||
|
||||
private final PsaRepository psaRepository;
|
||||
Optional<Psa> findById(UUID id);
|
||||
|
||||
@Autowired
|
||||
public PsaService(PsaRepository psaRepository) {
|
||||
this.psaRepository = psaRepository;
|
||||
}
|
||||
Psa save(Psa psa);
|
||||
|
||||
@Override
|
||||
public List<Psa> findAll() {
|
||||
return psaRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Psa> findById(UUID id) {
|
||||
return psaRepository.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Psa save(Psa psa) {
|
||||
return psaRepository.save(psa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(UUID id) {
|
||||
psaRepository.deleteById(id);
|
||||
}
|
||||
void deleteById(UUID id);
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package group.goforward.ballistic.services.impl;
|
||||
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface PsaService {
|
||||
List<Psa> findAll();
|
||||
|
||||
Optional<Psa> findById(UUID id);
|
||||
|
||||
Psa save(Psa psa);
|
||||
|
||||
void deleteById(UUID id);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package group.goforward.ballistic.services.impl;
|
||||
import group.goforward.ballistic.model.Psa;
|
||||
import group.goforward.ballistic.repos.PsaRepository;
|
||||
import group.goforward.ballistic.services.PsaService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class PsaServiceImpl implements PsaService {
|
||||
|
||||
private final PsaRepository psaRepository;
|
||||
|
||||
@Autowired
|
||||
public PsaServiceImpl(PsaRepository psaRepository) {
|
||||
this.psaRepository = psaRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Psa> findAll() {
|
||||
return psaRepository.findAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Psa> findById(UUID id) {
|
||||
return psaRepository.findById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Psa save(Psa psa) {
|
||||
return psaRepository.save(psa);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteById(UUID id) {
|
||||
psaRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user