Commit 3b810008 authored by aray's avatar aray

initial commit by Admin

parent 1e1b7916
FROM openjdk:17-alpine FROM openjdk:17-alpine
ADD /target/demo-0.0.1-SNAPSHOT.jar // ADD /target/playground-assessment-demo-0.0.1-SNAPSHOT.jar //
ENTRYPOINT ["java", "-jar", "/demo-0.0.1-SNAPSHOT.jar"]
ENTRYPOINT ["java", "-jar", "/playground-assessment-demo-0.0.1-SNAPSHOT.jar"]
version: '3.3'
services:
PlaygroundAssessmentDemo:
image: playground-assessment-demo
container_name: playground-assessment-demo
build: .
ports:
- "1099:1099"
\ No newline at end of file
...@@ -10,12 +10,11 @@ ...@@ -10,12 +10,11 @@
</parent> </parent>
<groupId>com.altimetrik</groupId> <groupId>com.altimetrik</groupId>
<artifactId>demo</artifactId> <artifactId>playground-assessment-demo</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>PlaygroundCandidateDemo</name> <name>PlaygroundAssessmentDemo</name>
<description>PlaygroundCandidateDemo</description> <description>PlaygroundAssessmentDemo</description>
<properties> <properties>
<java.version>17</java.version> <java.version>17</java.version>
...@@ -35,6 +34,13 @@ ...@@ -35,6 +34,13 @@
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
......
package com.altimetrik.ee.demo.controller;
public class Default {
}
package com.altimetrik.ee.demo.controller;
import com.altimetrik.ee.demo.service.UserDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value = "/test")
public class DemoClass {
@Autowired
UserDataService userDataService;
@GetMapping(value = "hello", produces = { "application/json" })
public ResponseEntity<String> getUserDetailByGitlabEmailId(){
return new ResponseEntity<>("Hello User,Welcome to Playground Elab Coding challenge", HttpStatus.OK);
}
}
package com.altimetrik.ee.demo.entity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.ToString;
@Entity
@Table(name = "USER_DATA")
@Data
@ToString
public class UserData {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "USER_ID")
private Long id;
@Column(name = "USER_NAME")
private String userName;
}
package com.altimetrik.ee.demo.repository;
import com.altimetrik.ee.demo.entity.UserData;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserDataRepository extends CrudRepository<UserData, Long> {
}
package com.altimetrik.ee.demo.service;
import org.springframework.stereotype.Service;
public interface UserDataService {
}
package com.altimetrik.ee.demo.service.impl;
import com.altimetrik.ee.demo.service.UserDataService;
import org.springframework.stereotype.Service;
@Service
public class UserDataServiceImpl implements UserDataService {
}
package com.altimetrik.ee.demo; package com.altimetrik.playground.candidate.assessment;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
@EnableEncryptableProperties
@Slf4j @Slf4j
public class Application { public class PlaygroundAssessmentDemoApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(Application.class, args); SpringApplication.run(PlaygroundAssessmentDemoApplication.class, args);
log.info("Application has been started successfully."); log.info("PlaygroundCandidateDemo app has been started successfully ...");
} }
} }
package com.altimetrik.playground.candidate.assessment.controller;
public class AdminDbConsoleController {
}
# Spring properties
spring:
application:
name: PlaygroundCandidateDemo # Service registers under this name
freemarker:
enabled: false # Ignore Eureka dashboard FreeMarker templates
# HTTP Server
server:
port: 1099 # HTTP (Tomcat) port
servlet.contextPath: /
undertow:
accesslog:
enabled: true
# Logging configurations
logging:
level:
root: INFO
com.memorynotfound: DEBUG
org.springframework.web: INFO
org.springframework.security: INFO
org.hibernate.SQL: WARN
PlaygroundCandidateDemo:
fileName : validator.json
\ No newline at end of file
# you can add k8s related properties here
\ No newline at end of file
[
{
"id": 1,
"title": "SAMPLE APPLICATION",
"description": "It is a Sample Demo Application",
"tags": [
"JAVA",
"SPRING"
],
"vote": 1,
"createdBy": "ssa3410@altimetrik.com",
"createdDate": "01-12-2018",
"updatedBy": null,
"updatedDate": null
},
{
"id": 2,
"title": "secod APPLICATION",
"description": "It is a Sample Demo Application",
"tags": [
"JAVA",
"SPRING"
],
"vote": 2,
"createdDate": "01-12-2018",
"createdBy": "ssa3410@altimetrik.com",
"updatedDate": null,
"updatedBy": null
},
{
"id": 3,
"title": "secod APPLICATION",
"description": "It is a Sample Demo Application",
"tags": [
"JAVA",
"SPRING"
],
"vote": 0,
"createdDate": "01-12-2018",
"createdBy": "ssa3410@altimetrik.com",
"updatedDate": null,
"updatedBy": null
}
]
\ No newline at end of file
...@@ -6,8 +6,5 @@ import org.springframework.boot.test.context.SpringBootTest; ...@@ -6,8 +6,5 @@ import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest @SpringBootTest
class ApplicationTests { class ApplicationTests {
@Test
void contextLoads() {
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment