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

Kotlin archetypes: component, spring-mvc #14

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

elfrucool
Copy link

@elfrucool elfrucool commented Oct 15, 2020

Here I'm presenting a couple of new archetypes:

  • spring-archetype-component-kotlin to create spring based components in kotlin, and
  • spring-archetype-service-mvc-kotlin to create spring-mvc services in kotlin

Both were already tested on my local environment.

Also I'm using JUnit5 on Kotlin tests

Let me know if it's ok to have them, I had this idea after reading that we are open to use kotlin if the concrete team and manager agrees.

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<addDefaultExcludes>false</addDefaultExcludes>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for adding .gitignore to generated projects

* You'll probably want to do something more than
* store a String.
*/
public class ComponentJava {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some java code to show Java and Kotlin can live together

## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
#set( $D = '\$' )
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to escape it since $ has special meaning on Kotling strings

properties = ["ot.component.config=foo"],
classes = [ComponentKotlinConfiguration::class]
)
// must be @Autowired not @Inject
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for having componentKotlin: ComponentKotlin as immutable field (and constructor argument) we need to use @Autowired and JUnit5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants