diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..5e73f9d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: Propose any issues +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..3ce9b9d6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" + diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 00000000..f24c004e --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,45 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Gradle + uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 + with: + arguments: build + + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle + - name: Publish to GitHub Packages + uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 + with: + arguments: publish + env: + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gradle-publish_temp.yml b/.github/workflows/gradle-publish_temp.yml new file mode 100644 index 00000000..7530cf4d --- /dev/null +++ b/.github/workflows/gradle-publish_temp.yml @@ -0,0 +1,46 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Package + +on: + release: + types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Gradle + uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 + with: + arguments: build + + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle + - name: Publish to GitHub Packages + uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 + with: + arguments: publish + env: + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..63f982c3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Alan Binu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/login-registration-springboot-hibernate-jsp-auth/.idea/codeStyles/codeStyleConfig.xml b/login-registration-springboot-hibernate-jsp-auth/.idea/codeStyles/codeStyleConfig.xml index a55e7a17..9fec68aa 100644 --- a/login-registration-springboot-hibernate-jsp-auth/.idea/codeStyles/codeStyleConfig.xml +++ b/login-registration-springboot-hibernate-jsp-auth/.idea/codeStyles/codeStyleConfig.xml @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/login-registration-springboot-hibernate-jsp-auth/src/main/java/net/alanbinu/springboot/loginregistrationspringbootauthjsp/validator/UserValidator.java b/login-registration-springboot-hibernate-jsp-auth/src/main/java/net/alanbinu/springboot/loginregistrationspringbootauthjsp/validator/UserValidator.java index 37925f43..805fee7a 100644 --- a/login-registration-springboot-hibernate-jsp-auth/src/main/java/net/alanbinu/springboot/loginregistrationspringbootauthjsp/validator/UserValidator.java +++ b/login-registration-springboot-hibernate-jsp-auth/src/main/java/net/alanbinu/springboot/loginregistrationspringbootauthjsp/validator/UserValidator.java @@ -22,7 +22,9 @@ public boolean supports(Class aClass) { @Override public void validate(Object o, Errors errors) { User user = (User) o; - + + //validation startd from here + ValidationUtils.rejectIfEmptyOrWhitespace(errors, "username", "NotEmpty"); if (user.getUsername().length() < 6 || user.getUsername().length() > 32) { errors.rejectValue("username", "Size.userForm.username"); diff --git a/spring covid-19/src/main/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplication.java b/spring covid-19/src/main/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplication.java index c80250a0..21c11789 100644 --- a/spring covid-19/src/main/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplication.java +++ b/spring covid-19/src/main/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplication.java @@ -9,6 +9,7 @@ public class CoronavirusTrackerApplication { public static void main(String[] args) { + //application startes SpringApplication.run(CoronavirusTrackerApplication.class, args); } diff --git a/spring covid-19/src/test/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplicationTests.java b/spring covid-19/src/test/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplicationTests.java index d9c6f936..e02a6292 100644 --- a/spring covid-19/src/test/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplicationTests.java +++ b/spring covid-19/src/test/java/io/alanbinu/coronavirustracker/CoronavirusTrackerApplicationTests.java @@ -9,5 +9,8 @@ class CoronavirusTrackerApplicationTests { @Test void contextLoads() { } + //here we are adding oue new test cases + //@Test used to craete a new trsst case in this porject } + diff --git a/spring-propertysource-example/src/main/java/net/alanbinu/springboot2/springpropertysourceexample/ProperySourceDemo.java b/spring-propertysource-example/src/main/java/net/alanbinu/springboot2/springpropertysourceexample/ProperySourceDemo.java index c7ce6201..d71e1b81 100644 --- a/spring-propertysource-example/src/main/java/net/alanbinu/springboot2/springpropertysourceexample/ProperySourceDemo.java +++ b/spring-propertysource-example/src/main/java/net/alanbinu/springboot2/springpropertysourceexample/ProperySourceDemo.java @@ -19,6 +19,7 @@ public class ProperySourceDemo implements InitializingBean { public void afterPropertiesSet() throws Exception { setDatabaseConfig(); } + //here we are storing all our details in env so it is secure private void setDatabaseConfig() { DataSourceConfig config = new DataSourceConfig(); diff --git a/springboot-hibernate-one-one-mapping/src/main/resources/application.properties b/springboot-hibernate-one-one-mapping/src/main/resources/application.properties index c0f230b3..077386a5 100644 --- a/springboot-hibernate-one-one-mapping/src/main/resources/application.properties +++ b/springboot-hibernate-one-one-mapping/src/main/resources/application.properties @@ -10,4 +10,4 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDial # Hibernate ddl auto (create, create-drop, validate, update) spring.jpa.hibernate.ddl-auto = update -logging.level.org.hibernate.SQL=DEBUG +logging.level.org.hibernate.SQL=DEBUG,INFO diff --git a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/InstructorController.java b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/InstructorController.java index 01ea4d0b..a25bac41 100644 --- a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/InstructorController.java +++ b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/InstructorController.java @@ -1,4 +1,4 @@ -package net.guides.springboot.jpa.controller; +package net.alanbinu.springboot.jpa.controller; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/ResourceNotFoundException.java b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/ResourceNotFoundException.java index eb025fdd..d66ff5e6 100644 --- a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/ResourceNotFoundException.java +++ b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/controller/ResourceNotFoundException.java @@ -1,4 +1,4 @@ -package net.guides.springboot.jpa.controller; +package net.alanbinu.springboot.jpa.controller; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; diff --git a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/model/Instructor.java b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/model/Instructor.java index 8a937ef6..cc818390 100644 --- a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/model/Instructor.java +++ b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/model/Instructor.java @@ -1,4 +1,4 @@ -package net.guides.springboot.jpa.model; +package net.alanbinu.springboot.jpa.model; import javax.persistence.CascadeType; import javax.persistence.Column; diff --git a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/repository/InstructorRepository.java b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/repository/InstructorRepository.java index 6d41eeb0..7fefe2aa 100644 --- a/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/repository/InstructorRepository.java +++ b/springboot-jpa-one-to-one-example/src/main/java/net/alanbinu/springboot/jpa/repository/InstructorRepository.java @@ -1,4 +1,4 @@ -package net.guides.springboot.jpa.repository; +package net.alanbinu.springboot.jpa.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/springboot-jsp-hello-world-example/src/main/webapp/WEB-INF/jsp/hello.jsp b/springboot-jsp-hello-world-example/src/main/webapp/WEB-INF/jsp/hello.jsp index 5f3f96a1..6c88fe79 100644 --- a/springboot-jsp-hello-world-example/src/main/webapp/WEB-INF/jsp/hello.jsp +++ b/springboot-jsp-hello-world-example/src/main/webapp/WEB-INF/jsp/hello.jsp @@ -7,6 +7,6 @@ Insert title here -

Hello ${name}!

+

Hello ${name}! How are you?

- \ No newline at end of file + diff --git a/springboot-mongodb-crud/src/main/java/net/springboot/alanbinu/exception/ResourceNotFoundException.java b/springboot-mongodb-crud/src/main/java/net/springboot/alanbinu/exception/ResourceNotFoundException.java index c6216124..d431b55c 100644 --- a/springboot-mongodb-crud/src/main/java/net/springboot/alanbinu/exception/ResourceNotFoundException.java +++ b/springboot-mongodb-crud/src/main/java/net/springboot/alanbinu/exception/ResourceNotFoundException.java @@ -1,3 +1,4 @@ + package net.springboot.alanbinu.exception; import org.springframework.web.bind.annotation.ResponseStatus; diff --git a/springboot-stomp-websocket/src/main/java/net/alanbinu/springboot/websocket/config/WebSocketConfig.java b/springboot-stomp-websocket/src/main/java/net/alanbinu/springboot/websocket/config/WebSocketConfig.java index 7d0557df..4b82ea73 100644 --- a/springboot-stomp-websocket/src/main/java/net/alanbinu/springboot/websocket/config/WebSocketConfig.java +++ b/springboot-stomp-websocket/src/main/java/net/alanbinu/springboot/websocket/config/WebSocketConfig.java @@ -1,3 +1,4 @@ + package net.alanbinu.springboot.websocket.config; import org.springframework.context.annotation.Configuration; @@ -21,4 +22,4 @@ public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/ws").withSockJS(); } -} \ No newline at end of file +} diff --git a/springboot-thymeleaf-security-demo/src/main/resources/messages.properties b/springboot-thymeleaf-security-demo/src/main/resources/messages.properties index 83ab1a64..44ac0c6e 100644 --- a/springboot-thymeleaf-security-demo/src/main/resources/messages.properties +++ b/springboot-thymeleaf-security-demo/src/main/resources/messages.properties @@ -1,3 +1,4 @@ + label.email=Email label.password=Password label.login=Login diff --git a/springboot2-externalizing-conf-properties/src/main/java/net/alanbinu/springboot2/springboot2externalizingconfproperties/PropertyController.java b/springboot2-externalizing-conf-properties/src/main/java/net/alanbinu/springboot2/springboot2externalizingconfproperties/PropertyController.java index b17f9e65..f53c89ef 100644 --- a/springboot2-externalizing-conf-properties/src/main/java/net/alanbinu/springboot2/springboot2externalizingconfproperties/PropertyController.java +++ b/springboot2-externalizing-conf-properties/src/main/java/net/alanbinu/springboot2/springboot2externalizingconfproperties/PropertyController.java @@ -1,4 +1,4 @@ -package net.guides.springboot2.springboot2externalizingconfproperties; +package net.alanbinu.springboot2.springboot2externalizingconfproperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/springboot2-java-config/src/main/resources/application.properties b/springboot2-java-config/src/main/resources/application.properties index e69de29b..56f3b36e 100644 --- a/springboot2-java-config/src/main/resources/application.properties +++ b/springboot2-java-config/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/springboot2-logging/src/main/resources/logback.xml b/springboot2-logging/src/main/resources/logback.xml index b6d2fefc..eb8d16b1 100644 --- a/springboot2-logging/src/main/resources/logback.xml +++ b/springboot2-logging/src/main/resources/logback.xml @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/springboot2-webapp-jsp/src/test/java/net/alanbinu/springboot2/springboot2webappjsp/Springboot2WebappJspApplicationTests.java b/springboot2-webapp-jsp/src/test/java/net/alanbinu/springboot2/springboot2webappjsp/Springboot2WebappJspApplicationTests.java index 7a5a5b31..9391d169 100644 --- a/springboot2-webapp-jsp/src/test/java/net/alanbinu/springboot2/springboot2webappjsp/Springboot2WebappJspApplicationTests.java +++ b/springboot2-webapp-jsp/src/test/java/net/alanbinu/springboot2/springboot2webappjsp/Springboot2WebappJspApplicationTests.java @@ -11,6 +11,7 @@ public class Springboot2WebappJspApplicationTests { @Test public void contextLoads() { + //Body of the Contecx function } } diff --git a/springboot2-xml-config/src/main/java/net/alanbinu/springboot2/springboot2xmlconfig/model/Message.java b/springboot2-xml-config/src/main/java/net/alanbinu/springboot2/springboot2xmlconfig/model/Message.java index dde9bf06..284fb2a5 100644 --- a/springboot2-xml-config/src/main/java/net/alanbinu/springboot2/springboot2xmlconfig/model/Message.java +++ b/springboot2-xml-config/src/main/java/net/alanbinu/springboot2/springboot2xmlconfig/model/Message.java @@ -1,7 +1,9 @@ package net.alanbinu.springboot2.springboot2xmlconfig.model; public class Message { + //to store the uniqe id private int id; + // to store the string message private String message; public Message(int id, String message) { super();