Browse Source

commit1

master
Juanjo 1 year ago
commit
ea96d567ff
7 changed files with 392 additions and 0 deletions
  1. +122
    -0
      .idea/alejandro-prueba.iml
  2. +7
    -0
      src/main/java/com/example/demo/models/Act.java
  3. +54
    -0
      src/main/java/com/example/demo/models/Actor.java
  4. +17
    -0
      src/main/resources/application.properties
  5. +1
    -0
      src/main/resources/banner.txt
  6. +19
    -0
      src/main/resources/resources/js/adminlogin.js
  7. +172
    -0
      src/main/resources/static/css/adminlogin.css

+ 122
- 0
.idea/alejandro-prueba.iml View File

@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.5" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.7.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.68" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.68" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.68" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.webjars:bootstrap:5.2.2" level="project" />
<orderEntry type="library" name="Maven: org.webjars.bower:jquery:3.6.1" level="project" />
<orderEntry type="library" name="Maven: org.webjars:font-awesome:6.2.0" level="project" />
<orderEntry type="library" name="Maven: org.webjars:webjars-locator:0.46" level="project" />
<orderEntry type="library" name="Maven: org.webjars:webjars-locator-core:0.50" level="project" />
<orderEntry type="library" name="Maven: io.github.classgraph:classgraph:4.8.139" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.4.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.10.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" name="Maven: com.github.spullara.mustache.java:compiler:0.9.10" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.7.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.7.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.7.4" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-springsecurity5:3.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.23" level="project" />
<orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.7.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.7.5" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.22.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:4.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.12.18" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.12.18" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:4.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.23" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.9.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.7.5" level="project" />
<orderEntry type="library" name="Maven: com.sun.mail:jakarta.mail:1.6.7" level="project" />
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.7.5" level="project" />
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.8.2" level="project" />
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.8.2" level="project" />
<orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.1.2" level="project" />
</component>
</module>

+ 7
- 0
src/main/java/com/example/demo/models/Act.java View File

@ -0,0 +1,7 @@
package com.example.demo.models;
public class Act {
public Act(){}
}

+ 54
- 0
src/main/java/com/example/demo/models/Actor.java View File

@ -0,0 +1,54 @@
package com.example.demo.models;
import java.util.Objects;
public class Actor {
private long id;
private String name;
public Actor(){}
public Actor(long id, String name) {
this.id = id;
this.name = name;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Actor actor = (Actor) o;
return id == actor.id && Objects.equals(name, actor.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
return "Actor{" +
"id=" + id +
", name='" + name + '\'' +
'}';
}
}

+ 17
- 0
src/main/resources/application.properties View File

@ -0,0 +1,17 @@
server.port=9000
spring.thymeleaf.cache=false
#logging.level.org.springframework.web=TRACE
#logging.level.org.springframework.security=TRACE
#spring.session.store-type=redis
# Session timeout. If a duration suffix is not specified, seconds is used.
server.servlet.session.timeout=60s
# Sessions flush mode.
spring.session.redis.flush-mode=on_save
# Namespace for keys used to store sessions.
spring.session.redis.namespace=spring:session
spring.redis.port=6379
spring.redis.host=localhost
spring.security.user.name=jandro
spring.security.user.password=1234

+ 1
- 0
src/main/resources/banner.txt View File

@ -0,0 +1 @@
Iniciando...

+ 19
- 0
src/main/resources/resources/js/adminlogin.js View File

@ -0,0 +1,19 @@
function toggleResetPswd(e){
e.preventDefault();
$('#logreg-forms .form-signin').toggle() // display:block or none
$('#logreg-forms .form-reset').toggle() // display:block or none
}
function toggleSignUp(e){
e.preventDefault();
$('#logreg-forms .form-signin').toggle(); // display:block or none
$('#logreg-forms .form-signup').toggle(); // display:block or none
}
$(()=>{
// Login Register Form
$('#logreg-forms #forgot_pswd').click(toggleResetPswd);
$('#logreg-forms #cancel_reset').click(toggleResetPswd);
$('#logreg-forms #btn-signup').click(toggleSignUp);
$('#logreg-forms #cancel_signup').click(toggleSignUp);
})

+ 172
- 0
src/main/resources/static/css/adminlogin.css View File

@ -0,0 +1,172 @@
/*
--Paleta de colores
+white: #f9f9f9ff
+black: #1a1a1aff
+red: #ff2a2aff
*/
div.main{
background: #0264d6; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #0264d6 1%, #1c2b5a 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(1%,#0264d6), color-stop(100%,#1c2b5a)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #0264d6 1%,#1c2b5a 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #0264d6 1%,#1c2b5a 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #0264d6 1%,#1c2b5a 100%); /* IE10+ */
background: radial-gradient(ellipse at center, #0264d6 1%,#1c2b5a 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0264d6', endColorstr='#1c2b5a',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
height:calc(100vh);
width:100%;
}
[class*="fontawesome-"]:before {
font-family: 'FontAwesome', sans-serif;
}
/* ---------- GENERAL ---------- */
* {
box-sizing: border-box;
margin:0px auto;
&:before,
&:after {
box-sizing: border-box;
}
}
body {
color: #f9f9f9ff;
font: 87.5%/1.5em 'Open Sans', sans-serif;
margin: 0;
}
a {
color: #eee;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
input {
border: none;
font-family: 'Open Sans', Arial, sans-serif;
font-size: 14px;
line-height: 1.5em;
padding: 0;
-webkit-appearance: none;
}
p {
line-height: 1.5em;
}
.clearfix {
*zoom: 1;
&:before,
&:after {
content: ' ';
display: table;
}
&:after {
clear: both;
}
}
.container + .section_title {
left: 50%;
position: fixed;
top: 50%;
transform: translate(-50%, -50%);
}
.section_title {
text-align: center;
margin: 5%;
}
/* ---------- LOGIN ---------- */
#login form{
width: 250px;
}
#login, .logo{
display:inline-block;
width:40%;
}
#login{
border-right:1px solid #fff;
padding: 0px 22px;
width: 59%;
}
.logo{
color:#fff;
font-size:50px;
line-height: 125px;
}
#login form span.fa {
background-color: #fff;
border-radius: 3px 0px 0px 3px;
color: #000;
display: block;
float: left;
height: 50px;
font-size:24px;
line-height: 50px;
text-align: center;
width: 50px;
}
#login form input {
height: 50px;
}
fieldset{
padding:0;
border:0;
margin: 0;
}
#login form input[type="text"], input[type="password"] {
background-color: #fff;
border-radius: 0px 3px 3px 0px;
color: #000;
margin-bottom: 1em;
padding: 0 16px;
width: 200px;
}
#login form input[type="submit"] {
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
background-color: #000000;
color: #eee;
font-weight: bold;
/* margin-bottom: 2em; */
text-transform: uppercase;
padding: 5px 10px;
height: 30px;
}
#login form input[type="submit"]:hover {
background-color: #d44179;
}
#login > p {
text-align: center;
}
#login > p span {
padding-left: 5px;
}
.middle {
display: flex;
width: 600px;
}

Loading…
Cancel
Save